Albert S
2824f84f9f
Previously, it was in the configprovider.cpp. Now, it has been split to this file
28 lignes
641 B
C++
28 lignes
641 B
C++
#include "settingsprovider.h"
|
|
#include <QFileInfo>
|
|
#include <QDir>
|
|
|
|
SettingsProvider::SettingsProvider(QSettings &settings)
|
|
{
|
|
this->settings = &settings;
|
|
}
|
|
|
|
QStringList SettingsProvider::userEntriesPaths() const
|
|
{
|
|
//TODO: make it configurable, but we stick with this for now.
|
|
QFileInfo fi(this->settings->fileName());
|
|
return { fi.absoluteDir().absolutePath() };
|
|
}
|
|
|
|
QStringList SettingsProvider::systemApplicationsEntriesPaths() const
|
|
{
|
|
return settings->value("sysAppsPaths", "/usr/share/applications/").toStringList();
|
|
}
|
|
|
|
bool SettingsProvider::singleInstanceMode() const
|
|
{
|
|
return settings->value("singleInstance", true).toBool();
|
|
}
|
|
|
|
|