Use default port for printing

This commit is contained in:
Anton Thomasson 2019-12-01 20:36:56 +01:00
parent 4e00baeff8
commit 662babf5db

View file

@ -96,6 +96,9 @@ bool IppPrinter::print(QJsonObject attrs, QString filename){
QFileInfo fileinfo(file); QFileInfo fileinfo(file);
QNetworkRequest request; QNetworkRequest request;
QUrl url("http://"+_url); QUrl url("http://"+_url);
if(url.port() == -1) {
url.setPort(631);
}
request.setUrl(url); request.setUrl(url);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/ipp"); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/ipp");