r23281 by jghali - Fix initialization order warning

scribus-commit scribus-commit at lists.scribus.net
Sun Oct 27 14:26:33 UTC 2019


Author: jghali
Date: Sun Oct 27 14:26:33 2019
New Revision: 23281

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23281
Log:
Fix initialization order warning

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

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23281&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Sun Oct 27 14:26:33 2019
@@ -104,10 +104,8 @@
 
 FontComboH::FontComboH(QWidget* parent, bool labels) :
 		QWidget(parent),
-		fontFaceLabel(nullptr),
-		fontStyleLabel(nullptr),
-		showLabels(labels),
-		prefsManager(PrefsManager::instance())
+		prefsManager(PrefsManager::instance()),
+		showLabels(labels)
 {
 	currDoc = nullptr;
 	ttfFont = IconManager::instance().loadPixmap("font_truetype16.png");

Modified: trunk/Scribus/scribus/ui/fontcombo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23281&path=/trunk/Scribus/scribus/ui/fontcombo.h
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.h	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.h	Sun Oct 27 14:26:33 2019
@@ -88,19 +88,20 @@
 	void styleSelected(int id);
 
 protected:
-	QComboBox* fontFamily;
-	QComboBox* fontStyle;
-	QLabel *fontFaceLabel;
-	QLabel *fontStyleLabel;
+	QComboBox* fontFamily { nullptr };
+	QComboBox* fontStyle { nullptr };
+	QLabel *fontFaceLabel { nullptr };
+	QLabel *fontStyleLabel { nullptr };
+	QGridLayout* fontComboLayout { nullptr };
 	PrefsManager& prefsManager;
-	ScribusDoc *currDoc;
-	bool isForAnnotation, isForSubstitute;
+	ScribusDoc *currDoc { nullptr };
+	bool showLabels { false };
+	bool isForAnnotation { true };  // this is merely to ensure that the list is rebuilt
+	bool isForSubstitute { false };
 	QPixmap ttfFont;
 	QPixmap otfFont;
 	QPixmap psFont;
 	QPixmap substFont;
-	QGridLayout* fontComboLayout;
-	bool showLabels;
 };
 
 // based on Qfontcombobox class from Qt project




More information about the scribus-commit mailing list