Get username from env

...in reparation of SFOS 3.4
This commit is contained in:
Anton Thomasson 2020-08-02 11:44:38 +02:00
parent a28d5a5d83
commit e300a00ee5

View file

@ -47,12 +47,13 @@ IppPrinter::~IppPrinter() {
}
QJsonObject IppPrinter::opAttrs() {
QString name = qgetenv("USER");
QJsonObject o
{
{"attributes-charset", QJsonObject {{"tag", IppMsg::Charset}, {"value", "utf-8"}}},
{"attributes-natural-language", QJsonObject {{"tag", IppMsg::NaturalLanguage}, {"value", "en-us"}}},
{"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;
}