1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix logs and screenshots path on linux

The QStandardPaths generates paths with app name (qTox) subdirectory
for DataLocation and CacheLocation. No need to add '/tox'.
Both screenshots dir and log file are now in qTox dir in proper location on linux.
This commit is contained in:
Michał Šrajer 2016-03-23 09:56:21 +01:00
parent a4c5661443
commit 528b0d99a2

View File

@ -568,8 +568,7 @@ QString Settings::getAppDataDirPath()
// TODO: change QStandardPaths::DataLocation to AppDataLocation when upgrate Qt to 5.4+
// For now we need support Qt 5.3, so we use deprecated DataLocation
// BTW, it's not a big deal since for linux AppDataLocation and DataLocation are equal
return QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation)
+ QDir::separator() + "tox")+QDir::separator();
return QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation))+QDir::separator();
#endif
}
@ -587,8 +586,7 @@ QString Settings::getAppCacheDirPath()
return QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + QDir::separator()
+ "Library" + QDir::separator() + "Application Support" + QDir::separator() + "Tox")+QDir::separator();
#else
return QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation)
+ QDir::separator() + "tox")+QDir::separator();
return QDir::cleanPath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))+QDir::separator();
#endif
}