Use default port for printing
This commit is contained in:
parent
4e00baeff8
commit
662babf5db
1 changed files with 3 additions and 0 deletions
|
@ -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");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue