r22601 by craig - clazy and clang fixes, part 3

scribus-commit scribus-commit at lists.scribus.net
Sun Aug 5 09:27:44 UTC 2018


Author: craig
Date: Sun Aug  5 09:27:44 2018
New Revision: 22601

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22601
Log:
clazy and clang fixes, part 3

Modified:
    trunk/Scribus/scribus/ui/polyprops.cpp
    trunk/Scribus/scribus/ui/preferencesdialog.cpp
    trunk/Scribus/scribus/ui/preferencesdialog.h
    trunk/Scribus/scribus/ui/prefs_externaltools.cpp
    trunk/Scribus/scribus/ui/prefs_guides.cpp
    trunk/Scribus/scribus/ui/prefs_itemtools.cpp
    trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
    trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
    trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
    trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
    trunk/Scribus/scribus/ui/prefs_tableofcontents.h
    trunk/Scribus/scribus/ui/prefspanel.cpp
    trunk/Scribus/scribus/ui/printdialog.cpp
    trunk/Scribus/scribus/ui/propertiespalette.cpp
    trunk/Scribus/scribus/ui/propertiespalette_group.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp
    trunk/Scribus/scribus/ui/propertiespalette_line.cpp
    trunk/Scribus/scribus/ui/propertiespalette_table.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.h
    trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
    trunk/Scribus/scribus/ui/propertywidget_distance.cpp
    trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
    trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
    trunk/Scribus/scribus/ui/sctoolbar.cpp
    trunk/Scribus/scribus/ui/sctreewidget.cpp
    trunk/Scribus/scribus/ui/sctreewidget.h
    trunk/Scribus/scribus/ui/smcellstyle.cpp
    trunk/Scribus/scribus/ui/smcellstylewidget.cpp
    trunk/Scribus/scribus/ui/smcstylewidget.cpp
    trunk/Scribus/scribus/ui/smlinestyle.cpp
    trunk/Scribus/scribus/ui/smstyleimport.cpp
    trunk/Scribus/scribus/ui/smtablestyle.cpp
    trunk/Scribus/scribus/ui/smtablestylewidget.cpp
    trunk/Scribus/scribus/ui/smtextstyles.cpp
    trunk/Scribus/scribus/ui/spiralvectordialog.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp
    trunk/Scribus/scribus/ui/stylemanager.cpp
    trunk/Scribus/scribus/ui/symbolpalette.cpp
    trunk/Scribus/scribus/ui/tabpdfoptions.cpp
    trunk/Scribus/scribus/ui/tabruler.cpp
    trunk/Scribus/scribus/ui/textpalette.cpp
    trunk/Scribus/scribus/ui/transparencypalette.cpp
    trunk/Scribus/scribus/ui/unicodesearch.cpp
    trunk/Scribus/scribus/ui/weldedit.cpp
    trunk/Scribus/scribus/undogui.cpp
    trunk/Scribus/scribus/undomanager.cpp
    trunk/Scribus/scribus/undostack.cpp
    trunk/Scribus/scribus/undostate.cpp
    trunk/Scribus/scribus/undotransaction.cpp

Modified: trunk/Scribus/scribus/ui/polyprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/polyprops.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/polyprops.cpp	(original)
+++ trunk/Scribus/scribus/ui/polyprops.cpp	Sun Aug  5 09:27:44 2018
@@ -14,7 +14,7 @@
 #include "commonstrings.h"
 #include "iconmanager.h"
 
-PolyVectorDialog::PolyVectorDialog(QWidget* parent, int polyC, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot, double polyOuterCurvature) : ScrPaletteBase( parent, "PolyVectorDialog", false, 0 )
+PolyVectorDialog::PolyVectorDialog(QWidget* parent, int polyC, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot, double polyOuterCurvature) : ScrPaletteBase( parent, "PolyVectorDialog", false, nullptr )
 {
 	setWindowTitle( tr( "Polygon Properties" ) );
 	setWindowIcon(IconManager::instance()->loadIcon("AppIcon.png"));
@@ -24,7 +24,7 @@
 	polyWidget = new PolygonWidget(this, polyC, polyF, polyS, polyR, polyCurvature, polyInnerRot, polyOuterCurvature, true);
 	PolygonPropsLayout->addWidget( polyWidget );
 	// signals and slots connections
-	connect(polyWidget, SIGNAL(NewVectors(int, double, bool, double, double, double, double)), this, SIGNAL(NewVectors(int, double, bool, double, double, double, double)));
+	connect(polyWidget, SIGNAL(NewVectors(int,double,bool,double,double,double,double)), this, SIGNAL(NewVectors(int,double,bool,double,double,double,double)));
 	connect (this, SIGNAL(accepted()), this, SIGNAL(endEdit()));
 }
 

Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp	Sun Aug  5 09:27:44 2018
@@ -23,31 +23,31 @@
 
 PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsData, ScribusDoc* doc)
 	: QDialog(parent),
-	prefs_ColorManagement(0),
-	prefs_Display(0),
-	prefs_DocumentInformation(0),
-	prefs_DocumentItemAttributes(0),
-	prefs_DocumentSections(0),
-	prefs_DocumentSetup(0),
-	prefs_ExternalTools(0),
-	prefs_Fonts(0),
-	prefs_Guides(0),
-	prefs_Hyphenator(0),
-	prefs_ImageCache(0),
-	prefs_ItemTools(0),
-	prefs_KeyboardShortcuts(0),
-	prefs_Miscellaneous(0),
-	prefs_OperatorTools(0),
-	prefs_PDFExport(0),
-	prefs_PageSizes(0),
-	prefs_Paths(0),
-	prefs_Plugins(0),prefs_PreflightVerifier(0),
-	prefs_Printer(0),
-	prefs_Scrapbook(0),
-//	prefs_Spelling(0),
-	prefs_TableOfContents(0),
-	prefs_Typography(0),
-	prefs_UserInterface(0),
+	prefs_ColorManagement(nullptr),
+	prefs_Display(nullptr),
+	prefs_DocumentInformation(nullptr),
+	prefs_DocumentItemAttributes(nullptr),
+	prefs_DocumentSections(nullptr),
+	prefs_DocumentSetup(nullptr),
+	prefs_ExternalTools(nullptr),
+	prefs_Fonts(nullptr),
+	prefs_Guides(nullptr),
+	prefs_Hyphenator(nullptr),
+	prefs_ImageCache(nullptr),
+	prefs_ItemTools(nullptr),
+	prefs_KeyboardShortcuts(nullptr),
+	prefs_Miscellaneous(nullptr),
+	prefs_OperatorTools(nullptr),
+	prefs_PDFExport(nullptr),
+	prefs_PageSizes(nullptr),
+	prefs_Paths(nullptr),
+	prefs_Plugins(nullptr),prefs_PreflightVerifier(nullptr),
+	prefs_Printer(nullptr),
+	prefs_Scrapbook(nullptr),
+//	prefs_Spelling(nullptr),
+	prefs_TableOfContents(nullptr),
+	prefs_Typography(nullptr),
+	prefs_UserInterface(nullptr),
 	counter(0),
 	m_Doc(doc)
 {
@@ -55,7 +55,7 @@
 	setObjectName(QString::fromLocal8Bit("PreferencesDialog"));
 	setupListWidget();
 	IconManager* im = IconManager::instance();
-	while (prefsStackWidget->currentWidget()!=0)
+	while (prefsStackWidget->currentWidget()!=nullptr)
 		prefsStackWidget->removeWidget(prefsStackWidget->currentWidget());
 
 	applyButton->hide();
@@ -286,7 +286,7 @@
 	preferencesTypeList->clear();
 }
 
