r24504 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 18 12:41:39 UTC 2021


Author: jghali
Date: Thu Feb 18 12:41:39 2021
New Revision: 24504

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

Modified:
    trunk/Scribus/scribus/ui/stylemanager.cpp
    trunk/Scribus/scribus/ui/stylemanager.h

Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24504&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp	Thu Feb 18 12:41:39 2021
@@ -36,8 +36,7 @@
 const QString StyleManager::SEPARATOR = "$$$$"; // dumb but it works
 
 StyleManager::StyleManager(QWidget *parent, const char *name)
-	: ScrPaletteBase(parent, name), m_item(nullptr), m_widget(nullptr),
-	m_shortcutWidget(nullptr), m_isEditMode(true), m_doc(nullptr)
+	: ScrPaletteBase(parent, name)
 {
 	setupUi(this);
 	styleView->hideColumn(SHORTCUT_COL);
@@ -55,8 +54,6 @@
 	if (pname.isEmpty())
 		pname = "styleManager";
 	m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
-	m_isEditMode = true;
-	m_isStoryEditMode = false;
 	m_editPosition.setX(m_prefs->getInt("eX", x()));
 	m_editPosition.setY(m_prefs->getInt("eY", y()));
 
@@ -66,8 +63,6 @@
 	deleteButton->setEnabled(false);
 	m_rightClickPopup->setEnabled(false);
 	m_newPopup->setEnabled(false);
-	
-	m_selectedStyleAction = nullptr;
 
 	connect(m_newPopup, SIGNAL(triggered(QAction*)), this, SLOT(slotNewPopup(QAction*)));
 	connect(okButton, SIGNAL(clicked()), this, SLOT(slotOk()));

Modified: trunk/Scribus/scribus/ui/stylemanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24504&path=/trunk/Scribus/scribus/ui/stylemanager.h
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.h	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.h	Thu Feb 18 12:41:39 2021
@@ -49,23 +49,23 @@
 
 private:
 	QList<StyleItem*>   m_items;
-	StyleItem          *m_item;
-	QGridLayout        *m_layout;
-	QTabWidget         *m_widget;
-	ShortcutWidget     *m_shortcutWidget;
+	StyleItem          *m_item { nullptr };
+	QGridLayout        *m_layout { nullptr };
+	QTabWidget         *m_widget { nullptr };
+	ShortcutWidget     *m_shortcutWidget { nullptr };
 	QString             m_currentType;
-	QMenu              *m_newPopup;
-	QMenu              *m_rightClickPopup;
+	QMenu              *m_newPopup { nullptr };
+	QMenu              *m_rightClickPopup { nullptr };
 
-	QAction            *m_rcpNewId;
-	QAction            *m_rcpDeleteId;
-	QAction            *m_rcpEditId;
-	QAction            *m_rcpCloneId;
+	QAction            *m_rcpNewId { nullptr };
+	QAction            *m_rcpDeleteId { nullptr };
+	QAction            *m_rcpEditId { nullptr };
+	QAction            *m_rcpCloneId { nullptr };
 //	QAction            *m_rcpToScrapId;
-	ScrAction	*m_selectedStyleAction;
+	ScrAction	*m_selectedStyleAction { nullptr };
 
-	bool                m_isEditMode;
-	bool                m_isStoryEditMode;
+	bool                m_isEditMode { true };
+	bool                m_isStoryEditMode { false };
 	QPoint              m_editPosition;
 	QString             m_rcStyle;
 	QString             m_rcType;
@@ -74,8 +74,8 @@
 	QString             m_doneText;
 	QString             m_editText;
 
-	ScribusDoc         *m_doc;
-	PrefsContext       *m_prefs;
+	ScribusDoc         *m_doc { nullptr };
+	PrefsContext       *m_prefs { nullptr };
 
 	QMap<QString, QPointer<ScrAction> > m_styleActions;
 




More information about the scribus-commit mailing list