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,12 +319,16 @@ Bytestream IppMsg::encode()
QStringList InitialAttrs = {"attributes-charset",
"attributes-natural-language",
"printer-uri",
"job-id",
"requesting-user-name"};
for(QString key : InitialAttrs)
{
if(_opAttrs.find(key) != _opAttrs.end())
{
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++)
{ // encode any remaining op-attrs
QJsonObject val = it.value().toObject();