Using qgetenv() instead of getenv().

--HG--
branch : develop
This commit is contained in:
dismine 2014-02-14 20:42:38 +02:00
parent ea4e4d0d8a
commit c46681a96a

View File

@ -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);