Get username from env
...in reparation of SFOS 3.4
This commit is contained in:
parent
a28d5a5d83
commit
e300a00ee5
1 changed files with 2 additions and 1 deletions
|
@ -47,12 +47,13 @@ IppPrinter::~IppPrinter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject IppPrinter::opAttrs() {
|
QJsonObject IppPrinter::opAttrs() {
|
||||||
|
QString name = qgetenv("USER");
|
||||||
QJsonObject o
|
QJsonObject o
|
||||||
{
|
{
|
||||||
{"attributes-charset", QJsonObject {{"tag", IppMsg::Charset}, {"value", "utf-8"}}},
|
{"attributes-charset", QJsonObject {{"tag", IppMsg::Charset}, {"value", "utf-8"}}},
|
||||||
{"attributes-natural-language", QJsonObject {{"tag", IppMsg::NaturalLanguage}, {"value", "en-us"}}},
|
{"attributes-natural-language", QJsonObject {{"tag", IppMsg::NaturalLanguage}, {"value", "en-us"}}},
|
||||||
{"printer-uri", QJsonObject {{"tag", IppMsg::Uri}, {"value", _url.toString()}}},
|
{"printer-uri", QJsonObject {{"tag", IppMsg::Uri}, {"value", _url.toString()}}},
|
||||||
{"requesting-user-name", QJsonObject {{"tag", IppMsg::NameWithoutLanguage}, {"value", "nemo"}}},
|
{"requesting-user-name", QJsonObject {{"tag", IppMsg::NameWithoutLanguage}, {"value", name}}},
|
||||||
};
|
};
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue