Commit 5b2aefb4 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Source USERNAME environment variable on Windows instead of USER.

parent 1bdb4d19
......@@ -44,7 +44,12 @@ SettingsPage::SettingsPage()
m_settings = Core::ICore::instance()->settings();
if (m_settings) {
m_username = m_settings->value("UserName", qgetenv("USER")).toString();
#ifdef Q_OS_WIN32
QString defaultUser = qgetenv("USERNAME");
QString defaultUser = qgetenv("USER");
m_username = m_settings->value("UserName", defaultUser).toString();
m_protocol = m_settings->value("DefaultProtocol", "CodePaster").toString();
m_copy = m_settings->value("CopyToClipboard", true).toBool();
m_output = m_settings->value("DisplayOutput", true).toBool();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment