~system-settings-touch/ubuntu-system-settings/trunk

« back to all changes in this revision

Viewing changes to plugins/sound/sound.cpp

  • Committer: Bileto Bot
  • Author(s): Jonas G. Drange
  • Date: 2016-09-30 13:48:06 UTC
  • mfrom: (1720.3.7 path-fixes)
  • Revision ID: ci-train-bot@canonical.com-20160930134806-tir714ireb8xzaau
uses XDG_DATA_DIRS where applicable to enable USS to find files and folders on snappy-based systems (LP: #1629009)

Approved by: Alberto Mardegan, Ken VanDine, Lukáš Tinkl, system-apps-ci-bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
QStringList soundsListFromDir(const QString &dirString)
246
246
{
247
247
    QDir soundsDir(dirString);
 
248
    if (soundsDir.isRelative()) {
 
249
        QString path = QStandardPaths::locate(
 
250
            QStandardPaths::GenericDataLocation, dirString,
 
251
            QStandardPaths::LocateDirectory
 
252
        );
 
253
        if (path.isEmpty()) {
 
254
            return QStringList();
 
255
        }
 
256
        soundsDir = QDir(path);
 
257
    }
248
258
 
249
259
    if (soundsDir.exists())
250
260
    {