r22603 by craig - clazy and clang fixes, part 4

scribus-commit scribus-commit at lists.scribus.net
Sun Aug 5 10:33:40 UTC 2018


Author: craig
Date: Sun Aug  5 10:33:40 2018
New Revision: 22603

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

Modified:
    trunk/Scribus/scribus/ui/bookmarkpalette.cpp
    trunk/Scribus/scribus/ui/buttonicon.cpp
    trunk/Scribus/scribus/ui/charselect.cpp
    trunk/Scribus/scribus/ui/charselect.h
    trunk/Scribus/scribus/ui/charselectenhanced.cpp
    trunk/Scribus/scribus/ui/charselectenhanced.h
    trunk/Scribus/scribus/ui/charzoom.cpp
    trunk/Scribus/scribus/ui/charzoom.h
    trunk/Scribus/scribus/ui/checkDocument.cpp
    trunk/Scribus/scribus/ui/cmykfw.cpp
    trunk/Scribus/scribus/ui/colorchart.cpp
    trunk/Scribus/scribus/ui/colorcombo.cpp
    trunk/Scribus/scribus/ui/colorcombo.h
    trunk/Scribus/scribus/ui/colorlistbox.h
    trunk/Scribus/scribus/ui/colorlistmodel.cpp
    trunk/Scribus/scribus/ui/colorlistmodel.h
    trunk/Scribus/scribus/ui/colorsandfills.cpp
    trunk/Scribus/scribus/ui/colorsandfills.h
    trunk/Scribus/scribus/ui/contextmenu.cpp
    trunk/Scribus/scribus/ui/cpalette.cpp
    trunk/Scribus/scribus/ui/createrange.cpp
    trunk/Scribus/scribus/ui/createrange.h
    trunk/Scribus/scribus/ui/curvewidget.cpp
    trunk/Scribus/scribus/ui/curvewidget.h
    trunk/Scribus/scribus/ui/customfdialog.cpp
    trunk/Scribus/scribus/ui/dcolor.cpp
    trunk/Scribus/scribus/ui/downloadspalette.cpp
    trunk/Scribus/scribus/ui/editor.cpp
    trunk/Scribus/scribus/ui/effectsdialog.cpp
    trunk/Scribus/scribus/ui/extimageprops.cpp
    trunk/Scribus/scribus/ui/fontcombo.cpp
    trunk/Scribus/scribus/ui/fontcombo.h
    trunk/Scribus/scribus/ui/fontembeddingcombo.cpp
    trunk/Scribus/scribus/ui/gradientvectordialog.cpp
    trunk/Scribus/scribus/ui/guidemanager.cpp
    trunk/Scribus/scribus/ui/helpbrowser.cpp
    trunk/Scribus/scribus/ui/imageinfodialog.cpp
    trunk/Scribus/scribus/ui/inlinepalette.cpp
    trunk/Scribus/scribus/ui/insertaframe.cpp
    trunk/Scribus/scribus/ui/inspage.cpp
    trunk/Scribus/scribus/ui/javadocs.cpp
    trunk/Scribus/scribus/ui/latexeditor.cpp
    trunk/Scribus/scribus/ui/latexeditor.h
    trunk/Scribus/scribus/ui/layers.cpp
    trunk/Scribus/scribus/ui/loremipsum.cpp
    trunk/Scribus/scribus/ui/marksmanager.cpp
    trunk/Scribus/scribus/ui/marksmanager.h
    trunk/Scribus/scribus/ui/markvariabletext.cpp
    trunk/Scribus/scribus/ui/measurements.cpp
    trunk/Scribus/scribus/ui/mergedoc.cpp
    trunk/Scribus/scribus/ui/movepage.cpp
    trunk/Scribus/scribus/ui/newfile.cpp
    trunk/Scribus/scribus/ui/nftdialog.cpp
    trunk/Scribus/scribus/ui/nodeeditpalette.cpp
    trunk/Scribus/scribus/ui/notesstyleseditor.cpp
    trunk/Scribus/scribus/ui/oneclick.cpp
    trunk/Scribus/scribus/ui/outlinepalette.cpp
    trunk/Scribus/scribus/ui/outlinepalette.h
    trunk/Scribus/scribus/ui/pagelayout.cpp
    trunk/Scribus/scribus/ui/pagepalette.cpp
    trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
    trunk/Scribus/scribus/ui/pagepalette_masterpages.h
    trunk/Scribus/scribus/ui/pagepalette_pages.cpp
    trunk/Scribus/scribus/ui/pagepalette_pages.h
    trunk/Scribus/scribus/ui/pagepalette_widgets.cpp
    trunk/Scribus/scribus/ui/pagepalette_widgets.h
    trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
    trunk/Scribus/scribus/ui/pageselector.cpp
    trunk/Scribus/scribus/ui/pdfexportdialog.cpp
    trunk/Scribus/scribus/ui/pdfversioncombo.cpp
    trunk/Scribus/scribus/ui/pdfversionmodel.cpp
    trunk/Scribus/scribus/ui/picsearch.cpp
    trunk/Scribus/scribus/ui/picstatus.cpp
    trunk/Scribus/scribus/ui/picstatus.h

Modified: trunk/Scribus/scribus/ui/bookmarkpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/bookmarkpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/bookmarkpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/bookmarkpalette.cpp	Sun Aug  5 10:33:40 2018
@@ -25,7 +25,7 @@
 
 #include "bookmarkpalette.h"
 
-BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books", 0 )
+BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books", nullptr )
 {
 	setObjectName(QString::fromLocal8Bit("Books"));
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));

Modified: trunk/Scribus/scribus/ui/buttonicon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/buttonicon.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/buttonicon.cpp	(original)
+++ trunk/Scribus/scribus/ui/buttonicon.cpp	Sun Aug  5 10:33:40 2018
@@ -163,7 +163,7 @@
 
 void ButtonIcon::SetScaleHow(int s)
 {
-	bool setter = (s == 3) ? true : false;
+	bool setter = s == 3;
 	GroupButton->setEnabled(setter);
 	TextLabel3->setEnabled(setter);
 	SliderX->setEnabled(setter);

Modified: trunk/Scribus/scribus/ui/charselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/charselect.cpp	Sun Aug  5 10:33:40 2018
@@ -24,7 +24,7 @@
 
 
 
-CharSelect::CharSelect(QWidget* parent) : ScrPaletteBase(parent, "CharSelect"), m_doc(0), m_enhanced(0), m_Item(0)
+CharSelect::CharSelect(QWidget* parent) : ScrPaletteBase(parent, "CharSelect"), m_doc(nullptr), m_enhanced(nullptr), m_Item(nullptr)
 {
 	setupUi(this);
 
@@ -45,21 +45,20 @@
 	m_userTable->setAcceptDrops(true);
 
 	// signals and slots connections
-	connect(m_userTable, SIGNAL(selectChar(uint, QString)), this, SLOT(userNewChar(uint, QString)));
-	connect(m_userTable->selectionModel(), SIGNAL(selectionChanged(const QItemSelection& ,const QItemSelection&)), this, SLOT(slot_selectionChanged(const QItemSelection&, const QItemSelection&)) );
-	connect(m_userTableModel, SIGNAL(rowAppended()), m_userTable, SLOT(resizeLastRow()));
-	connect(unicodeButton, SIGNAL(chosenUnicode(const QString &)), m_userTableModel, SLOT(appendUnicode(const QString &)));
-	connect(enhancedDialogButton, SIGNAL(toggled(bool)), this, SLOT(enhancedDialogButton_toggled(bool)));
-	connect(this, SIGNAL(insertUserSpecialChar(QChar, QString)), this, SLOT(slot_insertUserSpecialChar(QChar, QString)));
-	connect(uniLoadButton, SIGNAL(clicked()), this, SLOT(uniLoadButton_clicked()));
-	connect(uniSaveButton, SIGNAL(clicked()), this, SLOT(uniSaveButton_clicked()));
-	connect(uniClearButton, SIGNAL(clicked()), this, SLOT(uniClearButton_clicked()));
+	connect(m_userTable, SIGNAL(selectChar(uint,QString)),this,SLOT(userNewChar(uint,QString)));
+	connect(m_userTable->selectionModel(),SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),this,SLOT(slot_selectionChanged(const QItemSelection&,const QItemSelection&)));
+	connect(m_userTableModel,SIGNAL(rowAppended()),m_userTable,SLOT(resizeLastRow()));
+	connect(unicodeButton,SIGNAL(chosenUnicode(const QString&)),m_userTableModel,SLOT(appendUnicode(const QString&)));
+	connect(enhancedDialogButton, SIGNAL(toggled(bool)),this,SLOT(enhancedDialogButton_toggled(bool)));
+	connect(this,SIGNAL(insertUserSpecialChar(QChar,QString)),this,SLOT(slot_insertUserSpecialChar(QChar,QString)));
+	connect(uniLoadButton,SIGNAL(clicked()),this,SLOT(uniLoadButton_clicked()));
+	connect(uniSaveButton,SIGNAL(clicked()),this,SLOT(uniSaveButton_clicked()));
+	connect(uniClearButton,SIGNAL(clicked()),this,SLOT(uniClearButton_clicked()));
 }
 
 CharSelect::~CharSelect()
 {
-	if (m_unicodeSearchModel)
-		delete m_unicodeSearchModel;
+	delete m_unicodeSearchModel;
 }
 
 void CharSelect::setDoc(ScribusDoc* doc)
@@ -86,7 +85,7 @@
 	return chToIns;
 }
 
-void CharSelect::userNewChar(uint i, QString font)
+void CharSelect::userNewChar(uint i, const QString& font)
 {
 	emit insertUserSpecialChar(QChar(i), font);
 }
@@ -134,7 +133,7 @@
 // 	delEdit();
 }
 
-void CharSelect::slot_insertUserSpecialChar(QChar ch, QString font)
+void CharSelect::slot_insertUserSpecialChar(QChar ch, const QString& font)
 {
 	if (!m_Item)
 		return;
@@ -213,7 +212,7 @@
 	disconnect(m_enhanced, SIGNAL(paletteShown(bool)), enhancedDialogButton, SLOT(setChecked(bool)));
 	m_enhanced->close();
 	delete m_enhanced;
-	m_enhanced = 0;
+	m_enhanced = nullptr;
 }
 
 void CharSelect::enhancedDialogButton_toggled(bool state)
@@ -260,7 +259,7 @@
 		loadUserContent(f);
 }
 
-void CharSelect::loadUserContent(QString f)
+void CharSelect::loadUserContent(const QString& f)
 {
 //     tDebug("loadUserContent start");
 	QFile file(f);
@@ -315,7 +314,7 @@
 	saveUserContent(f);
 }
 
-void CharSelect::saveUserContent(QString f)
+void CharSelect::saveUserContent(const QString& f)
 {
 	QFile file(f);
 	if (file.open(QIODevice::WriteOnly))

Modified: trunk/Scribus/scribus/ui/charselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charselect.h
==============================================================================
--- trunk/Scribus/scribus/ui/charselect.h	(original)
+++ trunk/Scribus/scribus/ui/charselect.h	Sun Aug  5 10:33:40 2018
@@ -76,8 +76,8 @@
 
 	PageItem *m_Item;
 
-	void saveUserContent(QString f);
-	void loadUserContent(QString f);
+	void saveUserContent(const QString& f);
+	void loadUserContent(const QString& f);
 
 	void openEnhanced();
 	void closeEnhanced();
@@ -86,12 +86,12 @@
 	void enhancedDialogButton_toggled(bool);
 	void slot_insertSpecialChar();
 	void slot_insertSpecialChars(const QVector<uint> & chars);
-	void slot_insertUserSpecialChar(QChar, QString font);
+	void slot_insertUserSpecialChar(QChar, const QString& font);
 	void slot_selectionChanged( const QItemSelection&, const QItemSelection& );
 	void uniClearButton_clicked();
 	void uniLoadButton_clicked();
 	void uniSaveButton_clicked();
-	void userNewChar(uint i, QString font);
+	void userNewChar(uint i, const QString& font);
 
 };
 

Modified: trunk/Scribus/scribus/ui/charselectenhanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charselectenhanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.cpp	Sun Aug  5 10:33:40 2018
@@ -17,7 +17,7 @@
 
 CharSelectEnhanced::CharSelectEnhanced(QWidget* parent)
 		: ScrPaletteBase(parent, "CharSelectEnhanced"),
-		m_doc(0),
+		m_doc(nullptr),
 		m_characterClass(0)
 {
 	setupUi(this);
@@ -412,7 +412,7 @@
 //     tDebug("newFont end");
 }
 
