r20954 by craig -

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 9 18:45:19 UTC 2016


Author: craig
Date: Tue Feb  9 18:45:19 2016
New Revision: 20954

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20954
Log:
coverity #1350779: Uninitialised pointer field

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

Modified: trunk/Scribus/scribus/ui/sctoolbar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20954&path=/trunk/Scribus/scribus/ui/sctoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctoolbar.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctoolbar.cpp	Tue Feb  9 18:45:19 2016
@@ -37,15 +37,18 @@
 #include "prefsfile.h"
 #include "prefsmanager.h"
 
-ScToolBar::ScToolBar(const QString& name, const QString &prefName, QMainWindow *parent, Qt::Orientation o)
-: QToolBar(name, parent),
-  m_name(QString("ToolBar-%1").arg(prefName))
+ScToolBar::ScToolBar(const QString& name, const QString &prefName, QMainWindow *parent, Qt::Orientation o) : QToolBar(name, parent),
+	m_name(QString("ToolBar-%1").arg(prefName)),
+	floatOrientation(Qt::Horizontal),
+	prefsButton(0),
+	parentMW(parent),
+	dockTop(false),
+	dockRight(false),
+	dockBottom(false),
+	dockLeft(false)
 {
 	m_prefs=PrefsManager::instance()->prefsFile->getContext(m_name);
 	setObjectName(prefName);
-// 	hide();
-	parentMW=parent;
-	
 	setAllowedAreas(Qt::AllToolBarAreas);
 	this->setIconSize(QSize(16,16));
 	/*
@@ -72,7 +75,7 @@
 	if (m_prefs->contains("FloatOrientation")) // set float orientation
 	{
 		floatOrientation = m_prefs->getInt("FloatOrientation", 1) == Hor ?
-		                   Qt::Horizontal : Qt::Vertical;
+						   Qt::Horizontal : Qt::Vertical;
 	}
 	else
 	{

Modified: trunk/Scribus/scribus/ui/sctoolbar.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20954&path=/trunk/Scribus/scribus/ui/sctoolbar.h
==============================================================================
--- trunk/Scribus/scribus/ui/sctoolbar.h	(original)
+++ trunk/Scribus/scribus/ui/sctoolbar.h	Tue Feb  9 18:45:19 2016
@@ -75,9 +75,6 @@
 	PrefsContext *m_prefs;
 	Qt::Orientation floatOrientation;
 	QToolButton *prefsButton;
-// 	QMenu  *popup;
-// 	QMenu  *dockMenu;
-// 	QMenu  *orientationMenu;
 	QMainWindow* parentMW;
 	bool dockTop;
 	bool dockRight;




More information about the scribus-commit mailing list