-int PreferencesDialog::addItem(QString name, QPixmap icon, QWidget* tab)
+int PreferencesDialog::addItem(const QString& name, const QPixmap& icon, QWidget* tab)
 {
 	//TODO: Can we avoid using this name and duplicating strings by getting it from the tab UIs
 	QListWidgetItem* newItem = new QListWidgetItem(icon, name, preferencesTypeList);
@@ -305,7 +305,7 @@
 
 void PreferencesDialog::itemSelected(QListWidgetItem* ic)
 {
-	if (ic == 0)
+	if (ic == nullptr)
 		return;
 	if (stackWidgetMap.contains(ic))
 	{
@@ -362,8 +362,8 @@
 	// Scan for plugins that provide a prefs widget, and add it to the
 	// prefs dialog.
 	// For each plugin, enabled or not:
-	ScPlugin* plugin = 0;
-	Prefs_Pane* panel = 0;
+	ScPlugin* plugin = nullptr;
+	Prefs_Pane* panel = nullptr;
 	QString panelCaption;
 	QPixmap panelIcon;
 

Modified: trunk/Scribus/scribus/ui/preferencesdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/preferencesdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.h	(original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.h	Sun Aug  5 09:27:44 2018
@@ -80,7 +80,7 @@
 
 
 	protected:
-		int addItem(QString name, QPixmap icon, QWidget *tab);
+		int addItem(const QString& name, const QPixmap& icon, QWidget *tab);
 		void setupListWidget();
 		void arrangeIcons();
 		void initPreferenceValues();

Modified: trunk/Scribus/scribus/ui/prefs_externaltools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_externaltools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_externaltools.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_externaltools.cpp	Sun Aug  5 09:27:44 2018
@@ -164,7 +164,7 @@
 			uniconvertorLineEdit->setText("uniconv");
 		else
 		{
-			ScMessageBox::warning(0, CommonStrings::trWarning, tr("Uniconvertor executable not found!"));
+			ScMessageBox::warning(nullptr, CommonStrings::trWarning, tr("Uniconvertor executable not found!"));
 			uniconvertorLineEdit->setText("");
 		}
 	}

Modified: trunk/Scribus/scribus/ui/prefs_guides.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_guides.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_guides.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_guides.cpp	Sun Aug  5 09:27:44 2018
@@ -53,7 +53,7 @@
 	int renderStackCount = renderStackOrder.count();
 	for (int r = renderStackCount - 1; r > -1; r--)
 	{
-		QListWidgetItem *item(0);
+		QListWidgetItem *item(nullptr);
 		int it = renderStackOrder[r];
 		if (it == 4)
 			item = new QListWidgetItem( tr("Content Objects"), guidePlacementListBox);
@@ -121,7 +121,7 @@
 	int renderStackCount = renderStackOrder.count();
 	for (int r = renderStackCount - 1; r > -1; r--)
 	{
-		QListWidgetItem *item(0);
+		QListWidgetItem *item(nullptr);
 		int it = renderStackOrder[r];
 		if (it == 4)
 			item = new QListWidgetItem( tr("Content Objects"), guidePlacementListBox);

Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp	Sun Aug  5 09:27:44 2018
@@ -175,7 +175,7 @@
 
 	lineFillColorShadingSpinBox->setValue(prefsData->itemToolPrefs.lineColorShade);
 	lineStyleComboBox->setCurrentIndex(static_cast<int>(prefsData->itemToolPrefs.lineStyle) - 1);
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		lineStartArrowComboBox->rebuildList(&m_doc->arrowStyles());
 		lineEndArrowComboBox->rebuildList(&m_doc->arrowStyles());
@@ -372,7 +372,7 @@
 	si.setText( tr("Woven silk pyjamas exchanged for blue quartz"));
 	if (textFrameFillColorComboBox->currentText() != CommonStrings::tr_NoneColor)
 	{
-		if (m_doc != 0)
+		if (m_doc != nullptr)
 		{
 			si.setBgColor(m_doc->PageColors[textFrameFillColorComboBox->currentText()].getRawRGBColor());
 		}
@@ -389,7 +389,7 @@
 
 	if (textColorComboBox->currentText() != CommonStrings::tr_NoneColor)
 	{
-		if (m_doc != 0)
+		if (m_doc != nullptr)
 		{
 			si.setTxColor(m_doc->PageColors[textColorComboBox->currentText()].getRawRGBColor());
 		}

Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.cpp	Sun Aug  5 09:27:44 2018
@@ -68,8 +68,7 @@
 
 	clearSearchButton->setIcon(IconManager::instance()->loadIcon("clear_right.png"));
 	// signals and slots connections
-	connect( keyTable, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
-			 this, SLOT(dispKey(QTreeWidgetItem *, QTreeWidgetItem *)));
+	connect( keyTable, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(dispKey(QTreeWidgetItem*, QTreeWidgetItem*)));
 	connect( noKey, SIGNAL(clicked()), this, SLOT(setNoKey()));
 	connect( setKeyButton, SIGNAL(clicked()), this, SLOT(setKeyText()));
 	connect( loadSetButton, SIGNAL(clicked()), this, SLOT(loadKeySetFile()));
@@ -77,7 +76,7 @@
 	connect( exportSetButton, SIGNAL(clicked()), this, SLOT(exportKeySetFile()));
 	connect( resetSetButton, SIGNAL(clicked()), this, SLOT(resetKeySet()));
 	connect( clearSearchButton, SIGNAL(clicked()), this, SLOT(clearSearchString()));
-	connect( searchTextLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(applySearch(const QString&)));
+	connect( searchTextLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(applySearch(const QString&)));
 
 }
 
@@ -95,7 +94,7 @@
 	loadableSets->clear();
 	loadableSets->addItems(scanForSets());
 	insertActions();
-	dispKey(0);
+	dispKey(nullptr);
 }
 
 void Prefs_KeyboardShortcuts::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
@@ -107,7 +106,7 @@
 {
 	if (noKey->isChecked())
 	{
-		if (selectedLVI!=0)
+		if (selectedLVI!=nullptr)
 		{
 			selectedLVI->setText(1,"");
 			keyMap[lviToActionMap[selectedLVI]].keySequence=QKeySequence();
@@ -140,7 +139,7 @@
 		exportKeySet(s);
 }
 
-void Prefs_KeyboardShortcuts::importKeySet(QString filename)
+void Prefs_KeyboardShortcuts::importKeySet(const QString& filename)
 {
 	searchTextLineEdit->clear();
 	QFileInfo fi = QFileInfo(filename);
@@ -195,7 +194,7 @@
 	insertActions();
 }
 
-bool Prefs_KeyboardShortcuts::exportKeySet(QString filename)
+bool Prefs_KeyboardShortcuts::exportKeySet(const QString& filename)
 {
 	QString exportFileName;
 	if (filename.endsWith(".xml"))
@@ -285,19 +284,19 @@
 	return QStringList();
 }
 
-QString Prefs_KeyboardShortcuts::getKeyText(QKeySequence KeyC)
+QString Prefs_KeyboardShortcuts::getKeyText(const QKeySequence& KeyC)
 {
 	return KeyC.toString();
 }
 
-QString Prefs_KeyboardShortcuts::getTrKeyText(QKeySequence KeyC)
+QString Prefs_KeyboardShortcuts::getTrKeyText(const QKeySequence& KeyC)
 {
 	return KeyC.toString(QKeySequence::NativeText);
 }
 
 void Prefs_KeyboardShortcuts::setKeyText()
 {
-	if (keyTable->currentItem()==0)
+	if (keyTable->currentItem()==nullptr)
 	{
 		setKeyButton->setChecked(false);
 		return;
@@ -338,8 +337,8 @@
 		currMenuLVI->setFlags(Qt::ItemIsEnabled);
 		prevMenuLVI=currMenuLVI;
 		first=true;
-		currLVI=0;
-		prevLVI=0;
+		currLVI=nullptr;
+		prevLVI=nullptr;
 		for (int j = 0; j < actionStrings.second.count(); ++j)
 		{
 			QString actionName = actionStrings.second.at(j);
@@ -383,8 +382,8 @@
 		currMenuLVI->setFlags(Qt::ItemIsEnabled);
 		prevMenuLVI=currMenuLVI;
 		first=true;
-		currLVI=0;
-		prevLVI=0;
+		currLVI=nullptr;
+		prevLVI=nullptr;
 		for (int j = 0; j < actionStrings.second.count(); ++j)
 		{
 			QString actionName = actionStrings.second.at(j);
@@ -441,7 +440,7 @@
 		releaseKeyboard();
 		setKeyButton->setChecked(false);
 	}
-	if (qlvi!=0 && lviToActionMap.contains(qlvi))
+	if (qlvi!=nullptr && lviToActionMap.contains(qlvi))
 	{
 		selectedLVI = qlvi;
 		QString actionName=lviToActionMap[qlvi];
@@ -457,12 +456,12 @@
 	{
 		noKey->setChecked(true);
 		keyDisplay->setText("");
-		selectedLVI = 0;
-	}
-	noKey->setEnabled(selectedLVI != 0);
-	userDef->setEnabled(selectedLVI != 0);
-	setKeyButton->setEnabled(selectedLVI != 0);
-	keyDisplay->setEnabled(selectedLVI != 0);
+		selectedLVI = nullptr;
+	}
+	noKey->setEnabled(selectedLVI != nullptr);
+	userDef->setEnabled(selectedLVI != nullptr);
+	setKeyButton->setEnabled(selectedLVI != nullptr);
+	keyDisplay->setEnabled(selectedLVI != nullptr);
 }
 
 bool Prefs_KeyboardShortcuts::event( QEvent* ev )

Modified: trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h	(original)
+++ trunk/Scribus/scribus/ui/prefs_keyboardshortcuts.h	Sun Aug  5 09:27:44 2018
@@ -35,8 +35,8 @@
 		void keyPressEvent(QKeyEvent *k);
 		void keyReleaseEvent(QKeyEvent *k);
 
-		static QString getKeyText(QKeySequence KeyC);
-		static QString getTrKeyText(QKeySequence KeyC);
+		static QString getKeyText(const QKeySequence& KeyC);
+		static QString getTrKeyText(const QKeySequence& KeyC);
 
 	public slots:
 		void languageChange();
@@ -53,8 +53,8 @@
 	int keyCode;
 
 	void insertActions();
-	void importKeySet(QString);
-	bool exportKeySet(QString);
+	void importKeySet(const QString&);
+	bool exportKeySet(const QString&);
 	QStringList scanForSets();
 	bool checkKey(int code);
 	QString getAction(int code);

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	Sun Aug  5 09:27:44 2018
@@ -150,9 +150,9 @@
 
 QListWidgetItem* Prefs_PDFExport::addFontItem(QString fontName, QListWidget* fontList)
 {
-	QListWidgetItem* item = 0;
+	QListWidgetItem* item = nullptr;
 	if (!AllFonts.contains(fontName))
-		return 0;
+		return nullptr;
 
 	const ScFace face = AllFonts.value(fontName);
 	if (face.isReplacement())
@@ -290,7 +290,7 @@
 	maxExportResolutionSpinBox->setEnabled(prefsData->pdfPrefs.RecalcPic);
 
 	fontEmbeddingCombo->setEmbeddingMode(prefsData->pdfPrefs.FontEmbedding);
-	if (m_doc != 0 && exportingPDF)
+	if (m_doc != nullptr && exportingPDF)
 	{
 //	Build a list of all Fonts used in Annotations;
 		PageItem *pgit;
@@ -352,7 +352,7 @@
 			subsettedFontsListWidget->clear();
 			for (int fe = 0; fe < docFonts.count(); ++ fe)
 			{
-				QString fontName = docFonts.at(fe);
+				const QString& fontName = docFonts.at(fe);
 				if (Opts.EmbedList.contains(fontName))
 					addFontItem(fontName, embeddedFontsListWidget);
 				else
@@ -474,7 +474,7 @@
 	QString tp(prefsData->pdfPrefs.SolidProf);
 	if (!ScCore->InputProfiles.contains(tp))
 	{
-		if (m_doc != 0 && exportingPDF)
+		if (m_doc != nullptr && exportingPDF)
 			tp = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 		else
 			tp = defaultSolidColorRGBProfile;
@@ -495,7 +495,7 @@
 	QString tp1 = Opts.ImageProf;
 	if (!ScCore->InputProfiles.contains(tp1))
 	{
-		if (m_doc != 0 && exportingPDF)
+		if (m_doc != nullptr && exportingPDF)
 			tp1 = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 		else
 			tp1 = defaultSolidColorRGBProfile;
@@ -524,7 +524,7 @@
 	QString tp3(Opts.PrintProf);
 	if (!PDFXProfiles.contains(tp3))
 	{
-		if (m_doc != 0 && exportingPDF)
+		if (m_doc != nullptr && exportingPDF)
 			tp3 = m_doc->cmsSettings().DefaultPrinterProfile;
 		else
 			tp3 = defaultPrinterProfile;
@@ -541,7 +541,7 @@
 		pdfx3InfoStringLineEdit->setText(Opts.Info);
 	else
 	{
-		if (m_doc != 0 && exporting)
+		if (m_doc != nullptr && exporting)
 		{
 			QFileInfo fi(m_doc->DocName);
 			pdfx3InfoStringLineEdit->setText(fi.fileName());
@@ -550,7 +550,7 @@
 			pdfx3InfoStringLineEdit->setText( tr("InfoString"));
 	}
 
-	if (m_doc != 0 && exportingPDF)
+	if (m_doc != nullptr && exportingPDF)
 	{
 		useDocumentBleedsCheckBox->setChecked(Opts.useDocBleeds);
 		doDocBleeds();
@@ -576,7 +576,7 @@
 	else
 		enablePDFXWidgets(false);
 
-	if (m_doc != 0  && exportingPDF)
+	if (m_doc != nullptr  && exportingPDF)
 	{
 		effectTypeComboBox->clear();
 		effectTypeComboBox->addItem( tr("No Effect"));
@@ -617,7 +617,7 @@
 		*/
 	}
 
-	if (m_doc != 0 && exportingPDF)
+	if (m_doc != nullptr && exportingPDF)
 	{
 		connect(embedAllButton, SIGNAL(clicked()), this, SLOT(EmbedAll()));
 		connect(embeddedFontsListWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SelEFont(QListWidgetItem*)));
@@ -626,7 +626,7 @@
 		connect(toSubsetButton, SIGNAL(clicked()), this, SLOT(PutToSubset()));
 		connect(fromSubsetButton, SIGNAL(clicked()), this, SLOT(RemoveSubset()));
 		connect(showPagePreviewsCheckBox, SIGNAL(clicked()), this, SLOT(PagePr()));
-		connect(effectsPageListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(SetPgEff()));
+		connect(effectsPageListWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SetPgEff()));
 		connect(effectTypeComboBox, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
 		connect(effectDirectionComboBox, SIGNAL(activated(int)), this, SLOT(ValidDI(int)));
 		connect(enabledEffectsCheckBox, SIGNAL(clicked()), this, SLOT(DoEffects()));
@@ -763,7 +763,7 @@
 {
 	exportPageListLineEdit->setEnabled( enabled );
 	exportRangeMorePushButton->setEnabled( enabled );
-	if (enabled == false)
+	if (!enabled)
 		includeBookmarksCheckBox->setChecked(false);
 }
 
@@ -797,7 +797,7 @@
 
 void Prefs_PDFExport::createPageNumberRange()
 {
-	if (m_doc!=0)
+	if (m_doc!=nullptr)
 	{
 		CreateRange cr(exportPageListLineEdit->text(), m_doc->DocPages.count(), this);
 		if (cr.exec())
@@ -839,7 +839,7 @@
 		QString tp(Opts.SolidProf);
 		if (!ScCore->InputProfiles.contains(tp))
 		{
-			if (m_doc != 0)
+			if (m_doc != nullptr)
 				tp = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp = defaultSolidColorRGBProfile;
@@ -861,7 +861,7 @@
 		QString tp1 = Opts.ImageProf;
 		if (!ScCore->InputProfiles.contains(tp1))
 		{
-			if (m_doc != 0)
+			if (m_doc != nullptr)
 				tp1 = m_doc->cmsSettings().DefaultSolidColorRGBProfile;
 			else
 				tp1 = defaultSolidColorRGBProfile;
@@ -883,7 +883,7 @@
 		//Disabling vs hiding
 		enableSolidsImagesWidgets(cmsEnabled);
 		convertSpotsToProcessCheckBox->setEnabled(true);
-		if (m_doc!=0)
+		if (m_doc!=nullptr)
 		{
 			useCustomRenderingCheckBox->setEnabled(true);
 			enableCustomRenderingWidgets(useCustomRenderingCheckBox->isChecked());
@@ -900,7 +900,7 @@
 
 void Prefs_PDFExport::enableLPI2()
 {
-	if (m_doc!=0)
+	if (m_doc!=nullptr)
 		enableCustomRenderingWidgets(useCustomRenderingCheckBox->isChecked());
 }
 
@@ -977,15 +977,14 @@
 
 void Prefs_PDFExport::enablePGI2()
 {
-	bool setter = doNotUseEmbeddedImageProfileCheckBox->isChecked() ? true : false;
+	bool setter = doNotUseEmbeddedImageProfileCheckBox->isChecked();
 	imageProfileComboBox->setEnabled(setter);
 	imageRenderingIntentComboBox->setEnabled(setter);
 }
 
 void Prefs_PDFExport::enablePG()
 {
-	bool setter = useSolidColorProfileCheckBox->isChecked() ? true : false;
-
+	bool setter = useSolidColorProfileCheckBox->isChecked();
 	solidColorProfileComboBox->setEnabled(setter);
 	solidColorRenderingIntentComboBox->setEnabled(setter);
 }
@@ -995,7 +994,7 @@
 	includeLayersCheckBox->setEnabled((i == 2) || (i == 5));
 	if (useLayersRadioButton)
 		useLayersRadioButton->setEnabled((i == 2) || (i == 5));
-	if (m_doc != 0 && exportingPDF)
+	if (m_doc != nullptr && exportingPDF)
 	{
 		int currentEff = effectTypeComboBox->currentIndex();
 		disconnect(effectTypeComboBox, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
@@ -1042,7 +1041,7 @@
 		outputIntentionComboBox->setEnabled(true);
 		useImageProfileCheckBox->setEnabled(true);
 		emit hasInfo();
-		if (m_doc != 0 && exportingPDF)
+		if (m_doc != nullptr && exportingPDF)
 		{
 			enabledEffectsCheckBox->setEnabled(true);
 			embedAllButton->setEnabled(true);
@@ -1060,7 +1059,7 @@
 		useImageProfileCheckBox->setChecked(true);
 		useImageProfileCheckBox->setEnabled(false);
 	}
-	if (m_doc != 0 && exportingPDF)
+	if (m_doc != nullptr && exportingPDF)
 	{
 //		EmbedFonts->setChecked(true);
 		EmbedAll();
@@ -1138,7 +1137,7 @@
 
 	for (int a=0; a < docFonts.count(); ++a)
 	{
-		QString fontName = docFonts.at(a);
+		const QString& fontName = docFonts.at(a);
 		if (!AllFonts[fontName].subset())
 		{
 			QListWidgetItem* item = addFontItem(fontName, embeddedFontsListWidget);
@@ -1170,7 +1169,7 @@
 
 	for (int a = 0; a < docFonts.count(); ++a)
 	{
-		QString fontName = docFonts.at(a);
+		const QString& fontName = docFonts.at(a);
 		if (AnnotationFonts.contains(fontName))
 		{
 			QListWidgetItem* item = addFontItem(fontName, embeddedFontsListWidget);
@@ -1320,7 +1319,7 @@
 		effectsPageListWidget->setCurrentRow(ci);
 	else
 		effectsPageListWidget->clearSelection();
-	connect(effectsPageListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(SetPgEff()));
+	connect(effectsPageListWidget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SetPgEff()));
 }
 
 void Prefs_PDFExport::DoDownsample()

Modified: trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_tableofcontents.cpp	Sun Aug  5 09:27:44 2018
@@ -28,12 +28,12 @@
 	//do not connect( tocListBox, SIGNAL( currentRowChanged(int) ), this, SLOT( selectToC(int) ) );
 	connect( tocAddButton, SIGNAL( clicked() ), this, SLOT( addToC() ) );
 	connect( tocDeleteButton, SIGNAL( clicked() ), this, SLOT( deleteToC() ) );
-	connect( itemAttrComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemAttributeSelected(const QString&) ) );
-	connect( itemDestFrameComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemFrameSelected(const QString&) ) );
-	connect( itemParagraphStyleComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemParagraphStyleSelected(const QString&) ) );
-	connect( itemNumberPlacementComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemPageNumberPlacedSelected(const QString&) ) );
-	connect( tocNameLineEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( setToCName(const QString&) ) );
-	connect( itemListNonPrintingCheckBox, SIGNAL( toggled(bool) ), this, SLOT( nonPrintingFramesSelected(bool) ) );
+	connect( itemAttrComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemAttributeSelected(const QString&)));
+	connect( itemDestFrameComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemFrameSelected(const QString&)));
+	connect( itemParagraphStyleComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemParagraphStyleSelected(const QString&)));
+	connect( itemNumberPlacementComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemPageNumberPlacedSelected(const QString&)));
+	connect( tocNameLineEdit, SIGNAL( textChanged(const QString&)), this, SLOT( setToCName(const QString&)));
+	connect( itemListNonPrintingCheckBox, SIGNAL( toggled(bool) ), this, SLOT( nonPrintingFramesSelected(bool)));
 	setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
 	numSelected=999;
 }
@@ -62,7 +62,7 @@
 	{
 		updateToCListBox();
 		updateParagraphStyleComboBox();
-		tocListBox->setCurrentItem(0);
+		tocListBox->setCurrentItem(nullptr);
 		selectToC(0);
 	}
 	else
@@ -127,7 +127,7 @@
 		itemDestFrameComboBox->setEnabled(false);
 }
 
-void Prefs_TableOfContents::setupItemAttrs( QStringList newNames )
+void Prefs_TableOfContents::setupItemAttrs(const QStringList& newNames)
 {
 	disconnect( itemAttrComboBox, SIGNAL( activated(const QString&) ), this, SLOT( itemAttributeSelected(const QString&) ) );
 	itemAttrComboBox->clear();
@@ -167,9 +167,9 @@
 		setCurrentComboItem(itemNumberPlacementComboBox, trStrPNNotShown);
 	else
 		if (localToCSetupVector[numSelected].pageLocation==Beginning)
-		setCurrentComboItem(itemNumberPlacementComboBox, trStrPNBeginning);
-	else
-		setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
+			setCurrentComboItem(itemNumberPlacementComboBox, trStrPNBeginning);
+		else
+			setCurrentComboItem(itemNumberPlacementComboBox, trStrPNEnd);
 
 	itemListNonPrintingCheckBox->setChecked(localToCSetupVector[numSelected].listNonPrintingFrames);
 	if (m_Doc!=nullptr)

Modified: trunk/Scribus/scribus/ui/prefs_tableofcontents.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefs_tableofcontents.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_tableofcontents.h	(original)
+++ trunk/Scribus/scribus/ui/prefs_tableofcontents.h	Sun Aug  5 09:27:44 2018
@@ -36,7 +36,7 @@
 
 //		virtual void setup( ToCSetupVector * tocsetups, ScribusDoc * doc );
 		virtual void generatePageItemList();
-		virtual void setupItemAttrs( QStringList newNames );
+		virtual void setupItemAttrs(const QStringList& newNames );
 		virtual void selectToC( int numberSelected );
 		virtual void addToC();
 		virtual void updateToCListBox();

Modified: trunk/Scribus/scribus/ui/prefspanel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/prefspanel.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefspanel.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefspanel.cpp	Sun Aug  5 09:27:44 2018
@@ -8,7 +8,7 @@
 #include "prefspanel.h"
 //#include "prefspanel.moc"
 
-PrefsPanel::PrefsPanel(QWidget* parent) : QWidget(parent, 0)
+PrefsPanel::PrefsPanel(QWidget* parent) : QWidget(parent, nullptr)
 {}
 
 PrefsPanel::~PrefsPanel()

Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp	Sun Aug  5 09:27:44 2018
@@ -41,7 +41,7 @@
 {
 	setupUi(this);
 	setModal(true);
-	cdia = 0;
+	cdia = nullptr;
 	m_doc = doc;
 	unit = doc->unitIndex();
 	unitRatio = unitGetRatioFromIndex(doc->unitIndex());
@@ -161,7 +161,7 @@
 #ifdef HAVE_CUPS
 	delete cdia;
 #endif
-	cdia = 0;
+	cdia = nullptr;
 }
 
 void PrintDialog::SetOptions()
@@ -173,7 +173,7 @@
 	if (!cdia->exec())
 	{
 		delete cdia; // if options was canceled delete dia 
-		cdia = 0;    // so that getoptions() in the okButtonClicked() will get 
+		cdia = nullptr;    // so that getoptions() in the okButtonClicked() will get
 		             // the default values from the last successful run
 	}
 
@@ -307,7 +307,7 @@
 
 void PrintDialog::SelPrinter(const QString& prn)
 {
-	bool toFile = prn == tr("File") ? true : false;
+	bool toFile = prn == tr("File");
 	DateiT->setEnabled(toFile);
 	LineEdit1->setEnabled(toFile);
 	ToolButton1->setEnabled(toFile);
@@ -618,10 +618,7 @@
 
 bool PrintDialog::color()
 {
-	if (colorType->currentIndex() == 0)
-		return true;
-	else
-		return false;
+	return colorType->currentIndex() == 0;
 }
 
 bool PrintDialog::mirrorHorizontal()
@@ -704,7 +701,7 @@
 
 void PrintDialog::createPageNumberRange( )
 {
-	if (m_doc!=0)
+	if (m_doc!=nullptr)
 	{
 		CreateRange cr(pageNr->text(), m_doc->DocPages.count(), this);
 		if (cr.exec())

Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp	Sun Aug  5 09:27:44 2018
@@ -57,11 +57,11 @@
 #include "util_math.h"
 
 
-PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent, "PropertiesPalette", 0)
+PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent, "PropertiesPalette", nullptr)
 {
 	undoManager = UndoManager::instance();
-	m_ScMW=0;
-	m_doc=0;
+	m_ScMW=nullptr;
+	m_doc=nullptr;
 	m_haveDoc = false;
 	m_haveItem = false;
 	m_unitRatio = 1.0;
@@ -115,14 +115,14 @@
 
 	connect(TabStack, SIGNAL(currentChanged2(int)), this, SLOT(SelTab(int)));
 
-	connect(Cpal, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(NewSpGradient(double, double, double, double, double, double, double, double, double, double )));
+	connect(Cpal, SIGNAL(NewSpecial(double,double,double,double,double,double,double,double,double,double)), this, SLOT(NewSpGradient(double,double,double,double,double,double,double,double,double,double )));
 	connect(Cpal, SIGNAL(editGradient(int)), this, SLOT(toggleGradientEdit(int)));
-	connect(Tpal, SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(NewSpGradientM(double, double, double, double, double, double, double, double )));
+	connect(Tpal, SIGNAL(NewSpecial(double,double,double,double,double,double,double,double,double,double)), this, SLOT(NewSpGradientM(double,double,double,double,double,double,double,double )));
 	connect(Tpal, SIGNAL(editGradient()), this, SLOT(toggleGradientEditM()));
 
 	m_haveItem = false;
-	for (int ws = 1; ws < 10; ++ws)
-		TabStack->setItemEnabled(ws, false);
+	for (int i = 1; i < 10; ++i)
+		TabStack->setItemEnabled(i, false);
 	TabStack->setCurrentIndex(0);
 	TabStack->widget(0)->setEnabled(false);
 	TabStack->setItemEnabled(0, false);

Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp	Sun Aug  5 09:27:44 2018
@@ -71,9 +71,9 @@
 
 PropertiesPalette_Group::PropertiesPalette_Group( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = 0;
-	m_doc  = 0;
-	m_item = 0;
+	m_ScMW = nullptr;
+	m_doc  = nullptr;
+	m_item = nullptr;
 	m_haveDoc   = false;
 	m_haveItem  = false;
 	m_unitIndex = 0;
@@ -151,11 +151,11 @@
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
 	}
 	
-	disconnect(this->transPalWidget, SIGNAL(NewTrans(double)), 0, 0);
-	disconnect(this->transPalWidget, SIGNAL(NewBlend(int)), 0, 0);
-	disconnect(this->transPalWidget, SIGNAL(NewGradient(int)), 0, 0);
-	disconnect(this->transPalWidget, SIGNAL(NewPattern(QString)), 0, 0);
-	disconnect(this->transPalWidget, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);
+	this->transPalWidget->disconnect(SIGNAL(NewTrans(double)));
+	this->transPalWidget->disconnect(SIGNAL(NewBlend(int)));
+	this->transPalWidget->disconnect(SIGNAL(NewGradient(int)));
+	this->transPalWidget->disconnect(SIGNAL(NewPattern(QString)));
+	this->transPalWidget->disconnect(SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)));
 
 	m_doc  = d;
 	m_item = nullptr;

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp	Sun Aug  5 09:27:44 2018
@@ -30,11 +30,11 @@
 
 PropertiesPalette_Image::PropertiesPalette_Image( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = 0;
-	m_doc  = 0;
+	m_ScMW = nullptr;
+	m_doc  = nullptr;
 	m_haveDoc    = false;
 	m_haveItem   = false;
-	m_item       = 0;
+	m_item       = nullptr;
 	m_unitRatio  = 1.0;
 	m_unitIndex  = 0;
 
@@ -222,7 +222,7 @@
 
 void PropertiesPalette_Image::installSniffer(ScrSpinBox *spinBox)
 {
-	const QList<QObject*> list = spinBox->children();
+	const QList<QObject*>& list = spinBox->children();
 	if (!list.isEmpty())
 	{
 		QListIterator<QObject*> it(list);
@@ -237,7 +237,7 @@
 
 void PropertiesPalette_Image::installSniffer(QSpinBox *spinBox)
 {
-	const QList<QObject*> list = spinBox->children();
+	const QList<QObject*>& list = spinBox->children();
 	if (!list.isEmpty())
 	{
 		QListIterator<QObject*> it(list);

Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp	Sun Aug  5 09:27:44 2018
@@ -35,8 +35,8 @@
 
 PropertiesPalette_Line::PropertiesPalette_Line( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW = 0;
-	m_doc  = 0;
+	m_ScMW = nullptr;
+	m_doc  = nullptr;
 	m_haveDoc  = false;
 	m_haveItem = false;
 	m_item     = nullptr;
@@ -164,7 +164,7 @@
 	m_doc   = nullptr;
 	m_item  = nullptr;
 
-	updateLineStyles(0);
+	updateLineStyles(nullptr);
 
 	setEnabled(false);
 }
@@ -375,7 +375,7 @@
 	
 	lineStyles->blockSignals(true);
 	lineStyles->clear();
-	if (dd != 0)
+	if (dd != nullptr)
 	{
 		QHash<QString,multiLine>::Iterator it;
 		for (it = dd->MLineStyles.begin(); it != dd->MLineStyles.end(); ++it)

Modified: trunk/Scribus/scribus/ui/propertiespalette_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_table.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_table.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_table.cpp	Sun Aug  5 09:27:44 2018
@@ -29,7 +29,7 @@
 
 
 PropertiesPalette_Table::PropertiesPalette_Table(QWidget* parent) : QWidget(parent),
-	m_mainWindow(0), m_doc(0), m_item(0), m_previousItem(0)
+	m_mainWindow(nullptr), m_doc(nullptr), m_item(nullptr), m_previousItem(nullptr)
 {
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
@@ -95,7 +95,7 @@
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
 	}
 
-	m_doc = 0;
+	m_doc = nullptr;
 
 	tableStyleCombo->setDoc(m_doc);
 	cellStyleCombo->setDoc(m_doc);
@@ -114,7 +114,7 @@
 
 //	if ((m_item) && (m_item->isTable()))
 //		disconnect(m_item->asTable(), SIGNAL(selectionChanged()), this, SLOT(handleCellSelectionChanged()));
-	m_item = 0;
+	m_item = nullptr;
 }
 
 void PropertiesPalette_Table::handleSelectionChanged()
@@ -126,7 +126,7 @@
 	if (m_doc->m_Selection->count() >= 1 && m_doc->m_Selection->itemAt(0)->isTable())
 		m_item = m_doc->m_Selection->itemAt(0);
 	else
-		m_item = 0;
+		m_item = nullptr;
 
 	// HACK: Guard against "false" re-selections resulting from m_item->update().
 	if (m_item == m_previousItem)
@@ -422,7 +422,7 @@
 	{
 		QList<TableBorderLine> borderLines = m_currentBorder.borderLines();
 		Q_ASSERT(borderLineList->count() == borderLines.size());
-		TableBorderLine line = borderLines.at(row);
+		const TableBorderLine& line = borderLines.at(row);
 
 		// Enable editing widgets.
 		borderLineWidth->setEnabled(true);

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Sun Aug  5 09:27:44 2018
@@ -52,9 +52,9 @@
 
 PropertiesPalette_Text::PropertiesPalette_Text( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW=0;
-	m_doc=0;
-	m_item=0;
+	m_ScMW=nullptr;
+	m_doc=nullptr;
+	m_item=nullptr;
 	m_haveDoc = false;
 	m_haveItem = false;
 	m_unitIndex = 0;
@@ -180,7 +180,7 @@
 	orphanBox->setDoc(m_doc);
 	pathTextWidgets->setDoc(m_doc);
 
-	fonts->RebuildList(m_doc);
+	fonts->rebuildList(m_doc);
 	paraStyleCombo->setDoc(m_doc);
 	charStyleCombo->setDoc(m_doc);
 
@@ -201,19 +201,19 @@
 	m_doc      = nullptr;
 	m_item     = nullptr;
 
-	paraStyleCombo->setDoc(0);
-	charStyleCombo->setDoc(0);
-
-	advancedWidgets->setDoc(0);
-	fontfeaturesWidget->setDoc(0);
-	colorWidgets->setDoc(0);
-	distanceWidgets->setDoc(0);
-	flopBox->setDoc(0);
+	paraStyleCombo->setDoc(nullptr);
+	charStyleCombo->setDoc(nullptr);
+
+	advancedWidgets->setDoc(nullptr);
+	fontfeaturesWidget->setDoc(nullptr);
+	colorWidgets->setDoc(nullptr);
+	distanceWidgets->setDoc(nullptr);
+	flopBox->setDoc(nullptr);
 	hyphenationWidget->setDoc(nullptr);
-	optMargins->setDoc(0);
-	orphanBox->setDoc(0);
-	parEffectWidgets->setDoc(0);
-	pathTextWidgets->setDoc(0);
+	optMargins->setDoc(nullptr);
+	orphanBox->setDoc(nullptr);
+	parEffectWidgets->setDoc(nullptr);
+	pathTextWidgets->setDoc(nullptr);
 
 	m_haveItem = false;
 
@@ -300,14 +300,14 @@
 	if (updateFlags & reqParaStylesUpdate)
 		paraStyleCombo->updateFormatList();
 	if (updateFlags & reqDefFontListUpdate)
-		fonts->RebuildList(0);
+		fonts->rebuildList(nullptr);
 	if (updateFlags & reqDocFontListUpdate)
-		fonts->RebuildList(m_haveDoc ? m_doc : 0);
+		fonts->rebuildList(m_haveDoc ? m_doc : nullptr);
 	if (updateFlags & reqStyleComboDocUpdate)
 	{
-		paraStyleCombo->setDoc(m_haveDoc ? m_doc : 0);
-		charStyleCombo->setDoc(m_haveDoc ? m_doc : 0);
-		parEffectWidgets->setDoc(m_haveDoc ? m_doc : 0);
+		paraStyleCombo->setDoc(m_haveDoc ? m_doc : nullptr);
+		charStyleCombo->setDoc(m_haveDoc ? m_doc : nullptr);
+		parEffectWidgets->setDoc(m_haveDoc ? m_doc : nullptr);
 	}
 }
 
@@ -428,7 +428,7 @@
 	bool tmp = m_haveItem;
 	m_haveItem = false;
 	if (m_item != nullptr)
-		fonts->RebuildList(m_doc, m_item->isAnnotation());
+		fonts->rebuildList(m_doc, m_item->isAnnotation());
 	fonts->setCurrentFont(newFont);
 	m_haveItem = tmp;
 }
@@ -649,7 +649,7 @@
 	}
 }
 
-void PropertiesPalette_Text::handleTextFont(QString c)
+void PropertiesPalette_Text::handleTextFont(const QString& c)
 {
 	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_text.h
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.h	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.h	Sun Aug  5 09:27:44 2018
@@ -99,7 +99,7 @@
 	void updateTextStyles();
 	
 	void handleLineSpacingMode(int id);
-	void handleTextFont(QString);
+	void handleTextFont(const QString&);
 
 	// update widget layout
 	void updateTreeLayout();

Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp	Sun Aug  5 09:27:44 2018
@@ -45,8 +45,8 @@
 
 PropertiesPalette_XYZ::PropertiesPalette_XYZ( QWidget* parent) : QWidget(parent)
 {
-	m_ScMW=0;
-	m_doc=0;
+	m_ScMW=nullptr;
+	m_doc=nullptr;
 	m_haveDoc  = false;
 	m_haveItem = false;
 	m_lineMode = false;

Modified: trunk/Scribus/scribus/ui/propertywidget_distance.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertywidget_distance.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_distance.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_distance.cpp	Sun Aug  5 09:27:44 2018
@@ -21,8 +21,8 @@
 
 PropertyWidget_Distance::PropertyWidget_Distance(QWidget* parent) : QFrame(parent)
 {
-	m_item = 0;
-	m_ScMW = 0;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 
 	m_unitRatio = 1.0;
 	m_unitIndex = 0;
@@ -247,7 +247,7 @@
 		if (m_doc->appMode == modeEditTable)
 			textItem = m_item->asTable()->activeCell().textFrame();
 
-		if (textItem != 0)
+		if (textItem != nullptr)
 		{
 //#14427: columns->setMaximum(qMax(qRound(textItem->width() / qMax(textItem->ColGap, 10.0)), 1));
 			if (columnGapLabel->currentIndex() == 0)
@@ -374,7 +374,7 @@
 	if (m_doc && m_item)
 	{
 		PageItem_TextFrame *tItem = m_item->asTextFrame();
-		if (tItem == 0)
+		if (tItem == nullptr)
 			return;
 		const ParagraphStyle& style(m_doc->appMode == modeEdit ? tItem->currentStyle() : tItem->itemText.defaultStyle());
 		TabManager *dia = new TabManager(this, m_doc->unitIndex(), style.tabValues(), tItem->columnWidth());

Modified: trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	Sun Aug  5 09:27:44 2018
@@ -17,8 +17,8 @@
 
 PropertyWidget_OptMargins::PropertyWidget_OptMargins(QWidget* parent) : QFrame(parent)
 {
-	m_item = 0;
-	m_ScMW = 0;
+	m_item = nullptr;
+	m_ScMW = nullptr;
 
 	setupUi(this);
 

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	Sun Aug  5 09:27:44 2018
@@ -369,7 +369,7 @@
 	if (updateFlags & reqCharStylesUpdate)
 		updateCharStyles();
 	if (updateFlags & reqStyleComboDocUpdate)
-		setDoc(m_doc ? m_doc : 0);
+		setDoc(m_doc ? m_doc : nullptr);
 	if (updateFlags & reqNumUpdate)
 		fillNumerationsCombo();
 }

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	Sun Aug  5 09:27:44 2018
@@ -16,9 +16,9 @@
 
 PropertyWidget_PathText::PropertyWidget_PathText(QWidget* parent) : QFrame(parent)
 {
-	m_ScMW = 0;
-	m_doc  = 0;
-	m_item = 0;
+	m_ScMW = nullptr;
+	m_doc  = nullptr;
+	m_item = nullptr;
 	m_unitRatio = 1.0;
 	m_unitIndex = 0;
 
@@ -64,8 +64,8 @@
 		return;
 	}
 
-	m_unitRatio   = m_doc->unitRatio();
-	m_unitIndex   = m_doc->unitIndex();
+	m_unitRatio = m_doc->unitRatio();
+	m_unitIndex = m_doc->unitIndex();
 
 	startOffset->setMaximum( 30000 );
 	startOffset->setMinimum( 0 );
@@ -137,7 +137,7 @@
 	disconnect(distFromCurve    , SIGNAL(valueChanged(double)), this, SLOT(handlePathOffs()));
 }
 
-void PropertyWidget_PathText::configureWidgets(void)
+void PropertyWidget_PathText::configureWidgets()
 {
 	bool enabled = false;
 	if (m_item && m_doc)

Modified: trunk/Scribus/scribus/ui/sctoolbar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/sctoolbar.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctoolbar.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctoolbar.cpp	Sun Aug  5 09:27:44 2018
@@ -40,7 +40,7 @@
 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),
+	prefsButton(nullptr),
 	parentMW(parent),
 	dockTop(false),
 	dockRight(false),

Modified: trunk/Scribus/scribus/ui/sctreewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/sctreewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.cpp	Sun Aug  5 09:27:44 2018
@@ -204,7 +204,7 @@
 	if (top->childCount() != 0)
 	{
 		QTreeWidgetItem *child = top->child(0);
-		if (child != 0)
+		if (child != nullptr)
 			wide = itemWidget(child, 0)->minimumSizeHint().width()+5;
 	}
 	if (wide != 0)
@@ -217,14 +217,14 @@
 {
 	int index = -1;
 	QTreeWidgetItem* item = currentItem();
-	if (item->parent() == 0)
+	if (item->parent() == nullptr)
 		index = indexOfTopLevelItem(item);
 	else
 		index = indexOfTopLevelItem(item->parent());
 	return index;
 }
 
-void ScTreeWidget::setItemText(int index, QString text)
+void ScTreeWidget::setItemText(int index, const QString& text)
 {
 	if ((index < 0) || (index >= topLevelItemCount()))
 		return;
@@ -233,9 +233,9 @@
 
 void ScTreeWidget::handleMousePress(QTreeWidgetItem *item)
 {
-	if (item == 0)
-		return;
-	if (item->parent() == 0)
+	if (item == nullptr)
+		return;
+	if (item->parent() == nullptr)
 	{
 		if (item->isDisabled())
 		{
@@ -255,7 +255,7 @@
 			if (item->childCount() != 0)
 			{
 				QTreeWidgetItem *child = item->child(0);
-				if (child != 0)
+				if (child != nullptr)
 					wide = itemWidget(child, 0)->minimumSizeHint().width()+5;
 			}
 			if (wide != 0)
@@ -274,7 +274,7 @@
 					if (top->childCount() != 0)
 					{
 						QTreeWidgetItem *child = top->child(0);
-						if (child != 0)
+						if (child != nullptr)
 							wide = qMax(wide, itemWidget(child, 0)->minimumSizeHint().width()+5);
 					}
 				}

Modified: trunk/Scribus/scribus/ui/sctreewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/sctreewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/sctreewidget.h	(original)
+++ trunk/Scribus/scribus/ui/sctreewidget.h	Sun Aug  5 09:27:44 2018
@@ -59,7 +59,7 @@
 	bool isItemEnabled(int index);
 	void setCurrentIndex(int index);
 	int currentIndex();
-	void setItemText(int index, QString text);
+	void setItemText(int index, const QString& text);
 
 private slots:
 	void handleMousePress(QTreeWidgetItem *item);

Modified: trunk/Scribus/scribus/ui/smcellstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smcellstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstyle.cpp	Sun Aug  5 09:27:44 2018
@@ -16,9 +16,9 @@
 #include "ui/scmessagebox.h"
 
 SMCellStyle::SMCellStyle() : StyleItem(),
-	m_widget(0),
-	m_page(0),
-	m_doc(0),
+	m_widget(nullptr),
+	m_page(nullptr),
+	m_doc(nullptr),
 	m_selectionIsDirty(false)
 {
 	m_widget = new QTabWidget();
@@ -35,8 +35,8 @@
 {
 	delete m_page;
 	delete m_widget;
-	m_page = 0;
-	m_widget = 0;
+	m_page = nullptr;
+	m_widget = nullptr;
 }
 
 QTabWidget* SMCellStyle::widget()

Modified: trunk/Scribus/scribus/ui/smcellstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smcellstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.cpp	Sun Aug  5 09:27:44 2018
@@ -12,7 +12,7 @@
 #include "smcellstylewidget.h"
 
 SMCellStyleWidget::SMCellStyleWidget(QWidget *parent) : QWidget(),
-	m_Doc(0)
+	m_Doc(nullptr)
 {
 	setupUi(this);
 
@@ -62,7 +62,7 @@
 		return;
 	parentCombo->setEnabled(!cellStyle->isDefaultStyle());
 	const CellStyle *parent = dynamic_cast<const CellStyle*>(cellStyle->parentStyle());
-	bool hasParent =  cellStyle->hasParent() && parent != 0 && parent->hasName() && cellStyle->parent() != "";
+	bool hasParent =  cellStyle->hasParent() && parent != nullptr && parent->hasName() && cellStyle->parent() != "";
 	if (hasParent)
 	{
 		fillColor->setCurrentText(cellStyle->fillColor(), cellStyle->isInhFillColor());

Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp	Sun Aug  5 09:27:44 2018
@@ -17,7 +17,7 @@
 
 
 SMCStyleWidget::SMCStyleWidget(QWidget *parent) : QWidget(),
-	m_Doc(0)
+	m_Doc(nullptr)
 {
 	setupUi(this);
 
@@ -187,7 +187,7 @@
 	LanguageManager::instance()->fillInstalledStringList(&languageList);
 	fillLangComboFromList(languageList);
 	fillColorCombo(m_Doc->PageColors);
-	fontFace_->RebuildList(m_Doc);
+	fontFace_->rebuildList(m_Doc);
 
 	connect(m_Doc->scMW(), SIGNAL(UpdateRequest(int)), this , SLOT(handleUpdateRequest(int)));
 }
@@ -197,7 +197,7 @@
 	disconnect(effects_, SIGNAL(State(int)), this, SLOT(slotColorChange()));
 	parentCombo->setEnabled(!cstyle->isDefaultStyle());
 	const CharStyle *parent = dynamic_cast<const CharStyle*>(cstyle->parentStyle());
-	bool hasParent =  cstyle->hasParent() && parent != 0 && parent->hasName() && cstyle->parent() != "";
+	bool hasParent =  cstyle->hasParent() && parent != nullptr && parent->hasName() && cstyle->parent() != "";
 	if (hasParent)
 	{
 		fontSize_->setValue(cstyle->fontSize() / 10.0, cstyle->isInhFontSize());

Modified: trunk/Scribus/scribus/ui/smlinestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smlinestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smlinestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smlinestyle.cpp	Sun Aug  5 09:27:44 2018
@@ -21,7 +21,7 @@
 #include "util.h"
 
 
-SMLineStyle::SMLineStyle() : StyleItem(), m_doc(0), m_widget(0), m_twidget(0), m_selectionIsDirty(false), m_unitRatio(1.0)
+SMLineStyle::SMLineStyle() : StyleItem(), m_doc(nullptr), m_widget(nullptr), m_twidget(nullptr), m_selectionIsDirty(false), m_unitRatio(1.0)
 {
 	
 }
@@ -794,7 +794,7 @@
 {
 	delete m_widget;
 	delete m_twidget;
-	m_widget = 0;
-	m_twidget = 0;
-}
-
+	m_widget = nullptr;
+	m_twidget = nullptr;
+}
+

Modified: trunk/Scribus/scribus/ui/smstyleimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smstyleimport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smstyleimport.cpp	(original)
+++ trunk/Scribus/scribus/ui/smstyleimport.cpp	Sun Aug  5 09:27:44 2018
@@ -14,7 +14,7 @@
 							 StyleSet<ParagraphStyle> *pstyleList,
 							 StyleSet<CharStyle> *cstyleList,
 							 QHash<QString, multiLine> *lstyleList)
-	: QDialog( parent, 0 )
+	: QDialog( parent, nullptr )
 {
 	setupUi(this);
 	setModal(true);

Modified: trunk/Scribus/scribus/ui/smtablestyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smtablestyle.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestyle.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestyle.cpp	Sun Aug  5 09:27:44 2018
@@ -15,7 +15,7 @@
 #include "smtablestylewidget.h"
 #include "ui/scmessagebox.h"
 
-SMTableStyle::SMTableStyle() : StyleItem(),m_widget(0), m_page(0), m_doc(0)
+SMTableStyle::SMTableStyle() : StyleItem(), m_widget(nullptr), m_page(nullptr), m_doc(nullptr)
 {
 	m_widget = new QTabWidget();
 	Q_CHECK_PTR(m_widget);
@@ -31,8 +31,8 @@
 {
 	delete m_page;
 	delete m_widget;
-	m_page = 0;
-	m_widget = 0;
+	m_page = nullptr;
+	m_widget = nullptr;
 }
 
 QTabWidget* SMTableStyle::widget()

Modified: trunk/Scribus/scribus/ui/smtablestylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smtablestylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.cpp	Sun Aug  5 09:27:44 2018
@@ -12,7 +12,7 @@
 #include "smtablestylewidget.h"
 
 SMTableStyleWidget::SMTableStyleWidget(QWidget *parent) : QWidget(),
-	m_Doc(0)
+	m_Doc(nullptr)
 {
 	setupUi(this);
 
@@ -62,7 +62,7 @@
 		return;
 	parentCombo->setEnabled(!tableStyle->isDefaultStyle());
 	const TableStyle *parent = dynamic_cast<const TableStyle*>(tableStyle->parentStyle());
-	bool hasParent =  tableStyle->hasParent() && parent != 0 && parent->hasName() && tableStyle->parent() != "";
+	bool hasParent =  tableStyle->hasParent() && parent != nullptr && parent->hasName() && tableStyle->parent() != "";
 	if (hasParent)
 	{
 		fillColor->setCurrentText(tableStyle->fillColor(), tableStyle->isInhFillColor());

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Sun Aug  5 09:27:44 2018
@@ -40,7 +40,7 @@
 
 
 SMParagraphStyle::SMParagraphStyle(SMCharacterStyle* cstyleItem) : StyleItem(),
-m_pwidget(0), m_cstyleItem(cstyleItem), m_doc(0), m_selectionIsDirty(false), m_unitRatio(1.0)
+m_pwidget(nullptr), m_cstyleItem(cstyleItem), m_doc(nullptr), m_selectionIsDirty(false), m_unitRatio(1.0)
 {
 	Q_ASSERT(m_cstyleItem);
 	m_cstyles = m_cstyleItem->tmpStyles();
@@ -78,7 +78,7 @@
 	else
 	{
 		if (m_pwidget)
-			m_pwidget->setDoc(0);
+			m_pwidget->setDoc(nullptr);
 		removeConnections();
 		m_selection.clear();
 		m_tmpStyles.clear();
@@ -2080,13 +2080,13 @@
 SMParagraphStyle::~SMParagraphStyle()
 {
 	delete m_pwidget;
-	m_pwidget = 0;
+	m_pwidget = nullptr;
 }
 
 /******************************************************************************/
 /******************************************************************************/
 
-SMCharacterStyle::SMCharacterStyle() : StyleItem(), m_widget(0), m_page(0), m_doc(0), m_selectionIsDirty(false)
+SMCharacterStyle::SMCharacterStyle() : StyleItem(), m_widget(nullptr), m_page(nullptr), m_doc(nullptr), m_selectionIsDirty(false)
 {
 	m_widget = new QTabWidget();
 	Q_CHECK_PTR(m_widget);
@@ -3099,7 +3099,7 @@
 {
 	delete m_page;
 	delete m_widget;
-	m_page = 0;
-	m_widget = 0;
-}
-
+	m_page = nullptr;
+	m_widget = nullptr;
+}
+

Modified: trunk/Scribus/scribus/ui/spiralvectordialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/spiralvectordialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/spiralvectordialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/spiralvectordialog.cpp	Sun Aug  5 09:27:44 2018
@@ -23,7 +23,7 @@
 
 #include "spiralvectordialog.h"
 
-SpiralVectorDialog::SpiralVectorDialog(QWidget* parent) : ScrPaletteBase( parent, "SpiralVectorDialog", false, 0 )
+SpiralVectorDialog::SpiralVectorDialog(QWidget* parent) : ScrPaletteBase( parent, "SpiralVectorDialog", false, nullptr )
 {
 	setupUi(this);
 	startAngle->setNewUnit(6);

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Sun Aug  5 09:27:44 2018
@@ -121,7 +121,7 @@
 	setPalette(pal);
 	offs = 0;
 	currentPar = 0;
-	editor = 0;
+	editor = nullptr;
 	noUpdt = true;
 	inRep = false;
 	pmen = new QMenu(this);
@@ -2298,7 +2298,7 @@
 void StoryEditor::setFontPref()
 {
 	m_blockUpdate = true;
-	Editor->setFont( QFontDialog::getFont( 0, Editor->font(), this ) );
+	Editor->setFont( QFontDialog::getFont( nullptr, Editor->font(), this ) );
 	prefsManager->appPrefs.storyEditorPrefs.guiFont = Editor->font().toString();
 	EditorBar->doRepaint();
 	m_blockUpdate = false;
@@ -2934,9 +2934,9 @@
 //#if 0
 	if (m_item->asTextFrame())
 	{
-		while (nextItem != 0)
-		{
-			if (nextItem->prevInChain() != 0)
+		while (nextItem != nullptr)
+		{
+			if (nextItem->prevInChain() != nullptr)
 				nextItem = nextItem->prevInChain();
 			else
 				break;

Modified: trunk/Scribus/scribus/ui/stylemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/stylemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/stylemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/stylemanager.cpp	Sun Aug  5 09:27:44 2018
@@ -36,8 +36,8 @@
 const QString StyleManager::SEPARATOR = "$$$$"; // dumb but it works
 
 StyleManager::StyleManager(QWidget *parent, const char *name)
-	: ScrPaletteBase(parent, name), m_item(0), m_widget(0),
-	m_shortcutWidget(0), m_currentType(QString::null), m_isEditMode(true), m_doc(0)
+	: ScrPaletteBase(parent, name), m_item(nullptr), m_widget(nullptr),
+	m_shortcutWidget(nullptr), m_currentType(QString::null), m_isEditMode(true), m_doc(nullptr)
 {
 	setupUi(this);
 	styleView->hideColumn(SHORTCUT_COL);
@@ -67,7 +67,7 @@
 	m_rightClickPopup->setEnabled(false);
 	m_newPopup->setEnabled(false);
 	
-	m_selectedStyleAction = 0;
+	m_selectedStyleAction = nullptr;
 
 	connect(m_newPopup, SIGNAL(triggered(QAction*)), this, SLOT(slotNewPopup(QAction*)));
 	connect(okButton, SIGNAL(clicked()), this, SLOT(slotOk()));
@@ -198,7 +198,7 @@
 		if (typedItem)
 			return typedItem;
 	}
-	return 0;
+	return nullptr;
 }
 
 void StyleManager::setOkButtonText()
@@ -230,7 +230,7 @@
 	if (m_selectedStyleAction)
 	{
 		m_rightClickPopup->removeAction(m_selectedStyleAction);
-		m_selectedStyleAction = 0;
+		m_selectedStyleAction = nullptr;
 	}
 	m_styleActions.clear();
 	for (int i = 0; i < m_items.count(); ++i)
@@ -353,9 +353,9 @@
 //       implementation
 // Start hack
 
-		SMParagraphStyle *pstyle = 0;
-		SMCharacterStyle *cstyle = 0;
-		SMLineStyle      *lstyle = 0;
+		SMParagraphStyle *pstyle = nullptr;
+		SMCharacterStyle *cstyle = nullptr;
+		SMLineStyle      *lstyle = nullptr;
 		for (int i = 0; i < m_items.count(); ++i)
 		{
 			pstyle = dynamic_cast<SMParagraphStyle*>(m_items.at(i));
@@ -653,7 +653,7 @@
 		if (m_selectedStyleAction)
 		{
 			m_rightClickPopup->removeAction(m_selectedStyleAction);
-			m_selectedStyleAction = 0;
+			m_selectedStyleAction = nullptr;
 		}
 		if (styleView->selectedItems().count() == 1)
 		{
@@ -684,7 +684,7 @@
 		if (m_selectedStyleAction)
 		{
 			m_rightClickPopup->removeAction(m_selectedStyleAction);
-			m_selectedStyleAction = 0;
+			m_selectedStyleAction = nullptr;
 		}
 	}
 	else
@@ -700,7 +700,7 @@
 		if (m_selectedStyleAction)
 		{
 			m_rightClickPopup->removeAction(m_selectedStyleAction);
-			m_selectedStyleAction = 0;
+			m_selectedStyleAction = nullptr;
 		}
 	}
 
@@ -751,7 +751,7 @@
 // 	qDebug() << "created new style:" << newName << " : " << m_item->isDefaultStyle(newName);
 	if (newName.isNull())
 		return;
-	StyleViewItem *root = 0;
+	StyleViewItem *root = nullptr;
 	QTreeWidgetItemIterator it(styleView, QTreeWidgetItemIterator::NotSelectable);
 	while (*it)
 	{
@@ -1029,7 +1029,7 @@
 	{
 		if (!m_shortcutWidget)
 		{
-			m_shortcutWidget = new ShortcutWidget(0);
+			m_shortcutWidget = new ShortcutWidget(nullptr);
 			m_shortcutWidget->setAllowedModifiers(Qt::META|Qt::CTRL|Qt::SHIFT|Qt::ALT,0);
 			connect(m_shortcutWidget, SIGNAL(newKey(const QString&)),
 					this, SLOT(slotShortcutChanged(const QString&)));
@@ -1088,7 +1088,7 @@
 		if (m_selectedStyleAction == a)
 		{
 			m_rightClickPopup->removeAction(m_selectedStyleAction);
-			m_selectedStyleAction = 0;
+			m_selectedStyleAction = nullptr;
 		}
 		delete a;
 		m_styleActions[newKey] = b;
@@ -1349,7 +1349,7 @@
 // for editing styles
 void StyleManager::loadType(const QString &name)
 {
-	m_item = 0;
+	m_item = nullptr;
 	for (int i = 0; i < m_items.count(); ++i)
 	{
 		if (m_items.at(i)->typeNameSingular() == name || m_items.at(i)->typeName() == name)

Modified: trunk/Scribus/scribus/ui/symbolpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/symbolpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/symbolpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/symbolpalette.cpp	Sun Aug  5 09:27:44 2018
@@ -45,7 +45,7 @@
 	delegate = new ScListWidgetDelegate(this, this);
 	setItemDelegate(delegate);
 	setIconSize(QSize(48, 48));
-	connect(this, SIGNAL(customContextMenuRequested (const QPoint &)), this, SLOT(HandleContextMenu(QPoint)));
+	connect(this, SIGNAL(customContextMenuRequested (const QPoint&)), this, SLOT(HandleContextMenu(QPoint)));
 }
 
 void SymbolView::HandleContextMenu(QPoint p)
@@ -150,7 +150,7 @@
 	clearSelection();
 }
 
-SymbolPalette::SymbolPalette( QWidget* parent) : ScDockPalette( parent, "Symb", 0)
+SymbolPalette::SymbolPalette( QWidget* parent) : ScDockPalette( parent, "Symb", nullptr)
 {
 	setMinimumSize( QSize( 220, 240 ) );
 	setObjectName(QString::fromLocal8Bit("Symb"));
@@ -164,7 +164,7 @@
 	editItemNames.clear();
 	languageChange();
 	m_item = nullptr;
-	connect(SymbolViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(handleDoubleClick(QListWidgetItem *)));
+	connect(SymbolViewWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(handleDoubleClick(QListWidgetItem*)));
 	connect(SymbolViewWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(handleContextMenue(QPoint)));
 	connect(SymbolViewWidget, SIGNAL(objectDropped()), this, SIGNAL(objectDropped()));
 }

Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp	Sun Aug  5 09:27:44 2018
@@ -1416,9 +1416,9 @@
 
 QListWidgetItem* TabPDFOptions::addFontItem(QString fontName, QListWidget* fontList)
 {
-	QListWidgetItem* item = 0;
+	QListWidgetItem* item = nullptr;
 	if (!AllFonts.contains(fontName))
-		return 0;
+		return nullptr;
 
 	const ScFace& face = AllFonts.value(fontName);
 	if (face.isReplacement())

Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp	Sun Aug  5 09:27:44 2018
@@ -493,12 +493,12 @@
 }
 
 Tabruler::Tabruler( QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid ) : QWidget( parent ),
-	firstLineLabel(0),
-	leftIndentLabel(0),
-	rightIndentLabel(0),
-	firstLineData(0),
-	leftIndentData(0),
-	rightIndentData(0)
+	firstLineLabel(nullptr),
+	leftIndentLabel(nullptr),
+	rightIndentLabel(nullptr),
+	firstLineData(nullptr),
+	leftIndentData(nullptr),
+	rightIndentData(nullptr)
 {
 	docUnitRatio=unitGetRatioFromIndex(dEin);
 	double ww = (wid < 0) ? 4000 : wid;

Modified: trunk/Scribus/scribus/ui/textpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/textpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/textpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/textpalette.cpp	Sun Aug  5 09:27:44 2018
@@ -41,11 +41,11 @@
 #include "undomanager.h"
 
 
-TextPalette::TextPalette( QWidget* parent) : ScDockPalette( parent, "TextPalette", 0)
+TextPalette::TextPalette( QWidget* parent) : ScDockPalette( parent, "TextPalette", nullptr)
 {
 	undoManager = UndoManager::instance();
-	m_ScMW=0;
-	m_doc=0;
+	m_ScMW=nullptr;
+	m_doc=nullptr;
 	m_haveDoc = false;
 	m_haveItem = false;
 	m_unitRatio = 1.0;

Modified: trunk/Scribus/scribus/ui/transparencypalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/transparencypalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/transparencypalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/transparencypalette.cpp	Sun Aug  5 09:27:44 2018
@@ -143,17 +143,17 @@
 
 void Tpalette::setDocument(ScribusDoc* doc)
 {
-	disconnect(this, SIGNAL(NewTrans(double)), 0, 0);
-	disconnect(this, SIGNAL(NewTransS(double)), 0, 0);
-	disconnect(this, SIGNAL(NewGradient(int)), 0, 0);
-	disconnect(this, SIGNAL(NewBlend(int)), 0, 0);
-	disconnect(this, SIGNAL(NewBlendS(int)), 0, 0);
-	disconnect(this, SIGNAL(NewPattern(QString)), 0, 0);
-	disconnect(this, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), 0, 0);
+	this->disconnect(SIGNAL(NewTrans(double)));
+	this->disconnect(SIGNAL(NewTransS(double)));
+	this->disconnect(SIGNAL(NewGradient(int)));
+	this->disconnect(SIGNAL(NewBlend(int)));
+	this->disconnect(SIGNAL(NewBlendS(int)));
+	this->disconnect(SIGNAL(NewPattern(QString)));
+	this->disconnect(SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)));
 	
 	if (currentDoc)
 	{
-		disconnect(currentDoc->scMW(), SIGNAL(UpdateRequest(int)), this, 0);
+		disconnect(currentDoc->scMW(), SIGNAL(UpdateRequest(int)), this, nullptr);
 	}
 
 	currentDoc = doc;

Modified: trunk/Scribus/scribus/ui/unicodesearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/unicodesearch.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/unicodesearch.cpp	(original)
+++ trunk/Scribus/scribus/ui/unicodesearch.cpp	Sun Aug  5 09:27:44 2018
@@ -15,7 +15,7 @@
 
 UnicodeChooseButton::UnicodeChooseButton(QWidget * parent)
 	: QPushButton(parent),
-	m_searchDialog(0)
+	m_searchDialog(nullptr)
 {
 	languageChange();
 	setCheckable(true);

Modified: trunk/Scribus/scribus/ui/weldedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/ui/weldedit.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/weldedit.cpp	(original)
+++ trunk/Scribus/scribus/ui/weldedit.cpp	Sun Aug  5 09:27:44 2018
@@ -23,7 +23,7 @@
 
 #include "weldedit.h"
 
-WeldEditDialog::WeldEditDialog(QWidget* parent) : ScrPaletteBase( parent, "WeldEditDialog", false, 0 )
+WeldEditDialog::WeldEditDialog(QWidget* parent) : ScrPaletteBase( parent, "WeldEditDialog", false, nullptr )
 {
 	setupUi(this);
 	moveWeldPoint->setChecked(true);

Modified: trunk/Scribus/scribus/undogui.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/undogui.cpp
==============================================================================
--- trunk/Scribus/scribus/undogui.cpp	(original)
+++ trunk/Scribus/scribus/undogui.cpp	Sun Aug  5 09:27:44 2018
@@ -66,8 +66,8 @@
 	parent->addAction(ScCore->primaryMainWindow()->scrActions["editCopy"]);
 	parent->addAction(ScCore->primaryMainWindow()->scrActions["editPaste"]);
 	ScCore->primaryMainWindow()->scrMenuMgr->addMenuToWidgetOfAction("EditPasteRecent", ScCore->primaryMainWindow()->scrActions["editPaste"]);
-	connect(undoMenu, SIGNAL(triggered(QAction *)), this, SLOT(undoMenuClicked(QAction *)));
-	connect(redoMenu, SIGNAL(triggered(QAction *)), this, SLOT(redoMenuClicked(QAction *)));
+	connect(undoMenu, SIGNAL(triggered(QAction*)), this, SLOT(undoMenuClicked(QAction*)));
+	connect(redoMenu, SIGNAL(triggered(QAction*)), this, SLOT(redoMenuClicked(QAction*)));
 }
 
 void UndoWidget::clear()
@@ -84,13 +84,13 @@
 
 void UndoWidget::undoClicked()
 {
-	if (undoItems.size() > 0)
+	if (!undoItems.empty())
 		emit undo(1);
 }
 
 void UndoWidget::redoClicked()
 {
-	if (redoItems.size() > 0)
+	if (!redoItems.empty())
 		emit redo(1);
 }
 
@@ -173,7 +173,7 @@
 
 void UndoWidget::popBack()
 {
-	if (undoItems.size() > 0)
+	if (!undoItems.empty())
 	{
 		undoItems.erase(undoItems.end() - 1);
 		updateUndoMenu();
@@ -401,14 +401,14 @@
 
 /*** UndoPalette::UndoItem ****************************************************/
 
-UndoPalette::UndoItem::UndoItem() : QListWidgetItem()
+UndoPalette::UndoItem::UndoItem()
 {
 	targetpixmap = nullptr;
 	actionpixmap = nullptr;
 	isUndoAction_ = true;
 }
 
-UndoPalette::UndoItem::UndoItem(const UndoItem &another) : QListWidgetItem()
+UndoPalette::UndoItem::UndoItem(const UndoItem &another)
 {
 	target = another.target;
 	action = another.action;

Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp	(original)
+++ trunk/Scribus/scribus/undomanager.cpp	Sun Aug  5 09:27:44 2018
@@ -57,7 +57,7 @@
 {
 	if (isEnabled && undoEnabledCounter_ == 0)
 		return; // nothing to do undo is already enabled.
-	else if (isEnabled && undoEnabledCounter_ > 0)
+	if (isEnabled && undoEnabledCounter_ > 0)
 		--undoEnabledCounter_;
 	else if (!isEnabled)
 		++undoEnabledCounter_;
@@ -67,7 +67,7 @@
 		connectGuis();
 	else if (undoEnabledCounter_ == 1)
 		disconnectGuis(); // disconnect only once when setUndoEnabled(false) has been called
-		                  // no need to call again if next setUndoEnabled() call will also be false.
+	// no need to call again if next setUndoEnabled() call will also be false.
 }
 
 bool UndoManager::undoEnabled()
@@ -128,12 +128,12 @@
 
 bool UndoManager::isTransactionMode()
 {
-	return transactions_.size() > 0;
+	return !transactions_.empty();
 }
 
 void UndoManager::registerGui(UndoGui* gui)
 {
-	if (gui == 0)
+	if (gui == nullptr)
 		return;
 
 	setUndoEnabled(false);
@@ -227,8 +227,7 @@
 
 		connect(gui, SIGNAL(undo(int)), this, SLOT(undo(int)));
 		connect(gui, SIGNAL(redo(int)), this, SLOT(redo(int)));
-		connect(this, SIGNAL(newAction(UndoObject*, UndoState*)),
-                gui, SLOT(insertUndoItem(UndoObject*, UndoState*)));
+		connect(this, SIGNAL(newAction(UndoObject*,UndoState*)), gui, SLOT(insertUndoItem(UndoObject*,UndoState*)));
 		connect(this, SIGNAL(popBack()), gui, SLOT(popBack()));
 		connect(this, SIGNAL(undoSignal(int)), gui, SLOT(updateUndo(int)));
 		connect(this, SIGNAL(redoSignal(int)), gui, SLOT(updateRedo(int)));
@@ -278,7 +277,7 @@
 		stacks_[currentDoc_] = UndoStack();
 
 	stacks_[currentDoc_].setMaxSize(prefs_->getInt("historylength", 100));
-	for (uint i = 0; i < undoGuis_.size(); ++i)
+	for (int i = 0; i < undoGuis_.size(); ++i)
 		setState(undoGuis_[i]);
 
 	setTexts();
@@ -308,7 +307,7 @@
 		stacks_.remove(stackName);
 		if (currentDoc_ == stackName)
 		{
-			for (uint i = 0; i < undoGuis_.size(); ++i)
+			for (int i = 0; i < undoGuis_.size(); ++i)
 				undoGuis_[i]->clear();
 			currentDoc_ = "__no_name__";
 		}
@@ -318,7 +317,7 @@
 void UndoManager::clearStack()
 {
 	stacks_[currentDoc_].clear();
-	for (uint i = 0; i < undoGuis_.size(); ++i)
+	for (int i = 0; i < undoGuis_.size(); ++i)
 	{
 		undoGuis_[i]->clear();
 		setState(undoGuis_[i]);
@@ -327,7 +326,7 @@
 
 void UndoManager::action(UndoObject* target, UndoState* state, QPixmap *targetPixmap)
 {
-	QPixmap *oldIcon = 0;
+	QPixmap *oldIcon = nullptr;
 	if (targetPixmap)
 	{
 		oldIcon = target->getUPixmap();
@@ -447,7 +446,7 @@
 {
 	UndoObject *tmp = nullptr;
 	TransactionState* transaction_ = nullptr;
-	if (transactions_.size() > 0)
+	if (!transactions_.empty())
 		transaction_ = transactions_.at(transactions_.size()-1)->transactionState;
 	for (uint i = 0; i < stacks_[currentDoc_].m_undoActions_.size(); ++i)
 	{
@@ -501,7 +500,7 @@
 
 int UndoManager::getHistoryLength()
 {
-	if (stacks_.size() > 0 && stacks_[currentDoc_].redoItems() > 0)
+	if (!stacks_.empty() && stacks_[currentDoc_].redoItems() > 0)
 		return -1;
 	return static_cast<int>(stacks_[currentDoc_].maxSize());
 }
@@ -541,8 +540,7 @@
 
 void UndoManager::deleteInstance()
 {
-	if (instance_)
-		delete instance_;
+	delete instance_;
 	instance_ = nullptr;
 }
 
@@ -1081,56 +1079,56 @@
 QString UndoManager::SoftShadowObjectTrans = "";
 
 /*** Icons for UndoObjects *******************************************/
-QPixmap *UndoManager::IImageFrame      = 0;
-QPixmap *UndoManager::ITextFrame       = 0;
-QPixmap *UndoManager::ILatexFrame      = 0;
-QPixmap *UndoManager::ILine            = 0;
-QPixmap *UndoManager::IPolygon         = 0;
-QPixmap *UndoManager::IPolyline        = 0;
-QPixmap *UndoManager::IPathText        = 0;
-QPixmap *UndoManager::IGroup           = 0;
-QPixmap *UndoManager::ITable           = 0;
+QPixmap *UndoManager::IImageFrame      = nullptr;
+QPixmap *UndoManager::ITextFrame       = nullptr;
+QPixmap *UndoManager::ILatexFrame      = nullptr;
+QPixmap *UndoManager::ILine            = nullptr;
+QPixmap *UndoManager::IPolygon         = nullptr;
+QPixmap *UndoManager::IPolyline        = nullptr;
+QPixmap *UndoManager::IPathText        = nullptr;
+QPixmap *UndoManager::IGroup           = nullptr;
+QPixmap *UndoManager::ITable           = nullptr;
 /*** Icons for actions ***********************************************/
-QPixmap *UndoManager::IMove            = 0;
-QPixmap *UndoManager::IResize          = 0;
-QPixmap *UndoManager::IRotate          = 0;
-QPixmap *UndoManager::IGuides          = 0;
-QPixmap *UndoManager::ILockGuides      = 0;
-QPixmap *UndoManager::IAlignDistribute = 0;
-QPixmap *UndoManager::IFill            = 0;
-QPixmap *UndoManager::IShade           = 0;
-QPixmap *UndoManager::IFlipH           = 0;
-QPixmap *UndoManager::IFlipV           = 0;
-QPixmap *UndoManager::ILock            = 0;
-QPixmap *UndoManager::IUnLock          = 0;
-QPixmap *UndoManager::IEnablePrint     = 0;
-QPixmap *UndoManager::IDisablePrint    = 0;
-QPixmap *UndoManager::IDelete          = 0;
-QPixmap *UndoManager::ICreate          = 0;
-QPixmap *UndoManager::IPaste           = 0;
-QPixmap *UndoManager::ICut             = 0;
-QPixmap *UndoManager::ITransparency    = 0;
-QPixmap *UndoManager::ILineStyle       = 0;
-QPixmap *UndoManager::IArrow           = 0;
-QPixmap *UndoManager::IFont            = 0;
-QPixmap *UndoManager::ISVG             = 0;
-QPixmap *UndoManager::IUniconv         = 0;
-QPixmap *UndoManager::IEPS             = 0;
-QPixmap *UndoManager::IAI              = 0;
-QPixmap *UndoManager::IXFIG            = 0;
-QPixmap *UndoManager::IWMF             = 0;
-QPixmap *UndoManager::IImportOOoDraw   = 0;
-QPixmap *UndoManager::IImageScaling    = 0;
-QPixmap *UndoManager::IBorder          = 0;
-QPixmap *UndoManager::IDocument        = 0;
-QPixmap *UndoManager::ILayer           = 0;
-QPixmap *UndoManager::ILayerAction     = 0;
-QPixmap *UndoManager::IUp              = 0;
-QPixmap *UndoManager::IDown            = 0;
-QPixmap *UndoManager::IPrint           = 0;
-QPixmap *UndoManager::IGetImage        = 0;
-QPixmap *UndoManager::IChangeFormula   = 0;
-QPixmap *UndoManager::IMultipleDuplicate = 0;
-
-
-
+QPixmap *UndoManager::IMove            = nullptr;
+QPixmap *UndoManager::IResize          = nullptr;
+QPixmap *UndoManager::IRotate          = nullptr;
+QPixmap *UndoManager::IGuides          = nullptr;
+QPixmap *UndoManager::ILockGuides      = nullptr;
+QPixmap *UndoManager::IAlignDistribute = nullptr;
+QPixmap *UndoManager::IFill            = nullptr;
+QPixmap *UndoManager::IShade           = nullptr;
+QPixmap *UndoManager::IFlipH           = nullptr;
+QPixmap *UndoManager::IFlipV           = nullptr;
+QPixmap *UndoManager::ILock            = nullptr;
+QPixmap *UndoManager::IUnLock          = nullptr;
+QPixmap *UndoManager::IEnablePrint     = nullptr;
+QPixmap *UndoManager::IDisablePrint    = nullptr;
+QPixmap *UndoManager::IDelete          = nullptr;
+QPixmap *UndoManager::ICreate          = nullptr;
+QPixmap *UndoManager::IPaste           = nullptr;
+QPixmap *UndoManager::ICut             = nullptr;
+QPixmap *UndoManager::ITransparency    = nullptr;
+QPixmap *UndoManager::ILineStyle       = nullptr;
+QPixmap *UndoManager::IArrow           = nullptr;
+QPixmap *UndoManager::IFont            = nullptr;
+QPixmap *UndoManager::ISVG             = nullptr;
+QPixmap *UndoManager::IUniconv         = nullptr;
+QPixmap *UndoManager::IEPS             = nullptr;
+QPixmap *UndoManager::IAI              = nullptr;
+QPixmap *UndoManager::IXFIG            = nullptr;
+QPixmap *UndoManager::IWMF             = nullptr;
+QPixmap *UndoManager::IImportOOoDraw   = nullptr;
+QPixmap *UndoManager::IImageScaling    = nullptr;
+QPixmap *UndoManager::IBorder          = nullptr;
+QPixmap *UndoManager::IDocument        = nullptr;
+QPixmap *UndoManager::ILayer           = nullptr;
+QPixmap *UndoManager::ILayerAction     = nullptr;
+QPixmap *UndoManager::IUp              = nullptr;
+QPixmap *UndoManager::IDown            = nullptr;
+QPixmap *UndoManager::IPrint           = nullptr;
+QPixmap *UndoManager::IGetImage        = nullptr;
+QPixmap *UndoManager::IChangeFormula   = nullptr;
+QPixmap *UndoManager::IMultipleDuplicate = nullptr;
+
+
+

Modified: trunk/Scribus/scribus/undostack.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/undostack.cpp
==============================================================================
--- trunk/Scribus/scribus/undostack.cpp	(original)
+++ trunk/Scribus/scribus/undostack.cpp	Sun Aug  5 09:27:44 2018
@@ -35,17 +35,17 @@
 
 bool UndoStack::action(UndoState *state)
 {
-    m_redoActions_.clear();
-    m_undoActions_.insert(m_undoActions_.begin(), state);
-    bool needsPopping = checkSize(); // only store maxSize_ amount of actions
-
-    return needsPopping;
+	m_redoActions_.clear();
+	m_undoActions_.insert(m_undoActions_.begin(), state);
+	bool needsPopping = checkSize(); // only store maxSize_ amount of actions
+
+	return needsPopping;
 }
 
 bool UndoStack::undo(uint steps, int objectId)
 {
 	for (uint i = 0; i < steps && !m_undoActions_.empty(); ++i) {
-		UndoState *tmpUndoState = 0;
+		UndoState *tmpUndoState = nullptr;
 		if (objectId == Um::GLOBAL_UNDO_MODE)
 		{
 			tmpUndoState = m_undoActions_[0];
@@ -63,7 +63,7 @@
 					m_undoActions_.erase(it);
 					break;
 				}
-				else if((*it)->isTransaction())
+				if((*it)->isTransaction())
 				{
 					TransactionState *ts = dynamic_cast<TransactionState*>(*it);
 					if(ts && ts->containsOnly(objectId))
@@ -86,8 +86,9 @@
 
 bool UndoStack::redo(uint steps, int objectId)
 {
-	for (uint i = 0; i < steps && !m_redoActions_.empty(); ++i) {
-		UndoState *tmpRedoState = 0;
+	for (uint i = 0; i < steps && !m_redoActions_.empty(); ++i)
+	{
+		UndoState *tmpRedoState = nullptr;
 		if (objectId == Um::GLOBAL_UNDO_MODE)
 		{
 			tmpRedoState = m_redoActions_[0];
@@ -105,7 +106,7 @@
 					m_redoActions_.erase(it);
 					break;
 				}
-				else if((*it)->isTransaction())
+				if((*it)->isTransaction())
 				{
 					TransactionState *ts = dynamic_cast<TransactionState*>(*it);
 					if(ts && ts->containsOnly(objectId))
@@ -128,51 +129,51 @@
 
 uint UndoStack::size() const
 {
-    return m_undoActions_.size() + m_redoActions_.size();
+	return m_undoActions_.size() + m_redoActions_.size();
 }
 
 uint UndoStack::undoItems() const
 {
-    return m_undoActions_.size();
+	return m_undoActions_.size();
 }
 
 uint UndoStack::redoItems() const
 {
-    return m_redoActions_.size();
+	return m_redoActions_.size();
 }
 
 uint  UndoStack::maxSize() const
 {
-    return m_maxSize_;
+	return m_maxSize_;
 }
 
 void UndoStack::setMaxSize(uint maxSize)
 {
-    m_maxSize_ = maxSize;
-    checkSize(); // we may need to remove actions
+	m_maxSize_ = maxSize;
+	checkSize(); // we may need to remove actions
 }
 
 bool UndoStack::checkSize() {
-    if (m_maxSize_ == 0) // 0 marks for infinite stack size
-        return false;
-
-    bool needsPopping = size () > m_maxSize_;
-
-    while (size() > m_maxSize_) {
-        if (m_redoActions_.size() > 0) // clear redo actions first
-            m_redoActions_.pop_back();
-        else
-            m_undoActions_.pop_back();
-    }
-
-    return needsPopping;
+	if (m_maxSize_ == 0) // 0 marks for infinite stack size
+		return false;
+
+	bool needsPopping = size () > m_maxSize_;
+
+	while (size() > m_maxSize_) {
+		if (!m_redoActions_.empty()) // clear redo actions first
+			m_redoActions_.pop_back();
+		else
+			m_undoActions_.pop_back();
+	}
+
+	return needsPopping;
 }
 
 void UndoStack::clear()
 {
-	for (uint i = 0; i < m_undoActions_.size(); ++i)
+	for (int i = 0; i < m_undoActions_.size(); ++i)
 		delete m_undoActions_[i];
-	for (uint i = 0; i < m_redoActions_.size(); ++i)
+	for (int i = 0; i < m_redoActions_.size(); ++i)
 		delete m_redoActions_[i];
 	m_undoActions_.clear();
 	m_redoActions_.clear();
@@ -180,7 +181,7 @@
 
 UndoState* UndoStack::getNextUndo(int objectId)
 {
-	UndoState *state = 0;
+	UndoState *state = nullptr;
 	if (!m_undoActions_.empty())
 	{
 		if (objectId == Um::GLOBAL_UNDO_MODE)
@@ -193,12 +194,12 @@
 				UndoState*  tmp  = *it;
 				TransactionState *ts = dynamic_cast<TransactionState*>(tmp);
 				if ((tmp && tmp->undoObject() &&
-						 tmp->undoObject()->getUId() == static_cast<ulong>(objectId)) || (ts && ts->containsOnly(objectId)))
+					 tmp->undoObject()->getUId() == static_cast<ulong>(objectId)) || (ts && ts->containsOnly(objectId)))
 				{
 					state = tmp;
 					break;
 				}
-				else if (ts && ts->contains(objectId))
+				if (ts && ts->contains(objectId))
 					break;
 			}
 		}
@@ -208,7 +209,7 @@
 
 UndoState* UndoStack::getNextRedo(int objectId)
 {
-	UndoState *state = 0;
+	UndoState *state = nullptr;
 	if (!m_redoActions_.empty())
 	{
 		if (objectId == Um::GLOBAL_UNDO_MODE)
@@ -221,12 +222,12 @@
 				UndoState*  tmp  = *it;
 				TransactionState *ts = dynamic_cast<TransactionState*>(tmp);
 				if ((tmp && tmp->undoObject() &&
-						 tmp->undoObject()->getUId() == static_cast<ulong>(objectId)) || (ts && ts->containsOnly(objectId)))
+					 tmp->undoObject()->getUId() == static_cast<ulong>(objectId)) || (ts && ts->containsOnly(objectId)))
 				{
 					state = tmp;
 					break;
 				}
-				else if (ts && ts->contains(objectId))
+				if (ts && ts->contains(objectId))
 					break;
 			}
 		}
@@ -236,6 +237,6 @@
 
 UndoStack::~UndoStack()
 {
-    // no dynamically allocated memory
-}
-
+	// no dynamically allocated memory
+}
+

Modified: trunk/Scribus/scribus/undostate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/undostate.cpp
==============================================================================
--- trunk/Scribus/scribus/undostate.cpp	(original)
+++ trunk/Scribus/scribus/undostate.cpp	Sun Aug  5 09:27:44 2018
@@ -28,11 +28,11 @@
 #include "undoobject.h"
 
 UndoState::UndoState(const QString& name, const QString& description, QPixmap* pixmap) :
-transactionCode(0),
-actionName_(name),
-actionDescription_(description),
-actionPixmap_(pixmap),
-undoObject_(0)
+	transactionCode(0),
+	actionName_(name),
+	actionDescription_(description),
+	actionPixmap_(pixmap),
+	undoObject_(nullptr)
 {
 
 }
@@ -214,20 +214,19 @@
 {
 	if (index >= 0 && static_cast<uint>(index) < sizet())
 		return states_[index];
-	else
-		return 0;
+	return nullptr;
 }
 
 UndoState* TransactionState::last() const
 {
-	if (states_.size() > 0)
+	if (!states_.empty())
 		return states_.at(size_ - 1);
-	return 0;
+	return nullptr;
 }
 
 bool TransactionState::contains(int uid) const
 {
-	for (uint i = 0; i < states_.size(); ++i)
+	for (int i = 0; i < states_.size(); ++i)
 	{
 		UndoObject* undoObject = states_[i]->undoObject();
 		if (undoObject && undoObject->getUId() == static_cast<uint>(uid))
@@ -238,7 +237,7 @@
 
 bool TransactionState::containsOnly(int uid) const
 {
-	for (uint i = 0; i < states_.size(); ++i)
+	for (int i = 0; i < states_.size(); ++i)
 	{
 		UndoObject* undoObject = states_[i]->undoObject();
 		if (undoObject && undoObject->getUId() != static_cast<uint>(uid))
@@ -270,8 +269,8 @@
 
 UndoObject* TransactionState::replace(ulong uid, UndoObject *newUndoObject)
 {
-	UndoObject *tmp = 0;
-	for (uint i = 0; i < states_.size(); ++i)
+	UndoObject *tmp = nullptr;
+	for (int i = 0; i < states_.size(); ++i)
 	{
 		TransactionState *ts = dynamic_cast<TransactionState*>(states_[i]);
 		if (ts) // are we having a transaction_inside a transaction
@@ -329,12 +328,12 @@
 
 TransactionState::~TransactionState()
 {
-	for (uint i = 0; i < states_.size(); ++i)
+	for (int i = 0; i < states_.size(); ++i)
 	{
 		if (states_[i])
 		{
 			delete states_[i];
-			states_[i] = 0;
+			states_[i] = nullptr;
 		}
 	}
 }

Modified: trunk/Scribus/scribus/undotransaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22601&path=/trunk/Scribus/scribus/undotransaction.cpp
==============================================================================
--- trunk/Scribus/scribus/undotransaction.cpp	(original)
+++ trunk/Scribus/scribus/undotransaction.cpp	Sun Aug  5 09:27:44 2018
@@ -35,7 +35,7 @@
 #include "undoobject.h"
 #include "undostate.h"
 
-UndoTransaction::UndoTransaction() : Transaction(0)
+UndoTransaction::UndoTransaction() : Transaction(nullptr)
 {};
 
 UndoTransaction::UndoTransaction(TransactionData* data) : Transaction(data) 
@@ -63,9 +63,9 @@
 //			qDebug() << "UndoManager::cancelTransaction" << data << data->transactionObject->getUName() << data->transactionState->getName() << stackLevel;
 			data->m_status = Transaction::STATE_FAILED;
 			delete data->transactionObject;
-			data->transactionObject = 0;
+			data->transactionObject = nullptr;
 			delete data->transactionState;
-			data->transactionState = 0;
+			data->transactionState = nullptr;
 			//brutal for now:
 			assert (stackLevel + 1 == signed(UM->transactions_.size()));
 			if (stackLevel < signed(UM->transactions_.size()))
@@ -144,9 +144,9 @@
 			else
 			{
 				delete tmpu;
-				tmpu = 0;
+				tmpu = nullptr;
 				delete tmps;
-				tmps = 0;
+				tmps = nullptr;
 			}
 			return true;
 			break;




More information about the scribus-commit mailing list