-void CharSelectEnhanced::newChar(uint i, QString)
+void CharSelectEnhanced::newChar(uint i, const QString&)
 {
 	chToIns.append(i);
 	sample->setPixmap(FontSample((*m_doc->AllFonts)[m_fontInUse], 28, chToIns, palette().color(QPalette::Window), true));

Modified: trunk/Scribus/scribus/ui/charselectenhanced.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charselectenhanced.h
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.h	(original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.h	Sun Aug  5 10:33:40 2018
@@ -35,7 +35,7 @@
 	void insertSpecialChars(const QVector<uint> & chars);
 
 public slots:
-	void newChar(uint i, QString);
+	void newChar(uint i, const QString&);
 	void delChar();
 	void newFont(int font);
 	void newCharClass(int c);

Modified: trunk/Scribus/scribus/ui/charzoom.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charzoom.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charzoom.cpp	(original)
+++ trunk/Scribus/scribus/ui/charzoom.cpp	Sun Aug  5 10:33:40 2018
@@ -6,7 +6,7 @@
 #include "scpainter.h"
 
 
-CharZoom::CharZoom(QWidget* parent, uint currentChar, ScFace face)
+CharZoom::CharZoom(QWidget* parent, uint currentChar, const ScFace& face)
 #ifdef Q_OS_MAC
 	: QDialog( parent, Qt::FramelessWindowHint | Qt::Popup)
 #else

Modified: trunk/Scribus/scribus/ui/charzoom.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/charzoom.h
==============================================================================
--- trunk/Scribus/scribus/ui/charzoom.h	(original)
+++ trunk/Scribus/scribus/ui/charzoom.h	Sun Aug  5 10:33:40 2018
@@ -17,7 +17,7 @@
 	Q_OBJECT
 
 	public:
-		CharZoom(QWidget* parent, uint currentChar, ScFace face);
+		CharZoom(QWidget* parent, uint currentChar, const ScFace& face);
 		~CharZoom() {};
 	private:
 		void paintEvent(QPaintEvent *);

Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp	(original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp	Sun Aug  5 10:33:40 2018
@@ -36,8 +36,8 @@
 // #define COLUMN_INFO 3
 
 CheckDocument::CheckDocument( QWidget* parent, bool modal )
-	: ScrPaletteBase( parent, "checkDocument", modal, 0 ),
-	m_Doc(0),
+	: ScrPaletteBase( parent, "checkDocument", modal, nullptr ),
+	m_Doc(nullptr),
 	pageGraveError(false),
 	itemError(false),
 	minResDPI(0),
@@ -222,7 +222,7 @@
 void CheckDocument::newScan(const QString& name)
 {
 	clearErrorList();
-	if (m_Doc==0)
+	if (m_Doc==nullptr)
 		return;
 	m_Doc->setCurCheckProfile(name);
 	DocumentChecker::checkDocument(m_Doc);
@@ -245,9 +245,9 @@
 							   PreflightError errorType,
 							   PageItem * pageItem)
 {
-	Q_ASSERT_X(item != 0, "CheckDocument::buildItem",
+	Q_ASSERT_X(item != nullptr, "CheckDocument::buildItem",
 				"No reference to QTreeWidgetItem item");
-	Q_ASSERT_X(pageItem != 0, "CheckDocument::buildItem",
+	Q_ASSERT_X(pageItem != nullptr, "CheckDocument::buildItem",
 				"No reference to PageItem pageItem");
 
 	switch (errorType)
@@ -374,7 +374,7 @@
 	curCheckProfile->clear();
 	clearErrorList();
 
-	if (m_Doc==0)
+	if (m_Doc==nullptr)
 		return;
 
 	minResDPI = qRound(doc->checkerProfiles()[doc->curCheckProfile()].minResolution);

Modified: trunk/Scribus/scribus/ui/cmykfw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/cmykfw.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cmykfw.cpp	(original)
+++ trunk/Scribus/scribus/ui/cmykfw.cpp	Sun Aug  5 10:33:40 2018
@@ -1145,9 +1145,6 @@
 			ColorName->setFocus();
 			return;
 		}
-		else
-			accept();
-	}
-	else
-		accept();
-}
+	}
+	accept();
+}

Modified: trunk/Scribus/scribus/ui/colorchart.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorchart.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorchart.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorchart.cpp	Sun Aug  5 10:33:40 2018
@@ -29,7 +29,7 @@
 #include "scribuscore.h"
 #include "scribusdoc.h"
 
-ColorChart::ColorChart(QWidget *parent) : QWidget(parent), m_doc(0)
+ColorChart::ColorChart(QWidget *parent) : QWidget(parent), m_doc(nullptr)
 {
 	Xp = 0;
 	Yp = 0;

Modified: trunk/Scribus/scribus/ui/colorcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorcombo.cpp	Sun Aug  5 10:33:40 2018
@@ -20,9 +20,6 @@
 
 ColorCombo::ColorCombo(QWidget* parent) : QComboBox(parent)
 {
-#ifdef Q_OS_MAC
-//	setStyle( new ColorCombo::ScMacStyle() );
-#endif
 	setEditable(false);
 	ColorListBox* lb = new ColorListBox(this);
 	setModel( lb->model() );
@@ -32,9 +29,7 @@
 
 ColorCombo::ColorCombo(ColorCombo::PixmapType type, QWidget* parent) : QComboBox(parent)
 {
-#ifdef Q_OS_MAC
-//	setStyle( new ColorCombo::ScMacStyle() );
-#endif
+
 	setEditable(false);
 	ColorListBox::PixmapType clbType = ColorListBox::smallPixmap;
 	if (type == ColorCombo::widePixmaps)
@@ -49,9 +44,6 @@
 
 ColorCombo::ColorCombo(bool rw, QWidget* parent) : QComboBox(parent)
 {
-#ifdef Q_OS_MAC
-//	setStyle( new ColorCombo::ScMacStyle() );
-#endif
 	setEditable(rw);
 	ColorListBox* lb = new ColorListBox(this);
 	setModel( lb->model() );
@@ -62,7 +54,7 @@
 
 QString ColorCombo::currentColor() const
 {
-	QString  colorName = currentText();
+	QString colorName(currentText());
 	if (colorName == CommonStrings::tr_NoneColor)
 		colorName = CommonStrings::None;
 	return colorName;
@@ -95,7 +87,7 @@
 		clb->setPixmapType(ColorListBox::fancyPixmap);
 }
 
-void ColorCombo::initColorList(ColorList *colorList, ScribusDoc *doc, QString colorValue)
+void ColorCombo::initColorList(ColorList *colorList, ScribusDoc *doc, const QString& colorValue)
 {
 	clear();
 	setPixmapType(ColorCombo::fancyPixmaps);

Modified: trunk/Scribus/scribus/ui/colorcombo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorcombo.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorcombo.h	(original)
+++ trunk/Scribus/scribus/ui/colorcombo.h	Sun Aug  5 10:33:40 2018
@@ -52,7 +52,7 @@
 	void setColors(ColorList& list, bool insertNone = true);
 	void setPixmapType(ColorCombo::PixmapType type);
 
-	void initColorList(ColorList* colorList, ScribusDoc* doc, QString colorValue);
+	void initColorList(ColorList* colorList, ScribusDoc* doc, const QString& colorValue);
 };
 
 #endif

Modified: trunk/Scribus/scribus/ui/colorlistbox.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorlistbox.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistbox.h	(original)
+++ trunk/Scribus/scribus/ui/colorlistbox.h	Sun Aug  5 10:33:40 2018
@@ -69,7 +69,7 @@
 		bool hasSelection() const;
 
 		/*! Insert color at specified position */
-		void insertItem(int row, const ScColor& color, QString colorName);
+		void insertItem(int row, const ScColor& color, const QString& colorName);
 
 		/*! Return if none color is shown at beginning oh list */
 		bool isNoneColorShown() const;
@@ -87,7 +87,7 @@
 		void removeItem(int i);
 
 		/*! Find row index for specified colorname */
-		int row(QString colorName);
+		int row(const QString& colorName);
 
 		/*! \brief Fill the list box with values taken from list.
 		The list is cleared itself. Then is rendered an icon with

Modified: trunk/Scribus/scribus/ui/colorlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistmodel.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorlistmodel.cpp	Sun Aug  5 10:33:40 2018
@@ -10,7 +10,7 @@
 #include "colorlistbox.h"
 #include "commonstrings.h"
 
-ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), 0, CommonStrings::None);
+ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr, CommonStrings::None);
 
 ColorListModel::ColorListModel(QObject *parent)
 	          : QAbstractItemModel(parent)
@@ -56,13 +56,13 @@
 			color.getRawRGBColor(&r, &g, &b);
 			return tr("R: %1 G: %2 B: %3").arg(r).arg(g).arg(b);
 		}
-		else if (color.getColorModel() == colorModelCMYK)
+		if (color.getColorModel() == colorModelCMYK)
 		{
 			double c, m, y, k;
 			color.getCMYK(&c, &m, &y, &k);
 			return tr("C: %1% M: %2% Y: %3% K: %4%").arg(c * 100, 0, 'f', 2).arg(m * 100, 0, 'f', 2).arg(y * 100, 0, 'f', 2).arg(k * 100, 0, 'f', 2);
 		}
-		else if (color.getColorModel() == colorModelLab)
+		if (color.getColorModel() == colorModelLab)
 		{
 			double L, a, b;
 			color.getLab(&L, &a, &b);
@@ -84,7 +84,7 @@
 Qt::ItemFlags ColorListModel::flags(const QModelIndex &index) const
 {
 	if (!index.isValid())
-		return 0;
+		return nullptr;
 
 	Qt::ItemFlags flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 	return flags;
@@ -172,12 +172,12 @@
 	m_colors.reserve(colorList.count());
 
 	if (m_isNoneColorShown)
-		m_colors.append(ColorPixmapValue(ScColor(), 0, CommonStrings::None));
+		m_colors.append(ColorPixmapValue(ScColor(), nullptr, CommonStrings::None));
 
 	ColorList::const_iterator iter;
 	for (iter = colorList.begin(); iter != colorList.end(); ++iter)
 	{
-		QString colorName = iter.key();
+		const QString& colorName = iter.key();
 		const ScColor& color = iter.value();
 		m_colors.append(ColorPixmapValue(color, doc, colorName));
 	}

Modified: trunk/Scribus/scribus/ui/colorlistmodel.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorlistmodel.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorlistmodel.h	(original)
+++ trunk/Scribus/scribus/ui/colorlistmodel.h	Sun Aug  5 10:33:40 2018
@@ -23,7 +23,7 @@
 	QString m_name;
 
 	ColorPixmapValue();
-	ColorPixmapValue( const ScColor& col, ScribusDoc* doc, const QString colName );
+	ColorPixmapValue( const ScColor& col, ScribusDoc* doc, const QString& colName );
 	ColorPixmapValue(const ColorPixmapValue& other);
 	ColorPixmapValue& operator= (const ColorPixmapValue& other);
 };

Modified: trunk/Scribus/scribus/ui/colorsandfills.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorsandfills.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.cpp	(original)
+++ trunk/Scribus/scribus/ui/colorsandfills.cpp	Sun Aug  5 10:33:40 2018
@@ -176,14 +176,14 @@
 	accept();
 }
 
-QTreeWidgetItem* ColorsAndFillsDialog::updatePatternList(QString addedName)
+QTreeWidgetItem* ColorsAndFillsDialog::updatePatternList(const QString& addedName)
 {
 	QList<QTreeWidgetItem*> lg = patternItems->takeChildren();
 	for (int a = 0; a < lg.count(); a++)
 	{
 		delete lg[a];
 	}
-	QTreeWidgetItem* ret = 0;
+	QTreeWidgetItem* ret = nullptr;
 	QStringList patK = dialogPatterns.keys();
 	qSort(patK);
 	for (int a = 0; a < patK.count(); a++)
@@ -210,14 +210,14 @@
 	return ret;
 }
 
-QTreeWidgetItem* ColorsAndFillsDialog::updateGradientList(QString addedName)
+QTreeWidgetItem* ColorsAndFillsDialog::updateGradientList(const QString& addedName)
 {
 	QList<QTreeWidgetItem*> lg = gradientItems->takeChildren();
 	for (int a = 0; a < lg.count(); a++)
 	{
 		delete lg[a];
 	}
-	QTreeWidgetItem* ret = 0;
+	QTreeWidgetItem* ret = nullptr;
 	QStringList patK = dialogGradients.keys();
 	qSort(patK);
 	for (int a = 0; a < patK.count(); a++)
@@ -249,14 +249,14 @@
 	return ret;
 }
 
-QTreeWidgetItem* ColorsAndFillsDialog::updateColorList(QString addedName)
+QTreeWidgetItem* ColorsAndFillsDialog::updateColorList(const QString& addedName)
 {
 	QList<QTreeWidgetItem*> lg = colorItems->takeChildren();
 	for (int a = 0; a < lg.count(); a++)
 	{
 		delete lg[a];
 	}
-	QTreeWidgetItem* ret = 0;
+	QTreeWidgetItem* ret = nullptr;
 	if (sortRule > 0)
 	{
 		QMap<QString, QString> sortMap;
@@ -457,7 +457,7 @@
 		{
 			dialogGradients.insert(dia->name(), dia->gradient());
 			QTreeWidgetItem *lg = updateGradientList(dia->name());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -476,7 +476,7 @@
 			dia->Farbe.setSpotColor(dia->isSpotColor());
 			m_colorList.insert(dia->colorName(), dia->Farbe);
 			QTreeWidgetItem *lg = updateColorList(dia->colorName());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -492,7 +492,7 @@
 		updateColorList();
 		updateGradientList();
 		updatePatternList();
-		itemSelected(0);
+		itemSelected(nullptr);
 	}
 }
 
@@ -541,7 +541,7 @@
 				dialogPatterns[patterns[c]].pattern = ite->DrawObj_toImage(pa.items, 1.0);
 			}
 			QTreeWidgetItem *lg = updateGradientList(dia->name());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -569,7 +569,7 @@
 			updateGradientList();
 			updatePatternList();
 			QTreeWidgetItem *lg = updateColorList(dia->colorName());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -583,7 +583,7 @@
 	{
 		QString patternName = origNames[it->text(0)];
 		QString newName = "";
-		Query dia(this, "tt", 1, tr("&Name:"), tr("Rename Entry"));
+		Query dia(this, "tt", true, tr("&Name:"), tr("Rename Entry"));
 		dia.setEditText(it->text(0), true);
 		dia.setTestList(dialogPatterns.keys());
 		if (dia.exec())
@@ -616,7 +616,7 @@
 				}
 			}
 			QTreeWidgetItem *lg = updatePatternList(newName);
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -659,7 +659,7 @@
 				dialogGradients[gradN] = dia->gradient();
 			updatePatternList();
 			QTreeWidgetItem *lg = updateGradientList(dia->name());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -694,7 +694,7 @@
 			updateGradientList();
 			updatePatternList();
 			QTreeWidgetItem *lg = updateColorList(dia->colorName());
-			if (lg != 0)
+			if (lg != nullptr)
 			{
 				dataTree->expandItem(lg->parent());
 				dataTree->setCurrentItem(lg, 0, QItemSelectionModel::ClearAndSelect);
@@ -799,7 +799,7 @@
 		updatePatternList();
 		updateGradientList();
 		updateColorList();
-		itemSelected(0);
+		itemSelected(nullptr);
 	}
 	else
 	{
@@ -932,12 +932,12 @@
 		updatePatternList();
 		updateGradientList();
 		updateColorList();
-		itemSelected(0);
+		itemSelected(nullptr);
 		modified = true;
 	}
 }
 
-QStringList ColorsAndFillsDialog::getUsedPatternsHelper(QString pattern, QStringList &results)
+QStringList ColorsAndFillsDialog::getUsedPatternsHelper(const QString& pattern, QStringList &results)
 {
 	ScPattern *pat = &dialogPatterns[pattern];
 	QStringList pats;
@@ -1011,7 +1011,7 @@
 		updatePatternList();
 		updateGradientList();
 		updateColorList();
-		itemSelected(0);
+		itemSelected(nullptr);
 		modified = true;
 	}
 }
@@ -1051,7 +1051,7 @@
 				loadGimpFormat(fileName);
 			updateGradientList();
 			updateColorList();
-			itemSelected(0);
+			itemSelected(nullptr);
 			modified = true;
 		}
 	}
@@ -1089,7 +1089,7 @@
 			updateColorList();
 			modified = true;
 		}
-		itemSelected(0);
+		itemSelected(nullptr);
 	}
 	else if ((it->parent() == patternItems) || (it == patternItems))
 	{
@@ -1098,7 +1098,7 @@
 		QString allFormats = tr("All Supported Formats")+" (";
 		int fmtCode = FORMATID_FIRSTUSER;
 		const FileFormat *fmt = LoadSavePlugin::getFormatById(fmtCode);
-		while (fmt != 0)
+		while (fmt != nullptr)
 		{
 			if (fmt->load)
 			{
@@ -1216,7 +1216,7 @@
 		updateColorList();
 		updateGradientList();
 		updatePatternList();
-		itemSelected(0);
+		itemSelected(nullptr);
 		qApp->restoreOverrideCursor();
 	}
 }
@@ -1275,7 +1275,7 @@
 				QString ext = fi.suffix().toLower();
 				if ((ext == "sce") || (!formats.contains(ext)))
 					continue;
-				else if (formats.contains(ext))
+				if (formats.contains(ext))
 				{
 					QString patNam = fi.baseName().trimmed().simplified().replace(" ", "_");
 					if (!dialogPatterns.contains(patNam))
@@ -1299,7 +1299,7 @@
 	}
 }
 
-void ColorsAndFillsDialog::loadVectors(QString data)
+void ColorsAndFillsDialog::loadVectors(const QString& data)
 {
 	int storedPageNum = m_doc->currentPageNumber();
 	int storedContentsX = m_doc->view()->contentsX();
@@ -1337,7 +1337,7 @@
 			const FileFormat * fmt = LoadSavePlugin::getFormatById(testResult);
 			if( fmt )
 			{
-				fmt->setupTargets(m_doc, 0, mainWin, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+				fmt->setupTargets(m_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
 				fmt->loadFile(data, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfScripted|LoadSavePlugin::lfKeepPatterns|LoadSavePlugin::lfLoadAsPattern);
 			}
 		}
@@ -1423,14 +1423,12 @@
 	m_doc->view()->setContentsPos(static_cast<int>(storedContentsX * storedViewScale), static_cast<int>(storedContentsY * storedViewScale));
 }
 
-bool ColorsAndFillsDialog::isMandatoryColor(QString colorName)
+bool ColorsAndFillsDialog::isMandatoryColor(const QString& colorName)
 {
 	if (colorName == "Black" || colorName == "White")
 		return true;
 	ScColor color = m_colorList.value(colorName, ScColor());
-	if (color.isRegistrationColor())
-		return true;
-	return false;
+	return color.isRegistrationColor();
 }
 
 QString ColorsAndFillsDialog::getColorTooltip(const ScColor& color)
@@ -1524,7 +1522,7 @@
 	return colorList;
 }
 
-void ColorsAndFillsDialog::updateGradientColors(QString newName, QString oldName)
+void ColorsAndFillsDialog::updateGradientColors(const QString& newName, const QString& oldName)
 {
 	QHash<QString,VGradient>::Iterator itg;
 	for (itg = dialogGradients.begin(); itg != dialogGradients.end(); ++itg)
@@ -1610,7 +1608,7 @@
 	m_doc->PageColors = colorListBack;
 }
 
-void ColorsAndFillsDialog::loadGimpFormat(QString fileName)
+void ColorsAndFillsDialog::loadGimpFormat(const QString& fileName)
 {
 	QFile f(fileName);
 	if (f.open(QIODevice::ReadOnly))
@@ -1759,7 +1757,7 @@
 	}
 }
 
-void ColorsAndFillsDialog::loadScribusFormat(QString fileName)
+void ColorsAndFillsDialog::loadScribusFormat(const QString& fileName)
 {
 	QFile f(fileName);
 	if(!f.open(QIODevice::ReadOnly))
@@ -1932,7 +1930,7 @@
 	updateColorList();
 	updateGradientList();
 	updatePatternList();
-	itemSelected(0);
+	itemSelected(nullptr);
 }
 
 void ColorsAndFillsDialog::saveDefaults()
@@ -1950,7 +1948,7 @@
 	delete dia;
 }
 
-void ColorsAndFillsDialog::doSaveDefaults(QString name, bool changed)
+void ColorsAndFillsDialog::doSaveDefaults(const QString& name, bool changed)
 {
 	QString filename = name;
 	filename.replace(" ", "_");
@@ -1963,11 +1961,11 @@
 		s_doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 		s_doc->setPage(100, 100, 0, 0, 0, 0, 0, 0, false, false);
 		s_doc->addPage(0);
-		s_doc->setGUI(false, mainWin, 0);
+		s_doc->setGUI(false, mainWin, nullptr);
 		s_doc->PageColors = m_colorList;
 		s_doc->setGradients(dialogGradients);
 		s_doc->setPatterns(dialogPatterns);
-		fmt->setupTargets(s_doc, 0, mainWin, 0, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+		fmt->setupTargets(s_doc, nullptr, mainWin, nullptr, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
 		fmt->savePalette(filename);
 		delete s_doc;
 	}

Modified: trunk/Scribus/scribus/ui/colorsandfills.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/colorsandfills.h
==============================================================================
--- trunk/Scribus/scribus/ui/colorsandfills.h	(original)
+++ trunk/Scribus/scribus/ui/colorsandfills.h	Sun Aug  5 10:33:40 2018
@@ -89,20 +89,20 @@
 		void saveDefaults();
 
 	protected:
-		QTreeWidgetItem* updatePatternList(QString addedName = "");
-		QTreeWidgetItem* updateGradientList(QString addedName = "");
-		QTreeWidgetItem* updateColorList(QString addedName = "");
+		QTreeWidgetItem* updatePatternList(const QString& addedName = "");
+		QTreeWidgetItem* updateGradientList(const QString& addedName = "");
+		QTreeWidgetItem* updateColorList(const QString& addedName = "");
 		ColorList getGradientColors();
 		QString getColorTooltip(const ScColor& color);
-		bool isMandatoryColor(QString colorName);
+		bool isMandatoryColor(const QString& colorName);
 		void loadPatternDir();
-		void loadVectors(QString data);
-		void updateGradientColors(QString newName, QString oldName);
-		void loadGimpFormat(QString fileName);
+		void loadVectors(const QString& data);
+		void updateGradientColors(const QString& newName, const QString& oldName);
+		void loadGimpFormat(const QString& fileName);
 		void addGimpColor(QString &colorName, double r, double g, double b);
-		void loadScribusFormat(QString fileName);
-		QStringList getUsedPatternsHelper(QString pattern, QStringList &results);
-		void doSaveDefaults(QString name, bool changed = false);
+		void loadScribusFormat(const QString& fileName);
+		QStringList getUsedPatternsHelper(const QString& pattern, QStringList &results);
+		void doSaveDefaults(const QString& name, bool changed = false);
 		ColorSetManager csm;
 		bool paletteLocked;
 		bool modified;

Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp	(original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp	Sun Aug  5 10:33:40 2018
@@ -84,7 +84,7 @@
 	bool itemsAreSameType=m_Sel.itemsAreSameType();
 	//Find our doc from first item in selection if we have an item
 	PageItem *currItem = m_Sel.itemAt(0);
-	assert(m_doc!=0 && currItem!=0);
+	assert(m_doc!=nullptr && currItem!=nullptr);
 	
 	QMenu *menuConvertTo = new QMenu(this);
 	QMenu *menuEditContent = new QMenu(this);
@@ -590,7 +590,6 @@
 		QAction *act = addMenu(menuPasteRecent);
 		act->setText( tr("Paste Recent"));
 		
-		QMap<QString, QPointer<ScrAction> > scrRecentPasteActions;
 		ScrAction *recentPasteAction;
 		foreach (recentPasteAction, m_ScMW->scrRecentPasteActions)
 			menuPasteRecent->addAction(recentPasteAction);

Modified: trunk/Scribus/scribus/ui/cpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/cpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/cpalette.cpp	Sun Aug  5 10:33:40 2018
@@ -117,7 +117,7 @@
 	gradientTypeStroke->setCurrentIndex(0);
 	
 	tabFillStroke->setCurrentIndex(0);
-	setCurrentItem(0);
+	setCurrentItem(nullptr);
 	hatchAngle->setDecimals(0);
 	hatchAngle->setNewUnit(6);
 	hatchDist->setDecimals(0);
@@ -350,18 +350,18 @@
 
 void Cpalette::setDocument(ScribusDoc* doc)
 {
-	disconnect(this, SIGNAL(NewPen(QString)), 0, 0);
-	disconnect(this, SIGNAL(NewBrush(QString)), 0, 0);
-	disconnect(this, SIGNAL(NewPenShade(double)), 0, 0);
-	disconnect(this, SIGNAL(NewBrushShade(double)), 0, 0);
-	disconnect(this, SIGNAL(NewGradient(int)), 0, 0);
-	disconnect(this, SIGNAL(NewGradientS(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);
-	disconnect(this, SIGNAL(NewOverprint(int)), 0, 0);
-	disconnect(this, SIGNAL(NewPatternS(QString)), 0, 0);
-	disconnect(this, SIGNAL(NewPatternTypeS(bool)), 0, 0);
-	disconnect(this, SIGNAL(NewPatternPropsS(double, double, double, double, double, double, double, double, bool, bool)), 0, 0);
+	this->disconnect(SIGNAL(NewPen(QString)));
+	this->disconnect(SIGNAL(NewBrush(QString)));
+	this->disconnect(SIGNAL(NewPenShade(double)));
+	this->disconnect(SIGNAL(NewBrushShade(double)));
+	this->disconnect(SIGNAL(NewGradient(int)));
+	this->disconnect(SIGNAL(NewGradientS(int)));
+	this->disconnect(SIGNAL(NewPattern(QString)));
+	this->disconnect(SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)));
+	this->disconnect(SIGNAL(NewOverprint(int)));
+	this->disconnect(SIGNAL(NewPatternS(QString)));
+	this->disconnect(SIGNAL(NewPatternTypeS(bool)));
+	this->disconnect(SIGNAL(NewPatternPropsS(double, double, double, double, double, double, double, double, bool, bool)));
 	disconnect(displayAllColors, SIGNAL(clicked()), this, SLOT(toggleColorDisplay()));
 
 	if (currentDoc)

Modified: trunk/Scribus/scribus/ui/createrange.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/createrange.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.cpp	(original)
+++ trunk/Scribus/scribus/ui/createrange.cpp	Sun Aug  5 10:33:40 2018
@@ -17,7 +17,7 @@
 #include <QString>
 #include <QTabWidget>
 
-CreateRange::CreateRange(QString currText, int pageCount, QWidget* parent) : QDialog(parent),
+CreateRange::CreateRange(const QString& currText, int pageCount, QWidget* parent) : QDialog(parent),
 	m_PageCount(pageCount),
 	m_RangeType(0),
 	m_BasicRangeType(0)

Modified: trunk/Scribus/scribus/ui/createrange.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/createrange.h
==============================================================================
--- trunk/Scribus/scribus/ui/createrange.h	(original)
+++ trunk/Scribus/scribus/ui/createrange.h	Sun Aug  5 10:33:40 2018
@@ -18,7 +18,7 @@
 {
 	Q_OBJECT
 	public:
-		CreateRange(QString currText, int pageCount, QWidget* parent);
+		CreateRange(const QString& currText, int pageCount, QWidget* parent);
 		~CreateRange();
 		void getCreateRangeData(CreateRangeData&);
 		

Modified: trunk/Scribus/scribus/ui/curvewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/curvewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/curvewidget.cpp	(original)
+++ trunk/Scribus/scribus/ui/curvewidget.cpp	Sun Aug  5 10:33:40 2018
@@ -288,7 +288,7 @@
 	return m_points.copy();
 }
 
-void KCurve::setCurve(FPointArray inlist)
+void KCurve::setCurve(const FPointArray& inlist)
 {
 	m_points_back = m_points.copy();
 	m_points.resize(0);
@@ -465,7 +465,7 @@
 			efval += tmp;
 			for (int p = 0; p < Vals.size(); p++)
 			{
-				FPoint pv = Vals.point(p);
+				const FPoint& pv = Vals.point(p);
 				efval += QString(" %1 %2").arg(pv.x()).arg(pv.y());
 			}
 			if (cDisplay->isLinear())

Modified: trunk/Scribus/scribus/ui/curvewidget.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/curvewidget.h
==============================================================================
--- trunk/Scribus/scribus/ui/curvewidget.h	(original)
+++ trunk/Scribus/scribus/ui/curvewidget.h	Sun Aug  5 10:33:40 2018
@@ -42,7 +42,7 @@
 public:
 	double getCurveValue(double x);
 	FPointArray getCurve();
-	void setCurve(FPointArray inlist);
+	void setCurve(const FPointArray& inlist);
 	void resetCurve();
 	void setLinear(bool setter);
 	bool isLinear();

Modified: trunk/Scribus/scribus/ui/customfdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/customfdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/customfdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/customfdialog.cpp	Sun Aug  5 10:33:40 2018
@@ -159,7 +159,7 @@
 	{
 		ScImage im;
 		//No doc to send data anyway, so no doc to get into scimage.
-		CMSettings cms(0, "", Intent_Perceptual);
+		CMSettings cms(nullptr, "", Intent_Perceptual);
 		cms.allowColorManagement(false);
 		if (im.loadPicture(name, 1, cms, ScImage::Thumbnail, 72, &mode))
 		{

Modified: trunk/Scribus/scribus/ui/dcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/dcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/dcolor.cpp	Sun Aug  5 10:33:40 2018
@@ -40,8 +40,8 @@
 
 	PrefsManager* prefsManager = PrefsManager::instance();
 	bool isToolColor = prefsManager->isToolColor(colorName);
-	replaceLabel = 0;
-	replacementColData = 0;
+	replaceLabel = nullptr;
+	replacementColData = nullptr;
 	if (haveDoc || isToolColor)
 	{
 		replaceLabel = new QLabel( tr( "Replace With:" ), this );

Modified: trunk/Scribus/scribus/ui/downloadspalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/downloadspalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/downloadspalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/downloadspalette.cpp	Sun Aug  5 10:33:40 2018
@@ -1,6 +1,6 @@
 #include "downloadspalette.h"
 
-DownloadsPalette::DownloadsPalette(QWidget* parent) : ScrPaletteBase( parent, "DownloadsPalette", false, 0 )
+DownloadsPalette::DownloadsPalette(QWidget* parent) : ScrPaletteBase( parent, "DownloadsPalette", false, nullptr )
 {
 	setupUi(this);
 	languageChange();

Modified: trunk/Scribus/scribus/ui/editor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/editor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/editor.cpp	(original)
+++ trunk/Scribus/scribus/ui/editor.cpp	Sun Aug  5 10:33:40 2018
@@ -119,7 +119,7 @@
 
 void Editor::GetFieldNames()
 {
-	if (view != 0)
+	if (view != nullptr)
 	{
 		SelectFields* dia = new SelectFields(this, "", "", view->Doc, 0);
 		if (dia->exec())

Modified: trunk/Scribus/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/effectsdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/effectsdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/effectsdialog.cpp	Sun Aug  5 10:33:40 2018
@@ -48,7 +48,7 @@
 	m_item = item;
 	effectsList = m_item->effectsInUse;
 	m_doc = docc;
-	currentOptions = 0;
+	currentOptions = nullptr;
 
 //	CMSettings cms(docc, "", Intent_Perceptual);
 //	cms.allowColorManagement(false);
@@ -936,7 +936,7 @@
 	int curr = usedEffects->currentRow();
 	QListWidgetItem *it = usedEffects->takeItem(curr);
 	delete it;
-	currentOptions = 0;
+	currentOptions = nullptr;
 	usedEffects->clearSelection();
 	if (usedEffects->count() == 0)
 	{
@@ -1003,7 +1003,7 @@
 		{
 			effectUp->setEnabled(true);
 			effectDown->setEnabled(true);
-			if (usedEffects->currentItem() == 0)
+			if (usedEffects->currentItem() == nullptr)
 				effectUp->setEnabled(false);
 			if (usedEffects->currentRow() == static_cast<int>(usedEffects->count())-1)
 				effectDown->setEnabled(false);
@@ -1402,7 +1402,7 @@
 	effectDown->setEnabled(false);
 	disconnect( usedEffects, SIGNAL( itemActivated(QListWidgetItem*) ), this, SLOT( selectEffect(QListWidgetItem*) ) );
 	selectEffectHelper();
-	currentOptions = 0;
+	currentOptions = nullptr;
 	usedEffects->clearSelection();
 	optionStack->setCurrentIndex(0);
 	connect( usedEffects, SIGNAL( itemActivated(QListWidgetItem*) ), this, SLOT( selectEffect(QListWidgetItem*) ) );
@@ -1410,7 +1410,7 @@
 
 void EffectsDialog::selectEffectHelper(bool final)
 {
-	if (currentOptions != 0)
+	if (currentOptions != nullptr)
 	{
 		if (currentOptions->text() == tr("Colorize"))
 		{

Modified: trunk/Scribus/scribus/ui/extimageprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/extimageprops.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/extimageprops.cpp	(original)
+++ trunk/Scribus/scribus/ui/extimageprops.cpp	Sun Aug  5 10:33:40 2018
@@ -43,7 +43,7 @@
 	ExtImagePropsLayout->setMargin(6);
 	ExtImagePropsLayout->setSpacing(6);
 	m_view  = view;
-	m_timer = 0;
+	m_timer = nullptr;
 	if (info->layerInfo.count() != 0)
 	{
 		m_timer = new QTimer(this);

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Sun Aug  5 10:33:40 2018
@@ -54,7 +54,7 @@
 	setValidator(new FontComboValidator(this));
 	setInsertPolicy(QComboBox::NoInsert);
 	setItemDelegate(new FontFamilyDelegate(this));
-	RebuildList(0);
+	RebuildList(nullptr);
 }
 
 void FontCombo::RebuildList(ScribusDoc *currentDoc, bool forAnnotation, bool forSubstitute)
@@ -103,8 +103,8 @@
 
 FontComboH::FontComboH(QWidget* parent, bool labels) :
 		QWidget(parent),
-		fontFaceLabel(0),
-		fontStyleLabel(0),
+		fontFaceLabel(nullptr),
+		fontStyleLabel(nullptr),
 		showLabels(labels)
 {
 	currDoc = nullptr;
@@ -135,7 +135,7 @@
 	fontStyle = new ScComboBox(this);
 	fontComboLayout->addWidget(fontStyle,1,col);
 	isForAnnotation = true;  // this is merely to ensure that the list is rebuilt
-	RebuildList(0);
+	rebuildList(nullptr);
 	connect(fontFamily, SIGNAL(activated(int)), this, SLOT(familySelected(int)));
 	connect(fontStyle, SIGNAL(activated(int)), this, SLOT(styleSelected(int)));
 	languageChange();
@@ -235,7 +235,7 @@
 	fontStyle->blockSignals(styleSigBlocked);
 }
 
-void FontComboH::RebuildList(ScribusDoc *currentDoc, bool forAnnotation, bool forSubstitute)
+void FontComboH::rebuildList(ScribusDoc *currentDoc, bool forAnnotation, bool forSubstitute)
 {
 	// if we already have the proper fonts loaded, we need to do nothing
 	if ((currDoc == currentDoc) && (forAnnotation == isForAnnotation) && (isForSubstitute == forSubstitute))

Modified: trunk/Scribus/scribus/ui/fontcombo.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/fontcombo.h
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.h	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.h	Sun Aug  5 10:33:40 2018
@@ -74,7 +74,7 @@
 	virtual void changeEvent(QEvent *e);
 	
 	QString currentFont();
-	void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
+	void rebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
 
 public slots:
 	void setCurrentFont(QString f);

Modified: trunk/Scribus/scribus/ui/fontembeddingcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/fontembeddingcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontembeddingcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontembeddingcombo.cpp	Sun Aug  5 10:33:40 2018
@@ -25,7 +25,7 @@
 	if (m_fontEmbeddingModel)
 	{
 		delete m_fontEmbeddingModel;
-		m_fontEmbeddingModel = 0;
+		m_fontEmbeddingModel = nullptr;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/gradientvectordialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/gradientvectordialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradientvectordialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/gradientvectordialog.cpp	Sun Aug  5 10:33:40 2018
@@ -25,7 +25,7 @@
 #include "units.h"
 #include "iconmanager.h"
 
-GradientVectorDialog::GradientVectorDialog(QWidget* parent) : ScrPaletteBase( parent, "GradientVectorPalette", false, 0 )
+GradientVectorDialog::GradientVectorDialog(QWidget* parent) : ScrPaletteBase( parent, "GradientVectorPalette", false, nullptr )
 {
 	m_unitRatio = 1.0;
 

Modified: trunk/Scribus/scribus/ui/guidemanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/guidemanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/guidemanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/guidemanager.cpp	Sun Aug  5 10:33:40 2018
@@ -42,8 +42,8 @@
 
 GuideManager::GuideManager(QWidget* parent) :
 		ScrPaletteBase(parent, "GuideManager"),
-		m_Doc(0),
-		currentPage(0),
+		m_Doc(nullptr),
+		currentPage(nullptr),
 		m_drawGuides(true)
 {
 	docUnitIndex = 0;
@@ -117,7 +117,7 @@
 	{
 		if (currentPage && (currentPage->doc() == m_Doc))
 			storePageValues(currentPage);
-		currentPage = 0;
+		currentPage = nullptr;
 	}
 
 	m_Doc = doc;
@@ -131,7 +131,7 @@
 	qobject_cast<GuidesHDelegate*>(horizontalView->itemDelegateForColumn(0))->setDoc(doc);
 	qobject_cast<GuidesVDelegate*>(verticalView->itemDelegateForColumn(0))->setDoc(doc);
 	if (!m_Doc)
-		currentPage = 0;
+		currentPage = nullptr;
 	tabWidget->setEnabled(doc ? true : false);
 }
 

Modified: trunk/Scribus/scribus/ui/helpbrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/helpbrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/helpbrowser.cpp	(original)
+++ trunk/Scribus/scribus/ui/helpbrowser.cpp	Sun Aug  5 10:33:40 2018
@@ -393,7 +393,7 @@
 
 void HelpBrowser::find()
 {
-	findText = QInputDialog::getText( this, tr("Find"), tr("Search Term:"), QLineEdit::Normal, findText, 0);
+	findText = QInputDialog::getText( this, tr("Find"), tr("Search Term:"), QLineEdit::Normal, findText, nullptr);
 	if (findText.isNull())
 		return;
 	findNext();

Modified: trunk/Scribus/scribus/ui/imageinfodialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/imageinfodialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/imageinfodialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/imageinfodialog.cpp	Sun Aug  5 10:33:40 2018
@@ -79,7 +79,7 @@
 	UserComment = new QLabel(info->exifInfo.userComment, ExGroup);
 	layout2->addWidget( UserComment, 1, 1 );
 	int a = 2;
-	Artist = Text5 = 0;
+	Artist = Text5 = nullptr;
 	if (info->type == 1)
 	{
 		Text5 = new QLabel( tr("Artist:"), ExGroup);
@@ -107,10 +107,10 @@
 		if ((exposureTime > 0.0) && (exposureTime <= 0.5))
 			tag += QString().sprintf(" (1/%d)", (int)(0.5 + 1/exposureTime) );
 	}
-	Text7 = Text8 = 0;
-	ExposureTime = 0;
-	ApertureFNumber= 0;
-	ISOequivalent = 0;
+	Text7 = Text8 = nullptr;
+	ExposureTime = nullptr;
+	ApertureFNumber= nullptr;
+	ISOequivalent = nullptr;
 	if (info->type == 0)
 	{
 		ExposureTime = new QLabel(tag, ExGroup);

Modified: trunk/Scribus/scribus/ui/inlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/inlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/inlinepalette.cpp	Sun Aug  5 10:33:40 2018
@@ -101,7 +101,7 @@
 	clearSelection();
 }
 
-InlinePalette::InlinePalette( QWidget* parent) : ScDockPalette( parent, "Inline", 0)
+InlinePalette::InlinePalette( QWidget* parent) : ScDockPalette( parent, "Inline", nullptr)
 {
 	setMinimumSize( QSize( 220, 240 ) );
 	setObjectName(QString::fromLocal8Bit("Inline"));

Modified: trunk/Scribus/scribus/ui/insertaframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/insertaframe.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/insertaframe.cpp	(original)
+++ trunk/Scribus/scribus/ui/insertaframe.cpp	Sun Aug  5 10:33:40 2018
@@ -102,7 +102,7 @@
 
 	sourceDocLineEdit->setText("");
 	
-	if (m_Doc!=0)
+	if (m_Doc!=nullptr)
 	{
 		pageItemMap=m_Doc->getDocItemNames(PageItem::TextFrame);
 		comboBoxLinkToExistingFrameName->addItems(pageItemMap.values());
@@ -250,7 +250,7 @@
 
 void InsertAFrame::slotCreatePageNumberRange( )
 {
-	if (m_Doc!=0)
+	if (m_Doc!=nullptr)
 	{
 		CreateRange cr(placementPagesLineEdit->text(), m_Doc->Pages->count(), this);
 		if (cr.exec())

Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp	(original)
+++ trunk/Scribus/scribus/ui/inspage.cpp	Sun Aug  5 10:33:40 2018
@@ -24,7 +24,7 @@
 #include "util.h"
 
 InsPage::InsPage( QWidget* parent, ScribusDoc* currentDoc, int currentPage, int maxPages)
-		: QDialog( parent, 0 )
+	: QDialog( parent, nullptr )
 {
 	masterPageCombos.clear();
 	setModal(true);
@@ -64,7 +64,7 @@
 	whereLayout->addItem(new QSpacerItem(insCountLabel->fontMetrics().width( tr( "&Insert" )), 0), 0, 0);
 	dialogLayout->addLayout( whereLayout );
 	
-	masterPageLabel = 0;
+	masterPageLabel = nullptr;
 	masterPageGroup = new QGroupBox( this);
 	masterPageGroup->setTitle( tr( "Master Pages" ) );
 	masterPageLayout = new QGridLayout( masterPageGroup );

Modified: trunk/Scribus/scribus/ui/javadocs.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/javadocs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/javadocs.cpp	(original)
+++ trunk/Scribus/scribus/ui/javadocs.cpp	Sun Aug  5 10:33:40 2018
@@ -79,7 +79,7 @@
 void JavaDocs::slotAdd()
 {
 	QString nam;
-	Query dia(this, "tt", 1, tr("&New Script:"), tr("New Script"));
+	Query dia(this, "tt", true, tr("&New Script:"), tr("New Script"));
 	dia.setEditText( tr("New Script"), false );
 	dia.setTestList(m_Doc->JavaScripts.keys());
 	if (dia.exec())
@@ -121,11 +121,11 @@
 		return;
 
 	int exit = ScMessageBox::warning(this,
-	                   CommonStrings::trWarning,
-	                   tr("Do you really want to delete this script?"),
-				       QMessageBox::Yes | QMessageBox::No,
-				       QMessageBox::NoButton,	// GUI default
-				       QMessageBox::Yes);	// batch default
+					   CommonStrings::trWarning,
+					   tr("Do you really want to delete this script?"),
+					   QMessageBox::Yes | QMessageBox::No,
+					   QMessageBox::NoButton,	// GUI default
+					   QMessageBox::Yes);	// batch default
 	if (exit == QMessageBox::Yes)
 	{
 		QString name = currentItem->text();
@@ -146,6 +146,6 @@
 void JavaDocs::slotSelectionChanged()
 {
 	QListWidgetItem* currentItem = Scripts->currentItem();
-	EditScript->setEnabled(currentItem != 0);
-	DeleteScript->setEnabled(currentItem != 0);
+	EditScript->setEnabled(currentItem != nullptr);
+	DeleteScript->setEnabled(currentItem != nullptr);
 }

Modified: trunk/Scribus/scribus/ui/latexeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/latexeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/latexeditor.cpp	Sun Aug  5 10:33:40 2018
@@ -1,3 +1,5 @@
+#include <utility>
+
 /*
 For general Scribus (>=1.3.2) copyright and licensing information please refer
 to the COPYING file provided with the program. Following this notice may exist
@@ -33,11 +35,11 @@
 #include <QListWidget>
 #include <QMessageBox>
 #include <QTemporaryFile>
-#include <math.h>
+#include <cmath>
 #include "filewatcher.h"
 #include "util.h"
 
-LatexEditor::LatexEditor(PageItem_LatexFrame *frame):QDialog(), frame(frame)
+LatexEditor::LatexEditor(PageItem_LatexFrame *frame): frame(frame)
 {
 	setupUi(this);
 	
@@ -120,16 +122,18 @@
 
 void LatexEditor::extEditorClicked()
 {
-	if (extEditor->state() != QProcess::NotRunning) {
-		ScMessageBox::information(0, tr("Information"),
+	if (extEditor->state() != QProcess::NotRunning)
+	{
+		ScMessageBox::information(nullptr, tr("Information"),
 		"<qt>" + tr("An editor for this frame is already running!") +
 		"</qt>");
 		return;
 	}
 	
 	QString full_command = PrefsManager::instance()->latexEditorExecutable();
-	if (full_command.isEmpty()) {
-		ScMessageBox::information(0, tr("Information"),
+	if (full_command.isEmpty())
+	{
+		ScMessageBox::information(nullptr, tr("Information"),
 		"<qt>" + tr("Please specify an editor in the preferences!") +
 		"</qt>");
 		return;
@@ -165,7 +169,7 @@
 		QTemporaryFile *editortempfile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_editor_XXXXXX");
 		if (!editortempfile->open())
 		{
-			ScMessageBox::critical(0, tr("Error"), "<qt>" + 
+			ScMessageBox::critical(nullptr, tr("Error"), "<qt>" +
 				tr("Could not create a temporary file to run the external editor!")
 				+ "</qt>");
 		}
@@ -215,14 +219,14 @@
 	{
 		qCritical() << "RENDER FRAME: Editor failed. Output was: " << 
 			qPrintable(QString(extEditor->readAllStandardOutput()));
-		ScMessageBox::critical(0, tr("Error"), "<qt>" +
+		ScMessageBox::critical(nullptr, tr("Error"), "<qt>" +
 			tr("Running the editor failed with exitcode %d!").arg(exitCode) +
 			"</qt>");
 		return;
 	}
 }
 
-void LatexEditor::extEditorFileChanged(QString filename)
+void LatexEditor::extEditorFileChanged(const QString& filename)
 {
 	loadExternalEditorFile();
 	frame->rerunApplication();
@@ -232,7 +236,7 @@
 {
 	externalEditorPushButton->setEnabled(true);
 	externalEditorPushButton->setText( tr("Run External Editor...") );
-	ScMessageBox::critical(0, tr("Error"), "<qt>" +
+	ScMessageBox::critical(nullptr, tr("Error"), "<qt>" +
 		tr("Running the editor \"%1\" failed!").
 		arg(PrefsManager::instance()->latexEditorExecutable()) +
 		"</qt>");
@@ -315,7 +319,7 @@
 	apply();
 }
 
-void LatexEditor::formulaChanged(QString oldText, QString newText)
+void LatexEditor::formulaChanged(const QString& oldText, const QString& newText)
 {
 	sourceTextEdit->setPlainText(newText);
 }
@@ -368,23 +372,22 @@
 }
 
 
-QIcon LatexEditor::icon(QString config, QString fn)
+QIcon LatexEditor::icon(const QString& config, const QString& fn)
 {
 	QFileInfo fiConfig(LatexConfigParser::absoluteFilename(config));
 	QFileInfo fiIcon(fiConfig.path()+"/"+fn);
-	if (fiIcon.exists() && fiIcon.isReadable()) {
+	if (fiIcon.exists() && fiIcon.isReadable())
 		return QIcon(fiConfig.path()+"/"+fn);
-	} else {
-		QIcon *tmp = IconBuffer::instance()->icon(
-			iconFile(config), fn);
-		if (tmp) return *tmp; else return QIcon();
-	}
+	QIcon *tmp = IconBuffer::instance()->icon(iconFile(config), fn);
+	if (tmp)
+		return *tmp;
+	return QIcon();
 }
 
 
 QString LatexEditor::iconFile(QString config)
 {
-	QFileInfo fiConfig(LatexConfigParser::absoluteFilename(config));
+	QFileInfo fiConfig(LatexConfigParser::absoluteFilename(std::move(config)));
 	return fiConfig.path() + "/" + fiConfig.completeBaseName() + ".tar";
 }
 
@@ -392,13 +395,15 @@
 void LatexEditor::updateConfigFile()
 {
 	QString newConfigFile = LatexConfigParser::absoluteFilename(frame->configFile());
-	if (currentConfigFile == newConfigFile) return;
+	if (currentConfigFile == newConfigFile)
+		return;
 	currentConfigFile = newConfigFile;
 	currentIconFile = iconFile(currentConfigFile);
 	QFileInfo fi(currentConfigFile);
 	
-	if (!fi.exists() || !fi.isReadable()) {
-		ScMessageBox::critical(0, QObject::tr("Error"), "<qt>" + 
+	if (!fi.exists() || !fi.isReadable())
+	{
+		ScMessageBox::critical(nullptr, QObject::tr("Error"), "<qt>" +
 				QObject::tr("Configfile %1 not found or the file is not readable").
 				arg(currentConfigFile) + "</qt>");
 		return;
@@ -407,13 +412,13 @@
 	loadSettings();
 	
 	QMapIterator<QString, XmlWidget *> i(widgetMap);
-	while (i.hasNext()) {
+	while (i.hasNext())
+	{
 		i.next();
 		QString key = i.key();
 		XmlWidget *value = i.value();
-		if (frame->editorProperties.contains(key)) {
+		if (frame->editorProperties.contains(key))
 			value->fromString(frame->editorProperties[key]);
-		}
 	}
 	//TODO: Needs special care wrt relative filenames
 	highlighter->setConfig(&LatexConfigCache::instance()->parser(currentConfigFile)->highlighterRules);
@@ -571,8 +576,7 @@
 			break;
 		if (!xml->isStartElement()) 
 		{
-			xmlError() << "Unexpected end element "
-					<<tagname.toString()<<"in item tab";
+			xmlError() << "Unexpected end element "	<<tagname.toString()<<"in item tab";
 			continue;
 		}
 		if (tagname == "title") 
@@ -591,7 +595,7 @@
 			else if (text != value) 
 				status = text + "(" + value +")";
 			
-			QIcon *icon = 0;
+			QIcon *icon = nullptr;
 			if (!img.isEmpty()) 
 				icon = IconBuffer::instance()->icon(currentIconFile, img);
 			QListWidgetItem *item;
@@ -614,7 +618,7 @@
 	tabWidget->addTab(newTab, title);
 }
 
-void LatexEditor::tagButtonClicked(QString tagname)
+void LatexEditor::tagButtonClicked(const QString& tagname)
 {
 	sourceTextEdit->insertPlainText("$scribus_"+tagname+"$");
 }
@@ -661,7 +665,8 @@
 class SCRIBUS_API XmlSpinBox : public XmlWidget, public QSpinBox
 {
 	public:
-		XmlSpinBox(I18nXmlStreamReader *xml) :  XmlWidget(xml, false), QSpinBox() {
+		XmlSpinBox(I18nXmlStreamReader *xml) :  XmlWidget(xml, false), QSpinBox()
+		{
 			setRange(
 				xml->attributes().value("min").toString().toInt(),
 				xml->attributes().value("max").toString().toInt()
@@ -672,7 +677,8 @@
 			m_description = xml->readI18nText();
 		}
 		
-		QString toString() const {
+		QString toString() const
+		{
 			if (value() == minimum() && !specialValueText().isEmpty()) {
 				return specialValueText();
 			} else {
@@ -680,7 +686,8 @@
 			}
 		}
 		
-		void fromString(QString str) {
+		void fromString(QString str)
+		{
 			if (str == specialValueText()) {
 				setValue(minimum());
 			} else {
@@ -693,7 +700,8 @@
 {
 	public:
 		XmlDoubleSpinBox(I18nXmlStreamReader *xml) :
-			XmlWidget(xml, false), QDoubleSpinBox() {
+			XmlWidget(xml, false), QDoubleSpinBox()
+			{
 			setRange(
 				xml->attributes().value("min").toString().toDouble(),
 				xml->attributes().value("max").toString().toDouble()
@@ -705,20 +713,19 @@
 			m_description = xml->readI18nText();
 		}
 		
-		QString toString() const {
-			if (value() == minimum() && !specialValueText().isEmpty()) {
+		QString toString() const
+		{
+			if (value() == minimum() && !specialValueText().isEmpty())
 				return specialValueText();
-			} else {
-				return QString::number(value());
-			}
-		}
-		
-		void fromString(QString str) {
-			if (str == specialValueText()) {
+			return QString::number(value());
+		}
+		
+		void fromString(QString str)
+		{
+			if (str == specialValueText())
 				setValue(minimum());
-			} else {
+			else
 				setValue(str.toDouble());
-			}
 		}
 };
 
@@ -776,7 +783,7 @@
 class SCRIBUS_API XmlComboBox : public XmlWidget, public QComboBox
 {
 	public:
-		XmlComboBox(I18nXmlStreamReader *xml) :  XmlWidget(xml, false), QComboBox() 
+		XmlComboBox(I18nXmlStreamReader *xml) :  XmlWidget(xml, false)
 		{
 			QStringRef tagname;
 			while (!xml->atEnd()) {
@@ -816,28 +823,25 @@
 XmlWidget* XmlWidget::fromXml(I18nXmlStreamReader *xml)
 {
 	QStringRef tagname = xml->name();
-	if (tagname == "font") {
+	if (tagname == "font")
 		return new XmlFontComboBox(xml);
-	}
-	if (tagname == "spinbox") {
+	if (tagname == "spinbox")
+	{
 		if (xml->attributes().value("type") == "double")
 			return new XmlDoubleSpinBox(xml);
-		else
-			return new XmlSpinBox(xml);
-	}
-	if (tagname == "color") {
+		return new XmlSpinBox(xml);
+	}
+	if (tagname == "color")
 		return new XmlColorPicker(xml);
-	}
-	if (tagname == "text") {
+	if (tagname == "text")
+	{
 		if (xml->attributes().value("type") == "long")
 			return new XmlTextEdit(xml);
-		else
-			return new XmlLineEdit(xml);
-	}
-	if (tagname == "list") {
+		return new XmlLineEdit(xml);
+	}
+	if (tagname == "list")
 		return new XmlComboBox(xml);
-	}
-	return 0;
+	return nullptr;
 }
 
 XmlWidget::XmlWidget(I18nXmlStreamReader *xml, bool readDescription)
@@ -848,7 +852,7 @@
 		m_description = xml->readI18nText();
 }
 
-void IconBuffer::loadFile(QString filename)
+void IconBuffer::loadFile(const QString& filename)
 {
 	if (loadedFiles.contains(filename)) return;
 	loadedFiles << filename;
@@ -865,19 +869,17 @@
 	}
 	file->close();
 	delete file;
-	file = 0;
-}
-
-QIcon *IconBuffer::icon(QString filename, QString name)
+	file = nullptr;
+}
+
+QIcon *IconBuffer::icon(const QString& filename, const QString& name)
 {
 	loadFile(filename);
 	QString cname = filename + ":" + name;
-	if (icons.contains(cname)) {
+	if (icons.contains(cname))
 		return &(icons[cname]);
-	} else {
-		qWarning() << "Icon" << cname << "not found!";
-		return 0;
-	}
+	qWarning() << "Icon" << cname << "not found!";
+	return nullptr;
 }
 
 QString IconBuffer::readHeader()
@@ -908,11 +910,10 @@
 	return QIcon(pixmap);
 }
 
-IconBuffer *IconBuffer::_instance = 0;
+IconBuffer *IconBuffer::_instance = nullptr;
 IconBuffer *IconBuffer::instance()
 {
-	if (!_instance) {
+	if (!_instance)
 		_instance = new IconBuffer();
-	}
 	return _instance;
 }

Modified: trunk/Scribus/scribus/ui/latexeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/latexeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.h	(original)
+++ trunk/Scribus/scribus/ui/latexeditor.h	Sun Aug  5 10:33:40 2018
@@ -51,7 +51,7 @@
 		void revert();
 		void apply(bool force=false);
 		void initialize();
-		static QIcon icon(QString config, QString fn);
+		static QIcon icon(const QString& config, const QString& fn);
 		static QString iconFile(QString config);
 	protected:
 		PageItem_LatexFrame *frame;
@@ -69,7 +69,7 @@
 		FileWatcher *fileWatcher;
 	protected slots:
 		void extEditorFinished(int exitCode, QProcess::ExitStatus exitStatus);
-		void extEditorFileChanged(QString filename);
+		void extEditorFileChanged(const QString& filename);
 		void extEditorError(QProcess::ProcessError error);
 	public slots:
 		void okClicked();
@@ -77,12 +77,12 @@
 		void updateClicked(bool);
 		void revertClicked(bool);
 		void dpiChanged();
-		void formulaChanged(QString, QString);
+		void formulaChanged(const QString&, const QString&);
 		void applicationChanged();
 		void latexFinished();
 		void stateChanged(QProcess::ProcessState);
 		//Slots for the dynamic interface
-		void tagButtonClicked(QString);
+		void tagButtonClicked(const QString&);
 		void insertButtonClicked(QObject *);
 		void newItemSelected(QListWidgetItem *, QListWidgetItem *);
 		void itemDoubleClicked(QListWidgetItem *);
@@ -159,8 +159,8 @@
 	public:
 		IconBuffer() { len = 0; basePos = 0; file = 0; }
 		static IconBuffer *instance();
-		void loadFile(QString filename);
-		QIcon *icon(QString filename, QString name);
+		void loadFile(const QString& filename);
+		QIcon *icon(const QString& filename, const QString& name);
 	protected:
 		QFile *file;
 		QMap<QString, QIcon> icons;

Modified: trunk/Scribus/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/layers.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/layers.cpp	(original)
+++ trunk/Scribus/scribus/ui/layers.cpp	Sun Aug  5 10:33:40 2018
@@ -39,7 +39,7 @@
 #include "undomanager.h"
 
 
-LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette( parent, "Layers", 0 ), m_Doc(0)
+LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette( parent, "Layers", nullptr ), m_Doc(nullptr)
 {
 	setObjectName(QString::fromLocal8Bit("Layers"));
 	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
@@ -179,11 +179,11 @@
 	m_Doc=doc;
 	disconnect(blendMode, SIGNAL(activated(int)), this, SLOT(changeBlendMode(int)));
 	disconnect(opacitySpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeOpacity()));
-	disconnect(Table, SIGNAL(cellClicked(int, int)), this, SLOT(setActiveLayer(int, int)));
-	disconnect(Table, SIGNAL(cellChanged(int, int)), this, SLOT(changeName(int, int)));
-	if (!m_Doc)
-	{
-		layers=0;
+	disconnect(Table, SIGNAL(cellClicked(int,int)), this, SLOT(setActiveLayer(int,int)));
+	disconnect(Table, SIGNAL(cellChanged(int,int)), this, SLOT(changeName(int,int)));
+	if (!m_Doc)
+	{
+		layers=nullptr;
 		newLayerButton->setEnabled(false);
 		duplicateLayerButton->setEnabled(false);
 		deleteLayerButton->setEnabled(false);
@@ -198,8 +198,8 @@
 	newLayerButton->setEnabled(true);
 	duplicateLayerButton->setEnabled(true);
 
-	connect(Table, SIGNAL(cellChanged(int, int)), this, SLOT(changeName(int, int)));
-	connect(Table, SIGNAL(cellClicked(int, int)), this, SLOT(setActiveLayer(int, int)));
+	connect(Table, SIGNAL(cellChanged(int,int)), this, SLOT(changeName(int,int)));
+	connect(Table, SIGNAL(cellClicked(int,int)), this, SLOT(setActiveLayer(int,int)));
 	connect(opacitySpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeOpacity()));
 	connect(blendMode, SIGNAL(activated(int)), this, SLOT(changeBlendMode(int)));
 }
@@ -621,7 +621,7 @@
 		raiseLayerButton->setEnabled(false);
 		lowerLayerButton->setEnabled(false);
 	}
-	connect(Table, SIGNAL(cellClicked(int, int)), this, SLOT(setActiveLayer(int, int)));
+	connect(Table, SIGNAL(cellClicked(int,int)), this, SLOT(setActiveLayer(int,int)));
 	connect(opacitySpinBox, SIGNAL(valueChanged(double)), this, SLOT(changeOpacity()));
 	connect(blendMode, SIGNAL(activated(int)), this, SLOT(changeBlendMode(int)));
 }
@@ -663,9 +663,7 @@
 void LayerPalette::changeEvent(QEvent *e)
 {
 	if (e->type() == QEvent::LanguageChange)
-	{
 		languageChange();
-	}
 	else
 		ScDockPalette::changeEvent(e);
 }

Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp	(original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp	Sun Aug  5 10:33:40 2018
@@ -366,7 +366,7 @@
 QString LoremManager::getName()
 {
 	QTreeWidgetItem *li;
-	if (loremList->currentItem()->parent() == 0)
+	if (loremList->currentItem()->parent() == nullptr)
 		li = loremList->currentItem();
 	else
 		li = loremList->currentItem()->parent();

Modified: trunk/Scribus/scribus/ui/marksmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/marksmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marksmanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/marksmanager.cpp	Sun Aug  5 10:33:40 2018
@@ -20,7 +20,7 @@
 	if (pname.isEmpty())
 		pname = "marksManager";
 	m_prefs = PrefsManager::instance()->prefsFile->getContext(pname);
-	setDoc(0);
+	setDoc(nullptr);
 	languageChange();
 	EditButton->setEnabled(false);
 	DeleteButton->setEnabled(false);
@@ -34,7 +34,7 @@
 	storeSize();
 }
 
-void MarksManager::addListItem(MarkType typeMrk, QString typeStr, const QList<Mark*> &marks, int &index)
+void MarksManager::addListItem(MarkType typeMrk, const QString& typeStr, const QList<Mark*> &marks, int &index)
 {
 	bool noSuchMarks = true;
 	QTreeWidgetItem *listItem = new QTreeWidgetItem(listView);

Modified: trunk/Scribus/scribus/ui/marksmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/marksmanager.h
==============================================================================
--- trunk/Scribus/scribus/ui/marksmanager.h	(original)
+++ trunk/Scribus/scribus/ui/marksmanager.h	Sun Aug  5 10:33:40 2018
@@ -24,7 +24,7 @@
 	ScribusDoc         *m_Doc;
 	PrefsContext       *m_prefs;
 	Mark* getMarkFromListView();
-	void addListItem(MarkType typeMrk, QString typeStr, const QList<Mark *> &marks, int &index);
+	void addListItem(MarkType typeMrk, const QString& typeStr, const QList<Mark *> &marks, int &index);
 	QStringList expandedItems;
 	void storeColaption();
 	void restoreColaption();

Modified: trunk/Scribus/scribus/ui/markvariabletext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/markvariabletext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/markvariabletext.cpp	(original)
+++ trunk/Scribus/scribus/ui/markvariabletext.cpp	Sun Aug  5 10:33:40 2018
@@ -2,7 +2,7 @@
 #include "marks.h"
 #include <QComboBox>
 
-MarkVariableText::MarkVariableText(const QList<Mark*>& marks, QWidget *parent) : MarkInsert(marks, parent), m_widgetType(ComboBox), m_mark(0)
+MarkVariableText::MarkVariableText(const QList<Mark*>& marks, QWidget *parent) : MarkInsert(marks, parent), m_widgetType(ComboBox), m_mark(nullptr)
 {
 	//for editing mark entry in text - user can change mark pointer inserted into text or create new mark entry
 	setupUi(this);

Modified: trunk/Scribus/scribus/ui/measurements.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/measurements.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/measurements.cpp	(original)
+++ trunk/Scribus/scribus/ui/measurements.cpp	Sun Aug  5 10:33:40 2018
@@ -15,7 +15,7 @@
 using namespace std;
 
 
-Measurements::Measurements( QWidget* parent ) : ScrPaletteBase( parent, "MeasurementsPalette", false, 0 )
+Measurements::Measurements( QWidget* parent ) : ScrPaletteBase( parent, "MeasurementsPalette", false, nullptr )
 {
 	setupUi(this);
 

Modified: trunk/Scribus/scribus/ui/mergedoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/mergedoc.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mergedoc.cpp	(original)
+++ trunk/Scribus/scribus/ui/mergedoc.cpp	Sun Aug  5 10:33:40 2018
@@ -75,7 +75,7 @@
 		pageNumberData = new QLineEdit( this );
 		pageNumberData->setEnabled(false);
 		importPageLabel->setBuddy( pageNumberData );
-		masterPageNameData = 0;
+		masterPageNameData = nullptr;
 		pageNumberData->setToolTip( "<qt>" + tr( "Insert a comma separated list of tokens import where "
 									"a token can be * for all the pages, 1-5 for "
 									"a range of pages or a single page number") + "</qt>");

Modified: trunk/Scribus/scribus/ui/movepage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/movepage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/movepage.cpp	(original)
+++ trunk/Scribus/scribus/ui/movepage.cpp	Sun Aug  5 10:33:40 2018
@@ -45,10 +45,10 @@
 	fromToLayout->addWidget( moveLabel, currentRow, 0);
 	fromToLayout->addWidget( fromPageData, currentRow, 1);
 
-	toLabel = 0;
-	toPageData = 0;
-	numberOfCopiesLabel = 0;
-	numberOfCopiesData  = 0;
+	toLabel = nullptr;
+	toPageData = nullptr;
+	numberOfCopiesLabel = nullptr;
+	numberOfCopiesData  = nullptr;
 	if (move)
 	{
 		toLabel = new QLabel( tr("To:"), this );

Modified: trunk/Scribus/scribus/ui/newfile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/newfile.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newfile.cpp	(original)
+++ trunk/Scribus/scribus/ui/newfile.cpp	Sun Aug  5 10:33:40 2018
@@ -481,7 +481,7 @@
 
 void NewDoc::itemSelected(QListWidgetItem* ic)
 {
-	if (ic == 0)
+	if (ic == nullptr)
 		return;
 	selectItem(layoutsView->row(ic));
 	setDocLayout(layoutsView->row(ic));

Modified: trunk/Scribus/scribus/ui/nftdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/nftdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/nftdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/nftdialog.cpp	Sun Aug  5 10:33:40 2018
@@ -29,9 +29,7 @@
 
 bool nftdialog::isTemplateSelected()
 {
-	if (nftGui->currentDocumentTemplate)
-		return true;
-	return false;
+	return nftGui->currentDocumentTemplate != nullptr;
 }
 
 nfttemplate* nftdialog::currentTemplate()

Modified: trunk/Scribus/scribus/ui/nodeeditpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/nodeeditpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/nodeeditpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/nodeeditpalette.cpp	Sun Aug  5 10:33:40 2018
@@ -18,11 +18,11 @@
 #include "units.h"
 #include "iconmanager.h"
 
-NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase( parent, "nodePalette", false, 0)
+NodePalette::NodePalette( QWidget* parent) : ScrPaletteBase( parent, "nodePalette", false, nullptr)
 {
 	IconManager* im = IconManager::instance();
 	QSize iconSize = QSize(22, 22);
-	m_doc=0;
+	m_doc=nullptr;
 	unitRatio=1.0;
 	vboxLayout = new QVBoxLayout(this);
 	vboxLayout->setSpacing(2);
@@ -391,14 +391,14 @@
 	unitChange();
 	disconnect(EditCont, SIGNAL(clicked()), this, SLOT(ToggleConMode()));
 	disconnect(AbsMode, SIGNAL(clicked()), this, SLOT(ToggleAbsMode()));
-	if (m_doc!=0)
+	if (m_doc!=nullptr)
 	{
 		YSpin->setNewUnit(m_doc->unitIndex());
 		XSpin->setNewUnit(m_doc->unitIndex());
 	}
 	AbsMode->setChecked(false);
 	EditCont->setChecked(false);
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		disconnectSignals();
 	else
 		connectSignals();
@@ -406,7 +406,7 @@
 
 void NodePalette::SplitPoly()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	MoveN();
 	m_doc->nodeEdit.setSubMode(NodeEditContext::SPLIT_PATH);
@@ -415,7 +415,7 @@
 
 void NodePalette::IsOpen()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	PolySplit->setChecked(false);
 	BezierClose->setEnabled(true);
@@ -425,7 +425,7 @@
 
 void NodePalette::PolyStatus(int typ, uint size)
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	bool setter;
 	switch (typ)
@@ -448,7 +448,7 @@
 
 void NodePalette::CloseBezier()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	MoveN();
 	PageItem *currItem = m_doc->m_Selection->itemAt(0);
@@ -463,91 +463,91 @@
 
 void NodePalette::doRotCCW()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(0, RotVal->value());
 }
 
 void NodePalette::doRotCW()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(1, RotVal->value());
 }
 
 void NodePalette::doShrink()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(2, 1, scalePercentage->value());
 }
 
 void NodePalette::doExpand()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(3, 1, scalePercentage->value());
 }
 
 void NodePalette::doReduce()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(8, 1, value2pts(scaleDistance->value(),m_doc->unitIndex()));
 }
 
 void NodePalette::doEnlarge()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(9, 1, value2pts(scaleDistance->value(),m_doc->unitIndex()));
 }
 
 void NodePalette::ShearR()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(4);
 }
 
 void NodePalette::ShearL()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(5);
 }
 
 void NodePalette::ShearU()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(6);
 }
 
 void NodePalette::ShearD()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_view->TransformPoly(7);
 }
 
 void NodePalette::MirrorH()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->MirrorPolyH(m_doc->m_Selection->itemAt(0));
 }
 
 void NodePalette::MirrorV()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->MirrorPolyV(m_doc->m_Selection->itemAt(0));
 }
 
 void NodePalette::ResetControl()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->nodeEdit.resetControl(m_doc->m_Selection->itemAt(0));
 }
 
 void NodePalette::Reset1Control()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->nodeEdit.reset1Control(m_doc->m_Selection->itemAt(0));
 }
 
 void NodePalette::ResetContour()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
 		if (UndoManager::undoEnabled())
@@ -567,7 +567,7 @@
 
 void NodePalette::ResetContourToImageClip()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
 		currItem->ContourLine = currItem->imageClip.copy();
@@ -579,7 +579,7 @@
 
 void NodePalette::ResetShapeToImageClip()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
 		currItem->PoLine = currItem->imageClip.copy();
@@ -595,7 +595,7 @@
 
 void NodePalette::MovePoint()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	if (m_doc->nodeEdit.submode() == NodeEditContext::MOVE_POINT)
 	{
@@ -621,7 +621,7 @@
 
 void NodePalette::SetSym()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->nodeEdit.setMoveSym(true);
 	SymMove->setChecked(true);
 	AsymMove->setChecked(false);
@@ -630,7 +630,7 @@
 
 void NodePalette::SetAsym()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 		m_doc->nodeEdit.setMoveSym(false);
 	SymMove->setChecked(false);
 	AsymMove->setChecked(true);
@@ -639,7 +639,7 @@
 
 void NodePalette::SetXY(double x, double y)
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	FPoint zp(0.0, 0.0);
 	disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
@@ -659,7 +659,7 @@
 
 void NodePalette::ToggleAbsMode()
 {
-	if (m_doc == 0)
+	if (m_doc == nullptr)
 		return;
 	FPoint zp(0.0, 0.0);
 	disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
@@ -696,7 +696,7 @@
 {
 	disconnect(XSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
 	disconnect(YSpin, SIGNAL(valueChanged(double)), this, SLOT(MovePoint()));
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		m_doc->nodeEdit.setIsContourLine(EditCont->isChecked());
 		m_doc->nodeEdit.setSubMode(NodeEditContext::MOVE_POINT);
@@ -738,7 +738,7 @@
 
 void NodePalette::TogglePreview()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		m_doc->nodeEdit.setPreviewMode(PreviewMode->isChecked());
 		m_doc->regionsChanged()->update(QRectF());
@@ -747,7 +747,7 @@
 
 void NodePalette::HaveNode(bool have, bool mov)
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	bool setter = have ? true : false;
 	if (m_doc->nodeEdit.selNode().count() > 1)
@@ -818,7 +818,7 @@
 
 void NodePalette::MoveK()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	m_doc->nodeEdit.setSubMode(NodeEditContext::MOVE_POINT);
 	m_doc->nodeEdit.setEdPoints(false);
@@ -843,7 +843,7 @@
 
 void NodePalette::MoveN()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	m_doc->nodeEdit.setSubMode(NodeEditContext::MOVE_POINT);
 	m_doc->nodeEdit.setEdPoints(true);
@@ -868,7 +868,7 @@
 
 void NodePalette::AddN()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	m_doc->nodeEdit.setSubMode(NodeEditContext::ADD_POINT);
 	m_doc->nodeEdit.setEdPoints(true);
@@ -883,7 +883,7 @@
 
 void NodePalette::DelN()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	m_doc->nodeEdit.setSubMode(NodeEditContext::DEL_POINT);
 	m_doc->nodeEdit.setEdPoints(true);
@@ -898,7 +898,7 @@
 
 void NodePalette::closeEvent(QCloseEvent *ce)
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		MoveN();
 		m_doc->nodeEdit.setClre(-1);
@@ -918,7 +918,7 @@
 
 void NodePalette::EndEdit()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		MoveN();
 		m_doc->nodeEdit.setClre(-1);
@@ -941,7 +941,7 @@
 
 void NodePalette::CancelEdit()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		MoveN();
 		m_doc->nodeEdit.setClre(-1);
@@ -969,7 +969,7 @@
 
 void NodePalette::ResetToEditDefaults()
 {
-	if (m_doc != 0)
+	if (m_doc != nullptr)
 	{
 		m_doc->nodeEdit.setClre(-1);
 		m_doc->nodeEdit.setClre2(-1);
@@ -1070,7 +1070,7 @@
 
 void NodePalette::unitChange()
 {
-	if (m_doc==0)
+	if (m_doc==nullptr)
 		return;
 	unitRatio = m_doc->unitRatio();
 

Modified: trunk/Scribus/scribus/ui/notesstyleseditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/notesstyleseditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/notesstyleseditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/notesstyleseditor.cpp	Sun Aug  5 10:33:40 2018
@@ -22,7 +22,7 @@
 	setBlockSignals(true);
 	
 	addNewNsMode = false;
-	setDoc(0);
+	setDoc(nullptr);
 	NSlistBox->setInsertPolicy(QComboBox::InsertAlphabetically);
 
 	NumberingBox->addItem("1 2 3");

Modified: trunk/Scribus/scribus/ui/oneclick.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/oneclick.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/oneclick.cpp	(original)
+++ trunk/Scribus/scribus/ui/oneclick.cpp	Sun Aug  5 10:33:40 2018
@@ -90,7 +90,7 @@
 	}
 	SizeGroupLayout->addWidget( spinHeight, 1, 1 );
 	
-	linkSize = 0;
+	linkSize = nullptr;
 	if (mode == 0)
 	{
 		linkSize = new LinkButton( SizeGroup );

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp	Sun Aug  5 10:33:40 2018
@@ -68,7 +68,7 @@
 	setDragDropMode(QAbstractItemView::InternalMove);
 }
 
-void OutlineWidget::selectItems(QList<QTreeWidgetItem*> items)
+void OutlineWidget::selectItems(const QList<QTreeWidgetItem*>& items)
 {
 	QItemSelection itemSelection;
 	for (int i = 0; i < items.count(); ++i)
@@ -92,8 +92,8 @@
 	for (int i = 0; i < idxs.count(); ++i)
 	{
 		id = idxs.at(i);
-		QTreeWidgetItem* it = id.isValid() ? itemFromIndex(id) : 0;
-		OutlineTreeItem *itemPar = it ? dynamic_cast<OutlineTreeItem*>(it->parent()) : 0;
+		QTreeWidgetItem* it = id.isValid() ? itemFromIndex(id) : nullptr;
+		OutlineTreeItem *itemPar = it ? dynamic_cast<OutlineTreeItem*>(it->parent()) : nullptr;
 		while (itemPar && (itemPar->type != 2))
 		{
 			if (itemPar->type == 5)
@@ -272,7 +272,7 @@
 	{
 		foreach (QTreeWidgetItem * twItem, selectedItems())
 		{
-			if (twItem != 0)
+			if (twItem != nullptr)
 			{
 				OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(twItem);
 				if (item)
@@ -311,7 +311,7 @@
 	{
 		QHelpEvent *helpEvent = static_cast<QHelpEvent *>(event);
 		QTreeWidgetItem* it = itemAt(helpEvent->pos());
- 		if (it != 0)
+		if (it != nullptr)
  		{
 			OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(it);
 			if (item != nullptr)
@@ -447,7 +447,7 @@
 	return QTreeWidget::viewportEvent(event);
 }
 
-OutlinePalette::OutlinePalette( QWidget* parent) : ScDockPalette( parent, "Tree", 0)
+OutlinePalette::OutlinePalette( QWidget* parent) : ScDockPalette( parent, "Tree", nullptr)
 {
 //	resize( 220, 240 );
 	setMinimumSize( QSize( 220, 240 ) );
@@ -716,8 +716,8 @@
 
 QTreeWidgetItem* OutlinePalette::getListItem(int SNr, PageItem *Nr)
 {
-	OutlineTreeItem *item = 0;
-	QTreeWidgetItem *retVal = 0;
+	OutlineTreeItem *item = nullptr;
+	QTreeWidgetItem *retVal = nullptr;
 	if (currDoc->masterPageMode())
 	{
 		if (Nr == nullptr)
@@ -805,7 +805,7 @@
 		{
 			PageItem *item = currDoc->m_Selection->itemAt(i);
 			QTreeWidgetItem *retVal = getListItem(item->OwnPage, item);
-			if (retVal != 0 && !retVal->isHidden())
+			if (retVal != nullptr && !retVal->isHidden())
 				itemSelection.append(retVal);
 		}
 		reportDisplay->selectItems(itemSelection);
@@ -813,7 +813,7 @@
 	else
 	{
 		QTreeWidgetItem *retVal = getListItem(SNr, Nr);
-		if (retVal != 0 && !retVal->isHidden())
+		if (retVal != nullptr && !retVal->isHidden())
 			retVal->setSelected(true);
 	}
 	QList<QTreeWidgetItem *> items = reportDisplay->selectedItems();
@@ -904,7 +904,7 @@
 		return;
 	if (currDoc->OpenNodes.count() == 0)
 		return;
-	OutlineTreeItem *item = 0;
+	OutlineTreeItem *item = nullptr;
 	QTreeWidgetItemIterator it( reportDisplay );
 	while ( (*it) )
 	{
@@ -939,7 +939,7 @@
 	if (reportDisplay->model()->rowCount() == 0)
 		return;
 	currDoc->OpenNodes.clear();
-	OutlineTreeItem *item = 0;
+	OutlineTreeItem *item = nullptr;
 	QTreeWidgetItemIterator it( reportDisplay );
 	while ( (*it) )
 	{
@@ -1114,13 +1114,13 @@
 	if (storeVals)
 		buildReopenVals();
 	clearPalette();
-	OutlineTreeItem * item = new OutlineTreeItem( reportDisplay, 0 );
+	OutlineTreeItem * item = new OutlineTreeItem( reportDisplay, nullptr );
 	rootObject = item;
 	item->setText( 0, currDoc->DocName.section( '/', -1 ) );
 	item->type = -2;
 	item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
-	OutlineTreeItem * pagep = 0;
-	freeObjects = 0;
+	OutlineTreeItem * pagep = nullptr;
+	freeObjects = nullptr;
 	PageItem* pgItem;
 	QString tmp;
 	if (currDoc->symbolEditMode() || currDoc->inlineEditMode())
@@ -1135,7 +1135,7 @@
 			pgItem = currDoc->Items->at(b);
 			if (!pgItem->isGroup())
 			{
-				OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+				OutlineTreeItem *object = new OutlineTreeItem( page, nullptr );
 				object->PageItemObject = pgItem;
 				object->PageObject = currDoc->DocPages.at(0);
 				object->DocObject = currDoc;
@@ -1146,7 +1146,7 @@
 			}
 			else
 			{
-				OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+				OutlineTreeItem *object = new OutlineTreeItem( page, nullptr );
 				object->PageItemObject = pgItem;
 				object->PageObject = currDoc->DocPages.at(0);
 				object->DocObject = currDoc;
@@ -1179,7 +1179,7 @@
 				{
 					if (!pgItem->isGroup())
 					{
-						OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+						OutlineTreeItem *object = new OutlineTreeItem( page, nullptr );
 						object->PageItemObject = pgItem;
 						object->PageObject = currDoc->MasterPages.at(a);
 						object->DocObject = currDoc;
@@ -1190,7 +1190,7 @@
 					}
 					else
 					{
-						OutlineTreeItem * object = new OutlineTreeItem( page, 0 );
+						OutlineTreeItem * object = new OutlineTreeItem(page, nullptr);
 						object->PageItemObject = pgItem;
 						object->PageObject = currDoc->MasterPages.at(a);
 						object->DocObject = currDoc;
@@ -1229,7 +1229,7 @@
 				for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
 				{
 					currDoc->Layers.levelToLayer(layer, layerLevel);
-					OutlineTreeItem *ObjLayer = new OutlineTreeItem( page, 0 );
+					OutlineTreeItem *ObjLayer = new OutlineTreeItem(page, nullptr);
 					ObjLayer->type = 5;
 					ObjLayer->LayerID = layer.ID;
 					ObjLayer->DocObject = currDoc;
@@ -1242,7 +1242,7 @@
 							continue;
 						if (!pgItem->isGroup())
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(ObjLayer, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = currDoc->DocPages.at(a);
 							object->DocObject = currDoc;
@@ -1253,7 +1253,7 @@
 						}
 						else
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(ObjLayer, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = currDoc->DocPages.at(a);
 							object->DocObject = currDoc;
@@ -1277,7 +1277,7 @@
 					{
 						if (!pgItem->isGroup())
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(page, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = currDoc->DocPages.at(a);
 							object->DocObject = currDoc;
@@ -1288,7 +1288,7 @@
 						}
 						else
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(page, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = currDoc->DocPages.at(a);
 							object->DocObject = currDoc;
@@ -1325,7 +1325,7 @@
 				for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
 				{
 					currDoc->Layers.levelToLayer(layer, layerLevel);
-					OutlineTreeItem *ObjLayer = new OutlineTreeItem( page, 0 );
+					OutlineTreeItem *ObjLayer = new OutlineTreeItem(page, nullptr);
 					ObjLayer->type = 5;
 					ObjLayer->LayerID = layer.ID;
 					ObjLayer->DocObject = currDoc;
@@ -1338,7 +1338,7 @@
 							continue;
 						if (!pgItem->isGroup())
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(ObjLayer, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = nullptr;
 							object->DocObject = currDoc;
@@ -1349,7 +1349,7 @@
 						}
 						else
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( ObjLayer, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(ObjLayer, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = nullptr;
 							object->DocObject = currDoc;
@@ -1371,7 +1371,7 @@
 					{
 						if (!pgItem->isGroup())
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(page, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = nullptr;
 							object->DocObject = currDoc;
@@ -1382,7 +1382,7 @@
 						}
 						else
 						{
-							OutlineTreeItem *object = new OutlineTreeItem( page, 0 );
+							OutlineTreeItem *object = new OutlineTreeItem(page, nullptr);
 							object->PageItemObject = pgItem;
 							object->PageObject = nullptr;
 							object->DocObject = currDoc;
@@ -1407,7 +1407,7 @@
 		slotShowSelect(0, nullptr);
 	update();
 	connect(reportDisplay, SIGNAL(itemSelectionChanged()), this, SLOT(slotMultiSelect()));
-	connect(reportDisplay, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(slotDoRename(QTreeWidgetItem*, int)));
+	connect(reportDisplay, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(slotDoRename(QTreeWidgetItem*,int)));
 }
 
 void OutlinePalette::filterTree(const QString& keyword)
@@ -1447,7 +1447,7 @@
 		pgItem = subGroupList->at(b);
 		if (!pgItem->isGroup())
 		{
-			OutlineTreeItem *grp = new OutlineTreeItem( object, 0 );
+			OutlineTreeItem *grp = new OutlineTreeItem(object, nullptr);
 			grp->PageItemObject = pgItem;
 			grp->PageObject = a;
 			grp->DocObject = currDoc;
@@ -1461,7 +1461,7 @@
 		}
 		else
 		{
-			OutlineTreeItem *grp = new OutlineTreeItem( object, 0 );
+			OutlineTreeItem *grp = new OutlineTreeItem(object, nullptr);
 			grp->PageItemObject = pgItem;
 			grp->PageObject = a;
 			grp->DocObject = currDoc;

Modified: trunk/Scribus/scribus/ui/outlinepalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/outlinepalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.h	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.h	Sun Aug  5 10:33:40 2018
@@ -45,7 +45,7 @@
 	OutlineWidget(QWidget* parent);
 	~OutlineWidget() {};
 
-	void selectItems(QList<QTreeWidgetItem*> items);
+	void selectItems(const QList<QTreeWidgetItem*>& items);
 
 protected:
 	void dropEvent(QDropEvent *e);

Modified: trunk/Scribus/scribus/ui/pagelayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagelayout.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagelayout.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagelayout.cpp	Sun Aug  5 10:33:40 2018
@@ -216,7 +216,7 @@
 
 void PageLayouts::itemSelected(QListWidgetItem* ic)
 {
-	if (ic == 0)
+	if (ic == nullptr)
 		return;
 	itemSelectedPost(layoutsView->row(ic));
 	emit selectedLayout(layoutsView->row(ic));

Modified: trunk/Scribus/scribus/ui/pagepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette.cpp	Sun Aug  5 10:33:40 2018
@@ -25,10 +25,10 @@
 #include "scribusdoc.h"
 #include "scribusview.h"
 
-PagePalette::PagePalette(QWidget* parent) : ScDockPalette(parent, "PagePalette", 0)
+PagePalette::PagePalette(QWidget* parent) : ScDockPalette(parent, "PagePalette", nullptr)
 {
 	m_scMW = (ScribusMainWindow*) parent;
-	m_view = 0;
+	m_view = nullptr;
 
 	setObjectName(QString::fromLocal8Bit("PagePalette"));
 
@@ -52,21 +52,21 @@
 	QStackedWidget* sw = dynamic_cast<QStackedWidget*>(this->widget());
 	if (sw)
 		return sw->currentWidget();
-	return 0;
+	return nullptr;
 }
 
 PagePalette_MasterPages* PagePalette::masterpageWidget() const
 {
 	if (this->stackedWidget()->count() >= 2)
 		return dynamic_cast<PagePalette_MasterPages*>(this->stackedWidget()->widget(1));
-	return 0;
+	return nullptr;
 }
 
 PagePalette_Pages* PagePalette::pageWidget() const
 {
 	if (this->stackedWidget()->count() >= 1)
 		return dynamic_cast<PagePalette_Pages*>(this->stackedWidget()->widget(0));
-	return 0;
+	return nullptr;
 }
 
 QStackedWidget* PagePalette::stackedWidget() const
@@ -106,7 +106,7 @@
 {
 	rebuildMasters();
 	rebuildPages();
-	enablePalette(m_view != 0);
+	enablePalette(m_view != nullptr);
 }
 
 void PagePalette::markPage(uint nr)
@@ -184,8 +184,8 @@
 		mpWidget->setObjectName(QString::fromLocal8Bit("PagePalette_MasterPages"));
 		stackedWidget->addWidget(mpWidget);
 
-		connect(mpWidget, SIGNAL(removePage(int )), m_scMW, SLOT(deletePage2(int )));
-		connect(mpWidget, SIGNAL(finished())      , m_scMW, SLOT(editMasterPagesEnd()));
+		connect(mpWidget, SIGNAL(removePage(int)), m_scMW, SLOT(deletePage2(int)));
+		connect(mpWidget, SIGNAL(finished()), m_scMW, SLOT(editMasterPagesEnd()));
 	}
 	else
 	{

Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp	Sun Aug  5 10:33:40 2018
@@ -37,7 +37,7 @@
 #include "util_os.h"
 
 
-PagePalette_MasterPages::PagePalette_MasterPages( QWidget* parent, ScribusView *pCurrentView, QString masterPageName) : QWidget(parent)
+PagePalette_MasterPages::PagePalette_MasterPages( QWidget* parent, ScribusView *pCurrentView, const QString& masterPageName) : QWidget(parent)
 {
 	m_doc  = pCurrentView->Doc;
 	m_view = pCurrentView;
@@ -66,14 +66,14 @@
 	connectSignals();
 }
 
-void PagePalette_MasterPages::setView(ScribusView* view, QString masterPageName)
+void PagePalette_MasterPages::setView(ScribusView* view, const QString& masterPageName)
 {
 //	ScribusView* oldView = m_view;
 //	QString oldPage = m_currentPage;
 
 	disconnectSignals();
 	m_view = view;
-	m_doc = m_view ? m_view->Doc : 0;
+	m_doc = m_view ? m_view->Doc : nullptr;
 
 	if (!view)
 	{
@@ -462,7 +462,7 @@
 	this->setEnabled(true);
 }
 
-void PagePalette_MasterPages::updateMasterPageList(void)
+void PagePalette_MasterPages::updateMasterPageList()
 {
 	QString masterPageName = (m_doc->MasterNames.contains(m_currentPage)) ? m_currentPage : CommonStrings::masterPageNormal;
 	updateMasterPageList(masterPageName);
@@ -557,7 +557,7 @@
 		languageChange();
 		return;
 	}
-	else if (e->type() == QEvent::StyleChange)
+	if (e->type() == QEvent::StyleChange)
 	{
 		styleChange();
 		return;

Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.h
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.h	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.h	Sun Aug  5 10:33:40 2018
@@ -29,10 +29,10 @@
 	friend class PagePalette;
 
 public:
-	PagePalette_MasterPages( QWidget* parent, ScribusView *pCurrentView, QString masterPageName);
+	PagePalette_MasterPages( QWidget* parent, ScribusView *pCurrentView, const QString& masterPageName);
 	~PagePalette_MasterPages() {};
 
-	void setView(ScribusView* view, QString masterPageName = "");
+	void setView(ScribusView* view, const QString& masterPageName = "");
 	
 	void updateMasterPageList(void);
 	void updateMasterPageList(QString MasterPageName);

Modified: trunk/Scribus/scribus/ui/pagepalette_pages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_pages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.cpp	Sun Aug  5 10:33:40 2018
@@ -62,7 +62,7 @@
 
 	pix = IconManager::instance()->loadPixmap("32/page-simple.png");
 
-	currView = 0;
+	currView = nullptr;
 	Rebuild();
 	languageChange();
 
@@ -70,20 +70,20 @@
 	connect(masterPageList, SIGNAL(thumbnailChanged()), this, SLOT(rebuildMasters()));
 	connect(masterPageList, SIGNAL(DelMaster(QString)), this, SLOT(deleteMasterPage(QString)));
 
-	connect(pageLayout, SIGNAL(selectedLayout(int ))   , this, SLOT(handlePageLayout(int )));
-	connect(pageLayout, SIGNAL(selectedFirstPage(int )), this, SLOT(handleFirstPage(int )));
-	connect(pageView  , SIGNAL(Click(int, int, int))   , this, SLOT(pageView_gotoPage(int, int, int)));
-	connect(pageView  , SIGNAL(movePage(int, int))     , this, SLOT(pageView_movePage(int, int)));
-	connect(pageView  , SIGNAL(DelPage(int))           , m_scMW, SLOT(deletePage2(int)));
-	connect(pageView  , SIGNAL(UseTemp(QString, int))  , this, SLOT(pageView_applyMasterPage(QString, int)));
-	connect(pageView  , SIGNAL(NewPage(int, QString))  , m_scMW, SLOT(slotNewPageP(int, QString)));
-	connect(trash     , SIGNAL(DelPage(int))           , m_scMW, SLOT(deletePage2(int)));
-	connect(trash     , SIGNAL(DelMaster(QString))     , this, SLOT(deleteMasterPage(QString)));
+	connect(pageLayout, SIGNAL(selectedLayout(int))   , this, SLOT(handlePageLayout(int)));
+	connect(pageLayout, SIGNAL(selectedFirstPage(int)), this, SLOT(handleFirstPage(int)));
+	connect(pageView  , SIGNAL(Click(int,int,int))    , this, SLOT(pageView_gotoPage(int,int,int)));
+	connect(pageView  , SIGNAL(movePage(int,int))     , this, SLOT(pageView_movePage(int,int)));
+	connect(pageView  , SIGNAL(DelPage(int))          , m_scMW, SLOT(deletePage2(int)));
+	connect(pageView  , SIGNAL(UseTemp(QString,int))  , this, SLOT(pageView_applyMasterPage(QString,int)));
+	connect(pageView  , SIGNAL(NewPage(int,QString))  , m_scMW, SLOT(slotNewPageP(int,QString)));
+	connect(trash     , SIGNAL(DelPage(int))          , m_scMW, SLOT(deletePage2(int)));
+	connect(trash     , SIGNAL(DelMaster(QString))    , this, SLOT(deleteMasterPage(QString)));
 	
 	connect(this, SIGNAL(gotoPage(int))          , m_scMW, SLOT(selectPagesFromOutlines(int)));
 }
 
-void PagePalette_Pages::deleteMasterPage(QString tmp)
+void PagePalette_Pages::deleteMasterPage(const QString& tmp)
 {
 	if (tmp == CommonStrings::trMasterPageNormal)
 		return;
@@ -94,11 +94,11 @@
 			extraWarn = tr("This master page is used at least once in the document.");
 	}
 	int exit = ScMessageBox::warning(this,
-	                              CommonStrings::trWarning,
-	                              tr("Do you really want to delete this master page?")+"\n"+extraWarn,
-	                              QMessageBox::Yes | QMessageBox::No,
-	                              QMessageBox::NoButton,	// GUI default
-	                              QMessageBox::Yes);	// batch default
+									  CommonStrings::trWarning,
+									  tr("Do you really want to delete this master page?")+"\n"+extraWarn,
+									  QMessageBox::Yes | QMessageBox::No,
+									  QMessageBox::NoButton,	// GUI default
+									  QMessageBox::Yes);	// batch default
 	if (exit == QMessageBox::Yes)
 	{
 		bool oldMPMode = currView->Doc->masterPageMode();
@@ -148,10 +148,10 @@
 
 void PagePalette_Pages::pageView_gotoPage(int r, int c, int b)
 {
-	int p;
-	bool dummy;
 	if ((b == Qt::LeftButton) && (r != -1) && (c != -1))
 	{
+		int p;
+		bool dummy;
 		p = pageView->GetPage(r, c, &dummy);
 		emit gotoPage(p);
 	}
@@ -188,18 +188,18 @@
 	if (m_scMW->scriptIsRunning())
 		return;
 	masterPageList->clear();
-	if (currView == 0)
+	if (currView == nullptr)
 		return;
 	QPixmap pm;
 	QListWidgetItem* item;
 	QMap<QString,int>::Iterator it;
 	for (it = currView->Doc->MasterNames.begin(); it != currView->Doc->MasterNames.end(); ++it)
 	{
-		QString pageLabel = it.key() == CommonStrings::masterPageNormal ? CommonStrings::trMasterPageNormal : it.key();
-		QString pageName = it.key();
+		const QString& pageName = it.key();
+		QString pageLabel = (pageName == CommonStrings::masterPageNormal) ? CommonStrings::trMasterPageNormal : pageName;
 		if (masterPageList->Thumb)
 		{
-			pm = QPixmap::fromImage(currView->MPageToPixmap(it.key(),60));
+			pm = QPixmap::fromImage(currView->MPageToPixmap(pageName, 60));
 			item = new QListWidgetItem(QIcon(pm), pageLabel, masterPageList);
 		}
 		else
@@ -213,15 +213,15 @@
 	if (m_scMW->scriptIsRunning())
 		return;
 	QString str;
-	disconnect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
-	disconnect(pageLayout, SIGNAL(selectedFirstPage(int )), this, SLOT(handleFirstPage(int )));
+	disconnect(pageLayout, SIGNAL(selectedLayout(int)), this, SLOT(handlePageLayout(int)));
+	disconnect(pageLayout, SIGNAL(selectedFirstPage(int)), this, SLOT(handleFirstPage(int)));
 	pageView->clearContents();
 	pageView->setRowCount(1);
 	pageView->setColumnCount(1);
-	if (currView == 0)
-	{
-		connect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
-		connect(pageLayout, SIGNAL(selectedFirstPage(int )), this, SLOT(handleFirstPage(int )));
+	if (currView == nullptr)
+	{
+		connect(pageLayout, SIGNAL(selectedLayout(int)), this, SLOT(handlePageLayout(int)));
+		connect(pageLayout, SIGNAL(selectedFirstPage(int)), this, SLOT(handleFirstPage(int)));
 		return;
 	}
 	pageLayout->updateLayoutSelector(currView->Doc->pageSets());
@@ -304,28 +304,28 @@
 		}
 	}
 	pageView->repaint();
-	if (currView != 0)
+	if (currView != nullptr)
 		markPage(currView->Doc->currentPageNumber());
-	connect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
-	connect(pageLayout, SIGNAL(selectedFirstPage(int )), this, SLOT(handleFirstPage(int )));
+	connect(pageLayout, SIGNAL(selectedLayout(int)), this, SLOT(handlePageLayout(int)));
+	connect(pageLayout, SIGNAL(selectedFirstPage(int)), this, SLOT(handleFirstPage(int)));
 }
 
 void PagePalette_Pages::Rebuild()
 {
 	rebuildMasters();
 	rebuildPages();
-	enablePalette(currView != 0);
+	enablePalette(currView != nullptr);
 }
 
 void PagePalette_Pages::markPage(uint nr)
 {
-	if (currView == 0)
+	if (currView == nullptr)
 		return;
 
 	SeItem *it;
-	for (int a = 0; a < pageList.count(); a++)
-	{
-		it = pageList.at(a);
+	for (int i = 0; i < pageList.count(); i++)
+	{
+		it = pageList.at(i);
 		if (it->pageNumber == nr)
 		{
 			pageView->clearSelection();
@@ -345,14 +345,13 @@
 
 void PagePalette_Pages::selMasterPage()
 {
-	if (masterPageList->CurItem != 0)
-	{
-		QVariant pageVar = masterPageList->CurItem->data(Qt::UserRole);
-		emit gotoMasterPage(pageVar.toString());
-	}
-}
-
-QPixmap PagePalette_Pages::createIcon(int nr, QString masterPage, QPixmap pixin)
+	if (masterPageList->CurItem == nullptr)
+		return;
+	QVariant pageVar = masterPageList->CurItem->data(Qt::UserRole);
+	emit gotoMasterPage(pageVar.toString());
+}
+
+QPixmap PagePalette_Pages::createIcon(int nr, QString masterPage, const QPixmap& pixin)
 {
 	QPainter p;
 	// Necessary on windows to ensure the pixmap is drawable

Modified: trunk/Scribus/scribus/ui/pagepalette_pages.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_pages.h
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_pages.h	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_pages.h	Sun Aug  5 10:33:40 2018
@@ -38,7 +38,7 @@
 
 public slots:
 	void setView(ScribusView *view);
-	void deleteMasterPage(QString tmp);
+	void deleteMasterPage(const QString& tmp);
 	void enablePalette(const bool);
 	void handlePageLayout(int layout);
 	void handleFirstPage(int fp);
@@ -67,7 +67,7 @@
 	QList<SeItem*>    pageList;
 	QPixmap pix;
 
-	QPixmap createIcon(int nr, QString mp, QPixmap pixin);
+	QPixmap createIcon(int nr, QString mp, const QPixmap& pixin);
 };
 
 #endif // SEITENPAL_H

Modified: trunk/Scribus/scribus/ui/pagepalette_widgets.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_widgets.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_widgets.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_widgets.cpp	Sun Aug  5 10:33:40 2018
@@ -28,7 +28,8 @@
 
 
 /* IconItems Code */
-SeItem::SeItem(QString text, uint nr, const QPixmap& Pix) : QTableWidgetItem(QIcon(Pix), "", 1002)
+SeItem::SeItem(const QString& text, uint nr, const QPixmap& Pix)
+	: QTableWidgetItem(QIcon(Pix), "", 1002)
 {
 	pageNumber = nr;
 	pageName = text;
@@ -43,7 +44,7 @@
 /* ListBox Subclass */
 SeList::SeList(QWidget* parent) : QListWidget(parent)
 {
-	CurItem = 0;
+	CurItem = nullptr;
 	Mpressed = false;
 	Thumb = false;
 	setAcceptDrops(true);
@@ -75,7 +76,7 @@
 void SeList::mousePressEvent(QMouseEvent* e)
 {
 	e->accept();
-	CurItem = 0;
+	CurItem = nullptr;
 	QListWidgetItem *i = itemAt(e->pos());
 	if (i)
 	{
@@ -201,7 +202,7 @@
 		if ((a != -1) && (b != -1))
 		{
 			QTableWidgetItem* ite = item(a, b);
-			if (ite != 0)
+			if (ite != nullptr)
 			{
 				if (ite->type() == 1002)
 				{
@@ -265,7 +266,7 @@
 				{
 					emit UseTemp(tmp, p);
 					QTableWidgetItem* ite = item(a, b);
-					if (ite == 0)
+					if (ite == nullptr)
 						return;
 					if (ite->type() == 1002)
 					{
@@ -275,29 +276,26 @@
 				}
 				return;
 			}
+			if ((b % 2) == 0)
+			{
+				if (lastPage)
+					emit NewPage(p+1, tmp);
+				else
+					emit NewPage(p, tmp);
+			}
 			else
 			{
-				if ((b % 2) == 0)
+				emit UseTemp(tmp, p);
+				QTableWidgetItem* ite = item(a, b);
+				if (ite == nullptr)
+					return;
+				if (ite->type() == 1002)
 				{
-					if (lastPage)
-						emit NewPage(p+1, tmp);
-					else
-						emit NewPage(p, tmp);
+					SeItem* it = (SeItem*)ite;
+					it->pageName = tmp;
 				}
-				else
-				{
-					emit UseTemp(tmp, p);
-					QTableWidgetItem* ite = item(a, b);
-					if (ite == 0)
-						return;
-					if (ite->type() == 1002)
-					{
-						SeItem* it = (SeItem*)ite;
-						it->pageName = tmp;
-					}
-				}
-				return;
-			}
+			}
+			return;
 		}
 		if (str.startsWith("2"))
 		{
@@ -323,30 +321,27 @@
 				else
 				{
 					emit UseTemp(tmp, p);
-					if (ite == 0)
+					if (ite == nullptr)
 						return;
 					SeItem* it = (SeItem*)ite;
 					it->pageName = tmp;
 				}
 				return;
 			}
+			if ((b % 2) == 0)
+				emit movePage(dr, lastPage ? p+1 : p);
 			else
 			{
-				if ((b % 2) == 0)
-					emit movePage(dr, lastPage ? p+1 : p);
-				else
+				emit UseTemp(tmp, p);
+				if (ite == nullptr)
+					return;
+				if (ite->type() == 1002)
 				{
-					emit UseTemp(tmp, p);
-					if (ite == 0)
-						return;
-					if (ite->type() == 1002)
-					{
-						SeItem* it = (SeItem*)ite;
-						it->pageName = tmp;
-					}
+					SeItem* it = (SeItem*)ite;
+					it->pageName = tmp;
 				}
-				return;
-			}
+			}
+			return;
 		}
 	}
 }
@@ -464,23 +459,20 @@
 			ret = a;
 			return ret;
 		}
+		if (columnCount() == 1)
+		{
+			if ((rowcounter*rowmult) == r)
+			{
+				ret = a;
+				return ret;
+			}
+		}
 		else
 		{
-			if (columnCount() == 1)
-			{
-				if ((rowcounter*rowmult) == r)
-				{
-					ret = a;
-					return ret;
-				}
-			}
-			else
-			{
-				if ((counter*colmult == c) && (rowcounter*rowmult+rowadd == r))
-				{
-					ret = a;
-					return ret;
-				}
+			if ((counter*colmult == c) && (rowcounter*rowmult+rowadd == r))
+			{
+				ret = a;
+				return ret;
 			}
 		}
 		counter++;
@@ -508,7 +500,7 @@
 				return pageItem;
 		}
 	}
-	return 0;
+	return nullptr;
 }
 
 /* Der Muelleimer */

Modified: trunk/Scribus/scribus/ui/pagepalette_widgets.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepalette_widgets.h
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_widgets.h	(original)
+++ trunk/Scribus/scribus/ui/pagepalette_widgets.h	Sun Aug  5 10:33:40 2018
@@ -44,7 +44,7 @@
 	friend class SeView;
 
 public:
-	SeItem(QString text, uint pgnr, const QPixmap& Pix);
+	SeItem(const QString& text, uint pgnr, const QPixmap& Pix);
 	~SeItem() {};
 
 	const QString& getPageName();

Modified: trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pagepropertiesdialog.cpp	Sun Aug  5 10:33:40 2018
@@ -88,7 +88,7 @@
 	moveObjects->setText( tr( "Move Objects with their Page" ) );
 	moveObjects->setChecked( true );
 	dsGroupBox7Layout->addWidget( moveObjects, 3, 0, 1, 4 );
-	Links=0;
+	Links=nullptr;
 	if ((doc->pagePositioning() != singlePage) && (doc->masterPageMode()))
 	{
 		TextLabel3 = new QLabel( tr( "Type:" ), dsGroupBox7 );
@@ -281,7 +281,7 @@
 int PagePropertiesDialog::pageOrder()
 {
 	int lp=0;
-	if (Links!=0)
+	if (Links!=nullptr)
 		lp = Links->currentIndex();
 	if (lp == 0)
 		lp = 1;

Modified: trunk/Scribus/scribus/ui/pageselector.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pageselector.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pageselector.cpp	(original)
+++ trunk/Scribus/scribus/ui/pageselector.cpp	Sun Aug  5 10:33:40 2018
@@ -23,7 +23,7 @@
 #include "iconmanager.h"
 #include "util.h"
 
-PageSelector::PageSelector( QWidget* parent, int maxPg ) : QWidget( parent, 0 )
+PageSelector::PageSelector( QWidget* parent, int maxPg ) : QWidget( parent, nullptr )
 {
 	PageCountString = "%1" ;
 	m_lastPage = maxPg;

Modified: trunk/Scribus/scribus/ui/pdfexportdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pdfexportdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfexportdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pdfexportdialog.cpp	Sun Aug  5 10:33:40 2018
@@ -244,7 +244,7 @@
 			wdir = wfile;
 	}
 
-	QString d = QFileDialog::getSaveFileName(this, tr("Save As"), wdir, tr("PDF Files (*.pdf);;All Files (*)"), 0, QFileDialog::DontConfirmOverwrite);
+	QString d = QFileDialog::getSaveFileName(this, tr("Save As"), wdir, tr("PDF Files (*.pdf);;All Files (*)"), nullptr, QFileDialog::DontConfirmOverwrite);
 	if (d.length() > 0)
 	{
 		QString fn(QDir::fromNativeSeparators(d));

Modified: trunk/Scribus/scribus/ui/pdfversioncombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pdfversioncombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfversioncombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/pdfversioncombo.cpp	Sun Aug  5 10:33:40 2018
@@ -22,7 +22,7 @@
 	if (m_pdfVersionModel)
 	{
 		delete m_pdfVersionModel;
-		m_pdfVersionModel = 0;
+		m_pdfVersionModel = nullptr;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/pdfversionmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/pdfversionmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfversionmodel.cpp	(original)
+++ trunk/Scribus/scribus/ui/pdfversionmodel.cpp	Sun Aug  5 10:33:40 2018
@@ -60,9 +60,9 @@
 Qt::ItemFlags PdfVersionModel::flags(const QModelIndex &index) const
 {
 	if (!index.isValid())
-		return 0;
+		return nullptr;
 
-	Qt::ItemFlags flags = 0;
+	Qt::ItemFlags flags = nullptr;
 	if (m_enabledVec[index.row()])
 		flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 	return flags;

Modified: trunk/Scribus/scribus/ui/picsearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/picsearch.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picsearch.cpp	(original)
+++ trunk/Scribus/scribus/ui/picsearch.cpp	Sun Aug  5 10:33:40 2018
@@ -72,7 +72,7 @@
 		ext = getImageType(currentImage);
 	ScImage im;
 	//No doc to send data anyway, so no doc to get into scimage.
-	CMSettings cms(0, "", Intent_Perceptual);
+	CMSettings cms(nullptr, "", Intent_Perceptual);
 	cms.allowColorManagement(false);
 	if (im.loadPicture(currentImage, 1, cms, ScImage::Thumbnail, 72, &mode))
 	{

Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp	(original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp	Sun Aug  5 10:33:40 2018
@@ -54,7 +54,7 @@
 
 
 
-PicItem::PicItem(QListWidget* parent, QString text, QPixmap pix, PageItem* pgItem)
+PicItem::PicItem(QListWidget* parent, const QString& text, const QPixmap& pix, PageItem* pgItem)
 	: QListWidgetItem(pix, text, parent)
 {
 	PageItemObject = pgItem;
@@ -134,8 +134,8 @@
 {
 	PageItem *item;
 	imageViewArea->clear();
-	QListWidgetItem *firstItem=0;
-	QListWidgetItem *tempItem=0;
+	QListWidgetItem *firstItem=nullptr;
+	QListWidgetItem *tempItem=nullptr;
 
 	QList<PageItem*> allItems;
 	for (int i = 0; i < m_Doc->MasterItems.count(); ++i)
@@ -156,7 +156,7 @@
 				Iname = fi.fileName();
 			if ((item->itemType() == PageItem::ImageFrame) && (!item->asLatexFrame()))
 				tempItem = new PicItem(imageViewArea, Iname, createImgIcon(item), item);
-			if (firstItem == 0)
+			if (firstItem == nullptr)
 				firstItem = tempItem;
 		}
 		allItems.clear();
@@ -182,13 +182,13 @@
 				tempItem = new PicItem(imageViewArea, Iname, createImgIcon(item), item);
 			// if an image is selected in a doc, Manage Pictures should
 			// display the selected image and its values
-			if (firstItem == 0 || item->isSelected())
+			if (firstItem == nullptr || item->isSelected())
 				firstItem = tempItem;
 		}
 		allItems.clear();
 	}
 	imageViewArea->setCurrentItem(firstItem);
-	if (firstItem!=0)
+	if (firstItem!=nullptr)
 		imageSelected(firstItem);
 
 	// Disable all features when there is no image in the document.
@@ -201,7 +201,7 @@
 
 void PicStatus::sortByName()
 {
-	QListWidgetItem *firstItem = 0;
+	QListWidgetItem *firstItem = nullptr;
 	QMap<QString, PicItem*> sorted;
 
 	int num = imageViewArea->count();
@@ -233,7 +233,7 @@
 
 void PicStatus::sortByPage()
 {
-	QListWidgetItem *firstItem = 0;
+	QListWidgetItem *firstItem = nullptr;
 	QMap<int, PicItem*> sorted;
 
 	int num = imageViewArea->count();

Modified: trunk/Scribus/scribus/ui/picstatus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22603&path=/trunk/Scribus/scribus/ui/picstatus.h
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.h	(original)
+++ trunk/Scribus/scribus/ui/picstatus.h	Sun Aug  5 10:33:40 2018
@@ -17,7 +17,7 @@
 class SCRIBUS_API PicItem : public QListWidgetItem
 {
 public:
-	PicItem(QListWidget* parent, QString text, QPixmap pix, PageItem* pgItem);
+	PicItem(QListWidget* parent, const QString& text, const QPixmap& pix, PageItem* pgItem);
 	~PicItem() {};
 	PageItem *PageItemObject;
 };




More information about the scribus-commit mailing list