File: systemsettings.cpp

package info (click to toggle)
plasma-workspace 4%3A6.3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 104,900 kB
  • sloc: cpp: 125,434; xml: 31,579; python: 3,976; perl: 572; sh: 234; javascript: 74; ruby: 39; ansic: 13; makefile: 9
file content (36 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
    SPDX-FileCopyrightText: 2015 Eike Hein <hein@kde.org>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "systemsettings.h"

#include <QStandardPaths>

SystemSettings::SystemSettings(QObject *parent)
    : QObject(parent)
{
}

SystemSettings::~SystemSettings()
{
}

QString SystemSettings::picturesLocation() const
{
    QString path;

    const QStringList &locations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);

    if (!locations.isEmpty()) {
        path = locations.at(0);
    } else {
        // HomeLocation is guaranteed not to be empty.
        path = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
    }

    return path;
}

#include "moc_systemsettings.cpp"