Commit b77fcde1 authored by David Faure's avatar David Faure
Browse files

Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation

They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
parent e2ba9fe4
......@@ -83,7 +83,7 @@ KWin4App::KWin4App(QWidget *parent)
{
// Read theme files
QStringList themeList;
const QString dir = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("grafix"), QStandardPaths::LocateDirectory);
const QString dir = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("grafix"), QStandardPaths::LocateDirectory);
const QStringList fileNames = QDir(dir).entryList(QStringList() << QStringLiteral("*.desktop"));
for (const QString& file : fileNames)
themeList.append(dir + QLatin1Char('/') + file);
......@@ -415,7 +415,7 @@ void KWin4App::saveProperties(KConfigGroup& grp)
// Save current game?
QString name = QStringLiteral("current_game")+grp.name();
QString filename = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + name;
QString filename = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1Char('/') + name;
bool isRunning = (mDoc->gameStatus()==KGame::Run);
if (isRunning)
{
......
......@@ -102,14 +102,14 @@ void ThemeManager::updateTheme(const QString &themefile)
mPixmapCache.clear();
// Process dirs
QString rcfile = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("grafix/") + themefile);
QString rcfile = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("grafix/") + themefile);
qCDebug(KFOURINLINE_LOG) << "ThemeManager LOAD with theme "<<rcfile;
// Read config and SVG file for theme
delete mConfig;
mConfig = new KConfig(rcfile, KConfig::NoGlobals);
QString svgfile = config(QStringLiteral("general")).readEntry("svgfile");
svgfile = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("grafix/") + svgfile);
svgfile = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("grafix/") + svgfile);
qCDebug(KFOURINLINE_LOG) << "Reading SVG master file =" << svgfile;
mAspectRatio = config(QStringLiteral("general")).readEntry("aspect-ratio", 1.0);
qCDebug(KFOURINLINE_LOG) << "Aspect ratio =" << mAspectRatio;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment