r20946 by craig -

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 9 14:49:12 UTC 2016


Author: craig
Date: Tue Feb  9 14:49:12 2016
New Revision: 20946

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20946
Log:
coverity #1350637: Unitialised pointer field

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

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20946&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp	(original)
+++ trunk/Scribus/scribus/prefsmanager.cpp	Tue Feb  9 14:49:12 2016
@@ -64,11 +64,12 @@
 extern ScribusQApp* ScQApp;
 extern bool emergencyActivated;
 
-PrefsManager* PrefsManager::_instance = 0;
-
-PrefsManager::PrefsManager(QObject *parent)
- : QObject(parent),
- m_firstTimeIgnoreOldPrefs(false)
+PrefsManager* PrefsManager::m_instance = 0;
+
+PrefsManager::PrefsManager(QObject *parent) : QObject(parent),
+	prefsFile(0),
+	m_importingFrom12(false),
+	m_firstTimeIgnoreOldPrefs(false)
 {
 }
 
@@ -80,17 +81,17 @@
 
 PrefsManager* PrefsManager::instance()
 {
-	if (_instance == 0)
-		_instance = new PrefsManager();
-
-	return _instance;
+	if (m_instance == 0)
+		m_instance = new PrefsManager();
+
+	return m_instance;
 }
 
 void PrefsManager::deleteInstance()
 {
-	if (_instance)
-		delete _instance;
-	_instance = 0;
+	if (m_instance)
+		delete m_instance;
+	m_instance = 0;
 }
 
 

Modified: trunk/Scribus/scribus/prefsmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20946&path=/trunk/Scribus/scribus/prefsmanager.h
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.h	(original)
+++ trunk/Scribus/scribus/prefsmanager.h	Tue Feb  9 14:49:12 2016
@@ -213,7 +213,7 @@
 	* PrefsManager is singleton and the instance can be queried with the method
 	* instance().
 	*/
-	static PrefsManager* _instance;
+	static PrefsManager* m_instance;
 
 	QString m_prefsLocation;
 	bool m_importingFrom12;




More information about the scribus-commit mailing list