Commit c0dc71d9 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 5b323bc4
......@@ -272,8 +272,8 @@ bool AppearanceSettings::validateSkin(const QString& skinId, bool kns)
{
QString dir = kns ? QStringLiteral("kns_skins/") : QStringLiteral("skins/");
QString titlePath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + skinId + QStringLiteral("/title.skin"));
QString tabsPath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + skinId + QStringLiteral("/tabs.skin"));
QString titlePath = QStandardPaths::locate(QStandardPaths::AppDataLocation, dir + skinId + QStringLiteral("/title.skin"));
QString tabsPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, dir + skinId + QStringLiteral("/tabs.skin"));
return !titlePath.isEmpty() && !tabsPath.isEmpty();
}
......
......@@ -42,8 +42,8 @@ bool Skin::load(const QString& name, bool kns)
{
QString dir = kns ? QStringLiteral("kns_skins/") : QStringLiteral("skins/");
QString titlePath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/title.skin"));
QString tabPath = QStandardPaths::locate(QStandardPaths::DataLocation, dir + name + QStringLiteral("/tabs.skin"));
QString titlePath = QStandardPaths::locate(QStandardPaths::AppDataLocation, dir + name + QStringLiteral("/title.skin"));
QString tabPath = QStandardPaths::locate(QStandardPaths::AppDataLocation, dir + name + QStringLiteral("/tabs.skin"));
if (!QFile::exists(titlePath) || !QFile::exists(tabPath))
return false;
......
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