Add optional job-id to prioritized/sorted operation attributes

Some printers are really picky...
This commit is contained in:
Anton Thomasson 2022-07-18 22:27:39 +02:00
parent 51c90e6443
commit 5f71f2dd64

View file

@ -319,11 +319,15 @@ Bytestream IppMsg::encode()
QStringList InitialAttrs = {"attributes-charset", QStringList InitialAttrs = {"attributes-charset",
"attributes-natural-language", "attributes-natural-language",
"printer-uri", "printer-uri",
"job-id",
"requesting-user-name"}; "requesting-user-name"};
for(QString key : InitialAttrs) for(QString key : InitialAttrs)
{ {
QJsonObject val = _opAttrs.take(key).toObject(); if(_opAttrs.find(key) != _opAttrs.end())
encode_attr(ipp, val["tag"].toInt(), key, val["value"]); {
QJsonObject val = _opAttrs.take(key).toObject();
encode_attr(ipp, val["tag"].toInt(), key, val["value"]);
}
} }
for(QJsonObject::iterator it = _opAttrs.begin(); it != _opAttrs.end(); it++) for(QJsonObject::iterator it = _opAttrs.begin(); it != _opAttrs.end(); it++)
{ // encode any remaining op-attrs { // encode any remaining op-attrs