r21028 by craig -

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 23 21:25:04 UTC 2016


Author: craig
Date: Tue Feb 23 21:25:04 2016
New Revision: 21028

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21028
Log:
Add new function to get the user help files directory

Modified:
    trunk/Scribus/scribus/scpaths.cpp
    trunk/Scribus/scribus/scpaths.h

Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21028&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp	(original)
+++ trunk/Scribus/scribus/scpaths.cpp	Tue Feb 23 21:25:04 2016
@@ -545,6 +545,17 @@
 	return userDictDirectory.absolutePath()+"/";
 }
 
+QString ScPaths::getUserHelpFilesDir(bool createIfNotExists)
+{
+	QDir userHelpDocsDirectory(getApplicationDataDir() + "helpfiles/");
+	if(createIfNotExists)
+	{
+		if (!userHelpDocsDirectory.exists())
+			userHelpDocsDirectory.mkpath(userHelpDocsDirectory.absolutePath());
+	}
+	return userHelpDocsDirectory.absolutePath()+"/";
+}
+
 QString ScPaths::getUserDocumentDir(void)
 {
 #if defined(_WIN32)

Modified: trunk/Scribus/scribus/scpaths.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21028&path=/trunk/Scribus/scribus/scpaths.h
==============================================================================
--- trunk/Scribus/scribus/scpaths.h	(original)
+++ trunk/Scribus/scribus/scpaths.h	Tue Feb 23 21:25:04 2016
@@ -76,6 +76,8 @@
 	static QString getUserDictDir(ScPaths::DictType dictType, bool createIfNotExists);
 	/** @brief Return path to application data dir for downloaded fonts*/
 	static QString getUserFontDir(bool createIfNotExists);
+	/** @brief Return path to application data dir for downloaded docs*/
+	static QString getUserHelpFilesDir(bool createIfNotExists);
 	/** @brief Return path to image cache dir*/
 	static QString getImageCacheDir(void);
 	/** @brief Return path to plugin data dir*/




More information about the scribus-commit mailing list