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
This commit is contained in:
David Faure 2020-10-31 14:38:21 +01:00
parent 694c42c440
commit 8563f1f54f
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@
<default code="true">QColor(KColorScheme(QPalette::Active, KColorScheme::Window).background().color())</default>
</entry>
<entry name="CapPath" type="String">
<default code="true">QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral(&quot;cubecap.png&quot;))</default>
<default code="true">QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral(&quot;cubecap.png&quot;))</default>
</entry>
<entry name="TexturedCaps" type="Bool">
<default>true</default>

View file

@ -267,8 +267,8 @@ void TrackMouseEffect::slotMouseChanged(const QPoint&, const QPoint&,
void TrackMouseEffect::loadTexture()
{
QString f[2] = {QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("tm_outer.png")),
QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("tm_inner.png"))};
QString f[2] = {QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("tm_outer.png")),
QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("tm_inner.png"))};
if (f[0].isEmpty() || f[1].isEmpty())
return;