~mzanetti/unity8/fix-1648251

« back to all changes in this revision

Viewing changes to plugins/LightDM/SessionsModel.cpp

  • Committer: Michael Zanetti
  • Date: 2016-12-01 12:20:34 UTC
  • mfrom: (2525.1.179 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161201122034-cpvbf7webbhg2wph
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
    m_roleNames = m_model->roleNames();
120
120
    m_roleNames[IconRole] = "icon_url";
121
121
 
 
122
    // Update search locations to use $SNAP prefix if specified
 
123
    auto snapRoot = QFile::decodeName(qgetenv("SNAP"));
 
124
    if (!snapRoot.isEmpty()) {
 
125
        for (int i = 0; i < m_iconSearchDirectories.size(); i++) {
 
126
            m_iconSearchDirectories[i] = snapRoot + m_iconSearchDirectories[i].path();
 
127
        }
 
128
    }
 
129
 
122
130
    setModel(m_model);
123
131
    setSourceModel(m_model);
124
132
    setSortCaseSensitivity(Qt::CaseInsensitive);