Using qgetenv() instead of getenv().
--HG-- branch : develop
This commit is contained in:
parent
ea4e4d0d8a
commit
c46681a96a
|
@ -223,9 +223,9 @@ QGroupBox *PatternPage::UserGroup()
|
||||||
userName = new QLineEdit;
|
userName = new QLineEdit;
|
||||||
Q_CHECK_PTR(userName);
|
Q_CHECK_PTR(userName);
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
QString user = settings.value("pattern/user", getenv("USERNAME")).toString(&ok);
|
QString user = settings.value("pattern/user", QString::fromLocal8Bit(qgetenv("USERNAME").constData())).toString();
|
||||||
#else
|
#else
|
||||||
QString user = settings.value("pattern/user", getenv("USER")).toString();
|
QString user = settings.value("pattern/user", QString::fromLocal8Bit(qgetenv("USER").constData())).toString();
|
||||||
#endif
|
#endif
|
||||||
userName->setText(user);
|
userName->setText(user);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user