r21520 by craig - Use QStandardPaths in ScPaths to find the user document directory
scribus-commit
scribus-commit at lists.scribus.net
Fri Nov 18 23:29:05 UTC 2016
Author: craig
Date: Fri Nov 18 23:29:04 2016
New Revision: 21520
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21520
Log:
Use QStandardPaths in ScPaths to find the user document directory
Modified:
trunk/Scribus/scribus/scpaths.cpp
Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21520&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp (original)
+++ trunk/Scribus/scribus/scpaths.cpp Fri Nov 18 23:29:04 2016
@@ -9,6 +9,7 @@
#include <QDebug>
#include <QDir>
#include <QProcess>
+#include <QStandardPaths>
#include "scconfig.h"
@@ -573,12 +574,10 @@
QString ScPaths::getUserDocumentDir(void)
{
-#if defined(_WIN32)
- QString userDocs = getSpecialDir(CSIDL_PERSONAL);
- if (QDir(userDocs).exists())
+ QString userDocs = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
+ if (QDir(userDocs).exists())
return userDocs;
-#endif
- return (QDir::homePath() + "/");
+ return QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
}
QString ScPaths::getTempFileDir(void)
More information about the scribus-commit
mailing list