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"
|