r23573 by craig - Code cleanup in ScribusCore

scribus-commit scribus-commit at lists.scribus.net
Wed Apr 8 22:15:41 UTC 2020


Author: craig
Date: Wed Apr  8 22:15:41 2020
New Revision: 23573

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23573
Log:
Code cleanup in ScribusCore

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

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23573&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp	(original)
+++ trunk/Scribus/scribus/scribuscore.cpp	Wed Apr  8 22:15:41 2020
@@ -50,23 +50,8 @@
 
 ScribusCore::ScribusCore() : defaultEngine(colorMgmtEngineFactory.createDefaultEngine()),
 							m_iconManager(IconManager::instance()),
-							 m_prefsManager(PrefsManager::instance())
-{
-	m_ScribusInitialized = false;
-	m_currScMW = 0;
-
-	pluginManager = nullptr;
-	fileWatcher = nullptr;
-
-	m_SplashScreen = nullptr;
-	m_undoManager = nullptr;
-
-	m_UseGUI = false;
-	m_HaveCMS = false;
-	m_HaveGS = false;
-	m_HavePngAlpha = false;
-	m_HaveTiffSep = false;
-
+							m_prefsManager(PrefsManager::instance())
+{
 	ScColorMgmtStrategy strategy;
 	strategy.setUseBlackPointCompensation(true);
 	strategy.setUseBlackPreservation(false);
@@ -94,7 +79,7 @@
 
 int ScribusCore::init(bool useGUI, const QList<QString>& filesToUse)
 {
-	m_UseGUI=useGUI;
+	m_useGUI=useGUI;
 	m_Files=filesToUse;
 #if !defined(NDEBUG) && !defined(_WIN32)
 	qInstallMessageHandler( & abort_on_error );
@@ -124,7 +109,7 @@
 		return(EXIT_FAILURE);
 	
 	closeSplash();
-	m_ScribusInitialized=true;
+	m_scribusInitialized=true;
 	connect(ScQApp, SIGNAL(lastWindowClosed()), ScQApp, SLOT(quit()));
 
 	scribus->show();
@@ -197,14 +182,14 @@
 		m_prefsManager.appPrefs.uiPrefs.iconSet=m_iconManager.activeSetBasename();
 	}
 
-	m_HaveGS = testGSAvailability();
-	m_HavePngAlpha = testGSDeviceAvailability("pngalpha");
-	m_HaveTiffSep = testGSDeviceAvailability("tiffsep");
+	m_haveGS = testGSAvailability();
+	m_havePNGAlpha = testGSDeviceAvailability("pngalpha");
+	m_haveTiffSep = testGSDeviceAvailability("tiffsep");
 	setSplashStatus( tr("Initializing Plugins") );
 	pluginManager->initPlugs();
 	
 	ScCore->setSplashStatus( tr("Reading Color Profiles") );
-	m_HaveCMS = false;
+	m_haveCMS = false;
 	getCMSProfiles(showProfileInfo);
 	initCMS();
 
@@ -261,7 +246,7 @@
 
 bool ScribusCore::usingGUI() const
 {
-	return m_UseGUI;
+	return m_useGUI;
 }
 
 bool ScribusCore::isMacGUI() const
@@ -325,9 +310,9 @@
 		}
 	}
 	if ((!PrinterProfiles.isEmpty()) && (!InputProfiles.isEmpty()) && (!MonitorProfiles.isEmpty()))
-		m_HaveCMS = true;
+		m_haveCMS = true;
 	else
-		m_HaveCMS = false;
+		m_haveCMS = false;
 }
 
 void ScribusCore::getCMSProfilesDir(const QString& pfad, bool showInfo, bool recursive)
@@ -511,7 +496,7 @@
 
 void ScribusCore::initCMS()
 {
-	if (!m_HaveCMS)
+	if (!m_haveCMS)
 		return;
 
 	ProfilesL::Iterator ip;
@@ -601,9 +586,9 @@
 
 void ScribusCore::recheckGS()
 {
-	m_HaveGS = testGSAvailability();
-	m_HavePngAlpha = testGSDeviceAvailability("pngalpha");
-	m_HaveTiffSep = testGSDeviceAvailability("tiffsep");
+	m_haveGS = testGSAvailability();
+	m_havePNGAlpha = testGSDeviceAvailability("pngalpha");
+	m_haveTiffSep = testGSDeviceAvailability("tiffsep");
 }
 
 bool ScribusCore::fileWatcherActive() const

Modified: trunk/Scribus/scribus/scribuscore.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23573&path=/trunk/Scribus/scribus/scribuscore.h
==============================================================================
--- trunk/Scribus/scribus/scribuscore.h	(original)
+++ trunk/Scribus/scribus/scribuscore.h	Wed Apr  8 22:15:41 2020
@@ -66,7 +66,7 @@
 	*/	
 	int init(bool useGUI, const QList<QString>& filesToUse);
 	int initScribusCore(bool showSplash, bool showFontInfo, bool showProfileInfo, const QString& newGuiLanguage);
-	bool initialized() const {return m_ScribusInitialized;}
+	bool initialized() const {return m_scribusInitialized;}
 	const QString& getGuiLanguage() const;
 
 	void initSplash(bool showSplash);
@@ -87,10 +87,10 @@
 	* @retval bool true if we are on Qt/Win
 	*/
 	bool isWinGUI() const;
-	bool haveCMS() const {return m_HaveCMS;}
-	bool haveGS() const {return m_HaveGS;}
-	bool havePNGAlpha() const {return m_HavePngAlpha;}
-	bool haveTIFFSep() const {return m_HaveTiffSep;}
+	bool haveCMS() const {return m_haveCMS;}
+	bool haveGS() const {return m_haveGS;}
+	bool havePNGAlpha() const {return m_havePNGAlpha;}
+	bool haveTIFFSep() const {return m_haveTiffSep;}
 	void getCMSProfiles(bool showInfo);
 	void getCMSProfilesDir(const QString& pfad, bool showInfo, bool recursive);
 	void InitDefaultColorTransforms();
@@ -101,8 +101,8 @@
 	//Main Window members
 	ScribusMainWindow* primaryMainWindow();
 	
-	PluginManager* pluginManager;	
-	FileWatcher* fileWatcher;
+	PluginManager* pluginManager {nullptr};
+	FileWatcher* fileWatcher {nullptr};
 	
 	ProfilesL InputProfiles;
 	ProfilesL InputProfilesCMYK;
@@ -128,20 +128,19 @@
 protected:
 	void initCMS();
 	
+	IconManager& m_iconManager;
+	PrefsManager& m_prefsManager;
+	QList<QString> m_Files;
 	QList<ScribusMainWindow*> m_ScMWList;
-	int m_currScMW;
-	
-	ScSplashScreen *m_SplashScreen;
-	IconManager& m_iconManager;
-	UndoManager *m_undoManager;
-	PrefsManager& m_prefsManager;
-	bool m_ScribusInitialized;
-	bool m_UseGUI;
-	QList<QString> m_Files;
-	bool m_HaveCMS;
-	bool m_HaveGS;
-	bool m_HavePngAlpha;
-	bool m_HaveTiffSep;
+	ScSplashScreen *m_SplashScreen {nullptr};
+	UndoManager *m_undoManager {nullptr};
+	bool m_haveCMS {false};
+	bool m_haveGS {false};
+	bool m_havePNGAlpha {false};
+	bool m_haveTiffSep {false};
+	bool m_scribusInitialized {false};
+	bool m_useGUI {false};
+	int m_currScMW {0};
 };
 
 #endif




More information about the scribus-commit mailing list