~aacid/unity8/add_override_warning

« back to all changes in this revision

Viewing changes to plugins/Unity/Launcher/asadapter.cpp

  • Committer: Albert Astals Cid
  • Date: 2016-05-05 07:30:08 UTC
  • mfrom: (2341.1.42 unity8)
  • Revision ID: albert.astals@canonical.com-20160505073008-d8u2rkkh0sg1te0l
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "launcheritem.h"
19
19
#include "AccountsServiceDBusAdaptor.h"
20
20
 
 
21
#include <glib.h>
 
22
 
21
23
#include <QDebug>
22
24
 
23
25
ASAdapter::ASAdapter()
24
26
{
25
27
    m_accounts = new AccountsServiceDBusAdaptor();
26
 
    m_user = qgetenv("USER");
 
28
 
 
29
    m_user = QString::fromUtf8(g_get_user_name());
 
30
 
27
31
    if (m_user.isEmpty()) {
28
 
        qWarning() << "$USER not valid. Account Service integration will not work.";
 
32
        qWarning() << "username not valid. Account Service integration will not work.";
29
33
    }
30
34
}
31
35