r22561 by craig - Fixing clang warnings all over the place 1

scribus-commit scribus-commit at lists.scribus.net
Sun May 27 18:15:32 UTC 2018


Author: craig
Date: Sun May 27 18:15:32 2018
New Revision: 22561

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22561
Log:
Fixing clang warnings all over the place 1

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/ui/cupsoptions.cpp
    trunk/Scribus/scribus/ui/cupsoptions.h
    trunk/Scribus/scribus/ui/query.h
    trunk/Scribus/scribus/vgradient.h

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sun May 27 18:15:32 2018
@@ -296,22 +296,22 @@
 
 ScribusMainWindow::ScribusMainWindow()
 {
-	actionManager=0;
-	appModeHelper=0;
-	scrMenuMgr=0;
-	m_prefsManager=0;
-	m_formatsManager=0;
-	resourceManager=0;
+	actionManager=nullptr;
+	appModeHelper=nullptr;
+	scrMenuMgr=nullptr;
+	m_prefsManager=nullptr;
+	m_formatsManager=nullptr;
+	resourceManager=nullptr;
 	UrlLauncher::instance();
-	m_mainWindowStatusLabel=0;
+	m_mainWindowStatusLabel=nullptr;
 	m_ScriptRunning = 0;
 #ifdef Q_OS_MAC
 	//commenting this out until this is resolved :https://bugreports.qt.io/browse/QTBUG-44565
 	//ScQApp->setAttribute(Qt::AA_DontShowIconsInMenus);
 	//noIcon = IconManager::instance()->loadPixmap("noicon.png");
 #endif
-	m_doc = 0;
-	m_tocGenerator = 0;
+	m_doc = nullptr;
+	m_tocGenerator = nullptr;
 }
 
 /*
@@ -336,7 +336,7 @@
 	m_doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 	m_doc->setPage(100, 100, 0, 0, 0, 0, 0, 0, false, false);
 	m_doc->addPage(0);
-	m_doc->setGUI(false, this, 0);
+	m_doc->setGUI(false, this, nullptr);
 	CurrStED = nullptr;
 	QString scribusTitle(tr("Scribus") + " " + QString(VERSION));
 #if defined(HAVE_SVNVERSION) && defined(SVNVERSION)
@@ -390,7 +390,7 @@
 	initKeyboardShortcuts();
 
 	resize(610, 600);
-	connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(newActWin(QMdiSubWindow *)));
+	connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(newActWin(QMdiSubWindow *)));
 	//Connect windows cascade and tile actions to the workspace after its created. Only depends on mdiArea created.
 	connect( scrActions["windowsCascade"], SIGNAL(triggered()) , mdiArea, SLOT(cascadeSubWindows()) );
 	connect( scrActions["windowsTile"], SIGNAL(triggered()) , mdiArea, SLOT(tileSubWindows()) );
@@ -427,7 +427,7 @@
 	if (scrActions["SaveAsDocumentTemplate"])
 		scrActions["SaveAsDocumentTemplate"]->setEnabled(false);
 
-	connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), this, SLOT(removeRecentFromWatcher(QString)));
+	connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString)), this, SLOT(removeRecentFromWatcher(QString)));
 	connect(ClipB, SIGNAL(dataChanged()), this, SLOT(ClipChange()));
 	setAcceptDrops(true);
 	QCoreApplication::instance()->installEventFilter(this);
@@ -2316,7 +2316,7 @@
 		actionManager->connectNewDocActions(tempDoc);
 	}
 	//<<View and window code
-	QMdiArea* qwsp = 0;
+	QMdiArea* qwsp = nullptr;
 	if (requiresGUI)
 		qwsp = mdiArea;
 	ScribusWin* w = new ScribusWin(qwsp, tempDoc);
@@ -2359,7 +2359,7 @@
 	if (requiresGUI)
 	{
 		w->setSubWin(mdiArea->addSubWindow(w));
-			connect(tempView, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
+			connect(tempView, SIGNAL(signalGuideInformation(int,qreal)), alignDistributePalette, SLOT(setGuide(int,qreal)));
 	}
 	//Independent finishing tasks after tempDoc setup
 	if (showView)
@@ -2377,7 +2377,7 @@
 	{
 		connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString)), tempDoc, SLOT(updatePict(QString)));
 		connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString)), tempDoc, SLOT(removePict(QString)));
-		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), tempDoc, SLOT(updatePictDir(QString )));
+		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString)), tempDoc, SLOT(updatePictDir(QString)));
 		connect(doc, SIGNAL(updateAutoSaveClock()), view->clockLabel, SLOT(resetTime()));
 		view->clockLabel->resetTime();
 		scrActions["viewToggleCMS"]->setChecked(tempDoc->HasCMS);
@@ -2550,8 +2550,8 @@
 		connect(m_undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 		connect(m_undoManager, SIGNAL(undoRedoDone()) , doc, SLOT(undoRedoDone()));
 		connect(m_undoManager, SIGNAL(undoRedoDone()) , doc->view(), SLOT(DrawNew()));
-		connect(doc, SIGNAL(addBookmark(PageItem *)), this, SLOT(AddBookMark(PageItem *)));
-		connect(doc, SIGNAL(deleteBookmark(PageItem *)), this, SLOT(DelBookMark(PageItem *)));
+		connect(doc, SIGNAL(addBookmark(PageItem*)), this, SLOT(AddBookMark(PageItem*)));
+		connect(doc, SIGNAL(deleteBookmark(PageItem*)), this, SLOT(DelBookMark(PageItem*)));
 		connect(unitSwitcher, SIGNAL(activated(int)), doc->view(), SLOT(ChgUnit(int)));
 		connect(zoomSpinBox, SIGNAL(valueChanged(double)), doc->view(), SLOT(setZoom()));
 		connect(zoomDefaultToolbarButton, SIGNAL(clicked()), doc->view(), SLOT(slotZoom100()));
@@ -2581,7 +2581,7 @@
 		actionManager->disconnectNewViewActions();
 		disconnect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
 		if (ScCore->usingGUI())
-			disconnect(doc->m_Selection, SIGNAL(selectionIsMultiple(bool)), 0, 0);
+			doc->m_Selection->disconnect(SIGNAL(selectionIsMultiple(bool)));
 	}
 	view = ActWin->view();
 	bool b = zoomSpinBox->blockSignals(true);
@@ -2590,7 +2590,7 @@
 	actionManager->connectNewViewActions(view);
 	actionManager->disconnectNewDocActions();
 	actionManager->connectNewDocActions(doc);
-	connect(view, SIGNAL(signalGuideInformation(int, qreal)), alignDistributePalette, SLOT(setGuide(int, qreal)));
+	connect(view, SIGNAL(signalGuideInformation(int,qreal)), alignDistributePalette, SLOT(setGuide(int,qreal)));
 	if (ScCore->usingGUI())
 		connect(doc->m_Selection, SIGNAL(selectionIsMultiple(bool)), actionManager, SLOT( handleMultipleSelections(bool)));
 	pagePalette->setView(view);
@@ -2737,20 +2737,20 @@
 	connect(view, SIGNAL(changeUN(int)), this, SLOT(slotChangeUnit(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(changeLA(int)), layerPalette, SLOT(markActiveLayer(int)), Qt::UniqueConnection);
 	connect(this, SIGNAL(changeLayers(int)), layerPalette, SLOT(markActiveLayer(int)), Qt::UniqueConnection);
-	connect(view->horizRuler, SIGNAL(MarkerMoved(double, double)), this, SLOT(setStatusBarTextPosition(double, double)), Qt::UniqueConnection);
+	connect(view->horizRuler, SIGNAL(MarkerMoved(double,double)), this, SLOT(setStatusBarTextPosition(double,double)), Qt::UniqueConnection);
 	connect(view->horizRuler, SIGNAL(DocChanged(bool)), this, SLOT(slotDocCh(bool)), Qt::UniqueConnection);
-	connect(view, SIGNAL(ClipPo(double, double)), nodePalette, SLOT(SetXY(double, double)), Qt::UniqueConnection);
+	connect(view, SIGNAL(ClipPo(double,double)), nodePalette, SLOT(SetXY(double,double)), Qt::UniqueConnection);
 	connect(view, SIGNAL(PolyOpen()), nodePalette, SLOT(IsOpen()), Qt::UniqueConnection);
-	connect(view, SIGNAL(PStatus(int, uint)), nodePalette, SLOT(PolyStatus(int, uint)), Qt::UniqueConnection);
+	connect(view, SIGNAL(PStatus(int,uint)), nodePalette, SLOT(PolyStatus(int,uint)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemGeom()), propertiesPalette->xyzPal, SLOT(handleSelectionChanged()), Qt::UniqueConnection);
-	connect(view, SIGNAL(ChBMText(PageItem *)), this, SLOT(BookMarkTxT(PageItem *)), Qt::UniqueConnection);
+	connect(view, SIGNAL(ChBMText(PageItem*)), this, SLOT(BookMarkTxT(PageItem*)), Qt::UniqueConnection);
 	connect(view, SIGNAL(HaveSel()), this, SLOT(HaveNewSel()), Qt::UniqueConnection);
 	connect(view, SIGNAL(PaintingDone()), this, SLOT(slotSelect()), Qt::UniqueConnection);
 	connect(view, SIGNAL(DocChanged()), this, SLOT(slotDocCh()), Qt::UniqueConnection);
-	connect(view, SIGNAL(MousePos(double, double)), this, SLOT(setStatusBarMousePosition(double, double)), Qt::UniqueConnection);
+	connect(view, SIGNAL(MousePos(double,double)), this, SLOT(setStatusBarMousePosition(double,double)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemCharStyle(const CharStyle&)), textPalette->textPal, SLOT(updateCharStyle(const CharStyle&)), Qt::UniqueConnection);
 	connect(view, SIGNAL(ItemTextEffects(int)), this, SLOT(setStyleEffects(int)), Qt::UniqueConnection);
-	connect(view, SIGNAL(ItemTextAlign(int))  , this, SLOT(setAlignmentValue(int)), Qt::UniqueConnection);
+	connect(view, SIGNAL(ItemTextAlign(int)), this, SLOT(setAlignmentValue(int)), Qt::UniqueConnection);
 	connect(view, SIGNAL(HasTextSel()), this, SLOT(EnableTxEdit()), Qt::UniqueConnection);
 	connect(view, SIGNAL(HasNoTextSel()), this, SLOT(DisableTxEdit()), Qt::UniqueConnection);
 	connect(view, SIGNAL(CopyItem()), this, SLOT(slotEditCopy()), Qt::UniqueConnection);
@@ -2760,8 +2760,8 @@
 	connect(view, SIGNAL(AppendText()), this, SLOT(slotFileAppend()), Qt::UniqueConnection);
 	connect(view, SIGNAL(AnnotProps()), this, SLOT(ModifyAnnot()), Qt::UniqueConnection);
 	connect(view, SIGNAL(LoadElem(QString, double ,double, bool, bool, ScribusDoc *, ScribusView*)), this, SLOT(slotElemRead(QString, double, double, bool, bool, ScribusDoc *, ScribusView*)), Qt::UniqueConnection);
-	connect(view, SIGNAL(AddBM(PageItem *)), this, SLOT(AddBookMark(PageItem *)), Qt::UniqueConnection);
-	connect(view, SIGNAL(DelBM(PageItem *)), this, SLOT(DelBookMark(PageItem *)), Qt::UniqueConnection);
+	connect(view, SIGNAL(AddBM(PageItem*)), this, SLOT(AddBookMark(PageItem*)), Qt::UniqueConnection);
+	connect(view, SIGNAL(DelBM(PageItem*)), this, SLOT(DelBookMark(PageItem*)), Qt::UniqueConnection);
 	connect(view, SIGNAL(DoGroup()), this, SLOT(GroupObj()), Qt::UniqueConnection);
 	connect(view, SIGNAL(callGimp()), this, SLOT(callImageEditor()), Qt::UniqueConnection);
 }
@@ -2784,7 +2784,7 @@
 
 	actionManager->disconnectNewSelectionActions();
 
-	charPalette->setEnabled(false, 0);
+	charPalette->setEnabled(false, nullptr);
 	view->horizRuler->textMode(false);
 	view->horizRuler->update();
 	if (!doc->inAnEditMode())
@@ -2867,7 +2867,7 @@
 	QStringList pluginNames(pluginManager.pluginNames(false));
 	ScPlugin* plugin;
 	ScActionPlugin* ixplug;
-	ScrAction* pluginAction = 0;
+	ScrAction* pluginAction = nullptr;
 	QString pName;
 	for (int i = 0; i < pluginNames.count(); ++i)
 	{
@@ -2946,7 +2946,7 @@
 	}
 }
 
-void ScribusMainWindow::updateRecent(QString fn)
+void ScribusMainWindow::updateRecent(const QString& fn)
 {
 	if (RecentDocs.indexOf(fn) != -1)
 		RecentDocs.removeAll(fn);
@@ -2954,7 +2954,7 @@
 	rebuildRecentFileMenu();
 }
 
-void ScribusMainWindow::removeRecent(QString fn, bool fromFileWatcher)
+void ScribusMainWindow::removeRecent(const QString& fn, bool fromFileWatcher)
 {
 	if (RecentDocs.indexOf(fn) != -1)
 	{
@@ -2965,12 +2965,12 @@
 	rebuildRecentFileMenu();
 }
 
-void ScribusMainWindow::removeRecentFromWatcher(QString filename)
+void ScribusMainWindow::removeRecentFromWatcher(const QString& filename)
 {
 	removeRecent(filename, true);
 }
 
-void ScribusMainWindow::loadRecent(QString filename)
+void ScribusMainWindow::loadRecent(const QString& filename)
 {
 	QFileInfo fd(filename);
 	if (!fd.exists())
@@ -2985,12 +2985,12 @@
 	scrRecentFileActions.clear();
 	uint max = qMin(m_prefsManager->appPrefs.uiPrefs.recentDocCount, RecentDocs.count());
 	QString strippedName, localName;
-	for (uint m = 0; m < max; ++m)
-	{
-		strippedName = localName = QDir::toNativeSeparators(RecentDocs[m]);
+	for (int i = 0; i < max; ++i)
+	{
+		strippedName = localName = QDir::toNativeSeparators(RecentDocs[i]);
 		strippedName.remove(QDir::separator());
-		strippedName.prepend(QString("%1").arg(m+1, 2, 10, QChar('0')));
-		scrRecentFileActions.insert(strippedName, new ScrAction(ScrAction::RecentFile, QPixmap(), QPixmap(), QString("%1 &%2").arg(m+1).arg(localName.replace("&","&&")), QKeySequence(), this, RecentDocs[m]));
+		strippedName.prepend(QString("%1").arg(i+1, 2, 10, QChar('0')));
+		scrRecentFileActions.insert(strippedName, new ScrAction(ScrAction::RecentFile, QPixmap(), QPixmap(), QString("%1 &%2").arg(i+1).arg(localName.replace("&","&&")), QKeySequence(), this, RecentDocs[i]));
 		connect( scrRecentFileActions[strippedName], SIGNAL(triggeredData(QString)), this, SLOT(loadRecent(QString)) );
 		scrMenuMgr->addMenuItemString(strippedName, "FileOpenRecent");
 	}
@@ -3041,7 +3041,7 @@
 	scrMenuMgr->addMenuItemStringstoRememberedMenu("ItemSendToScrapbook", scrScrapActions);
 }
 
-void ScribusMainWindow::pasteFromScrapbook(QString fn)
+void ScribusMainWindow::pasteFromScrapbook(const QString& fn)
 {
 	if (!HaveDoc)
 		return;
@@ -3050,7 +3050,7 @@
 	doPasteRecent(scrapbookPalette->activeBView->objectMap[fn].Data);
 }
 
-void ScribusMainWindow::pasteRecent(QString fn)
+void ScribusMainWindow::pasteRecent(const QString& fn)
 {
 	doPasteRecent(scrapbookPalette->tempBView->objectMap[fn].Data);
 }
@@ -3257,7 +3257,7 @@
 	QMap<QString, QPointer<ScrAction> >::Iterator itend=scrLayersActions.end();
 	for( QMap<QString, QPointer<ScrAction> >::Iterator it = scrLayersActions.begin(); it!=itend; ++it )
 	{
-		disconnect( (*it), SIGNAL(triggeredData(int)), 0, 0 );
+		(*it)->disconnect(SIGNAL(triggeredData(int)));
 		(*it)->setChecked(false);
 	}
 	if (!doc->m_Selection->isEmpty() && doc->m_Selection->itemAt(0))
@@ -3448,7 +3448,7 @@
 	return ret;
 }
 
-bool ScribusMainWindow::loadDoc(QString fileName)
+bool ScribusMainWindow::loadDoc(const QString& fileName)
 {
 #ifdef DEBUG_LOAD_TIMES
 	QTime t;
@@ -3847,10 +3847,10 @@
 		scrActions["viewToggleCMS"]->setChecked(doc->HasCMS);
 		view->zoom();
 		view->GotoPage(0);
-		connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(newActWin(QMdiSubWindow *)));
-		connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
-		connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
-		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), doc, SLOT(updatePictDir(QString )));
+		connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(newActWin(QMdiSubWindow*)));
+		connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString)), doc, SLOT(updatePict(QString)));
+		connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString)), doc, SLOT(removePict(QString)));
+		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString)), doc, SLOT(updatePictDir(QString )));
 		connect(m_undoManager, SIGNAL(undoRedoBegin()), doc, SLOT(undoRedoBegin()));
 		connect(m_undoManager, SIGNAL(undoRedoDone()), doc, SLOT(undoRedoDone()));
 		connect(m_undoManager, SIGNAL(undoRedoDone()), view, SLOT(DrawNew()));
@@ -3867,7 +3867,7 @@
 	}
 	else
 	{
-		pagePalette->setView(0);
+		pagePalette->setView(nullptr);
 	}
 
 	m_undoManager->switchStack(doc->DocName);
@@ -4351,14 +4351,14 @@
 	//due to it being the central widget and will delete it at the correct moment from its own pointer.
 	view = nullptr;
 	doc->setLoading(true);
-	guidePalette->setDoc(0);
-	charPalette->setDoc(0);
-	m_tocGenerator->setDoc(0);
-	m_styleManager->setDoc(0);
-	marksManager->setDoc(0);
-	nsEditor->setDoc(0);
+	guidePalette->setDoc(nullptr);
+	charPalette->setDoc(nullptr);
+	m_tocGenerator->setDoc(nullptr);
+	m_styleManager->setDoc(nullptr);
+	marksManager->setDoc(nullptr);
+	nsEditor->setDoc(nullptr);
 	layerPalette->ClearInhalt();
-	docCheckerPalette->buildErrorList(0);
+	docCheckerPalette->buildErrorList(nullptr);
 	HaveDoc--;
 	delete doc;
 	doc = nullptr;
@@ -5221,7 +5221,7 @@
 {
 	if (!m_helpBrowser)
 	{
-		m_helpBrowser = new HelpBrowser(0, tr("Scribus Manual"), ScCore->getGuiLanguage(), jumpToSection, jumpToFile);
+		m_helpBrowser = new HelpBrowser(nullptr, tr("Scribus Manual"), ScCore->getGuiLanguage(), jumpToSection, jumpToFile);
 		connect(m_helpBrowser, SIGNAL(closed()), this, SLOT(slotOnlineHelpClosed()));
 	}
 	else //just set the requested page
@@ -5285,7 +5285,7 @@
 	}
 }
 
-void ScribusMainWindow::applyNewMaster(QString name)
+void ScribusMainWindow::applyNewMaster(const QString& name)
 {
 	Apply_MasterPage(name, doc->currentPage()->pageNr(), false);
 	view->reformPages();
@@ -5293,7 +5293,7 @@
 	pagePalette->Rebuild();
 }
 
-void ScribusMainWindow::slotNewPageP(int wo, QString templ)
+void ScribusMainWindow::slotNewPageP(int wo, const QString& templ)
 {
 	if (!HaveDoc)
 		return;
@@ -5338,7 +5338,7 @@
 	delete dia;
 }
 
-void ScribusMainWindow::addNewPages(int wo, int where, int numPages, double height, double width, int orient, QString siz, bool mov, QStringList* basedOn, bool overrideMasterPageSizing)
+void ScribusMainWindow::addNewPages(int wo, int where, int numPages, double height, double width, int orient, const QString& siz, bool mov, QStringList* basedOn, bool overrideMasterPageSizing)
 {
 	UndoTransaction activeTransaction;
 	if (UndoManager::undoEnabled())
@@ -5947,8 +5947,8 @@
 	nodePalette->MoveNode->setChecked(true);
 	nodePalette->show();
 //	qDebug() << "nodepalette show:" << nodePalette->geometry();
-	connect(view, SIGNAL(HavePoint(bool, bool)), nodePalette, SLOT(HaveNode(bool, bool)));
-	connect(view, SIGNAL(PolyStatus(int, uint)), nodePalette, SLOT(PolyStatus(int, uint)));
+	connect(view, SIGNAL(HavePoint(bool,bool)), nodePalette, SLOT(HaveNode(bool,bool)));
+	connect(view, SIGNAL(PolyStatus(int,uint)), nodePalette, SLOT(PolyStatus(int,uint)));
 	doc->nodeEdit.reset();
 	appModeHelper->setFrameEditMode(true);
 	enablePalettes(false);
@@ -5990,7 +5990,7 @@
 	disconnect(view, SIGNAL(HavePoint(bool, bool)), nodePalette, SLOT(HaveNode(bool, bool)));
 	disconnect(view, SIGNAL(PolyStatus(int, uint)), nodePalette, SLOT(PolyStatus(int, uint)));
 	actionManager->disconnectModeActions();
-	nodePalette->setDoc(0,0);
+	nodePalette->setDoc(nullptr, nullptr);
 	nodePalette->hide();
 	appModeHelper->setFrameEditMode(false);
 	scrActions["toolsSelect"]->setChecked(true);
@@ -6316,7 +6316,7 @@
 	else
 	{
 		bool ok = false;
-		Query dia(this, "New", 1, tr("&Size:"), tr("Size"));
+		Query dia(this, "New", true, tr("&Size:"), tr("Size"));
 		if (dia.exec())
 		{
 			fs = qRound(dia.getEditText().toDouble(&ok));
@@ -6327,13 +6327,11 @@
 	textPalette->textPal->showFontSize(fs*10);
 }
 
-void ScribusMainWindow::setItemLanguage(QString language)
-{
-	Query dia(this, "New", 1, tr("&Language:"), tr("Language"));
+void ScribusMainWindow::setItemLanguage(const QString& language)
+{
+	Query dia(this, "New", true, tr("&Language:"), tr("Language"));
 	if (dia.exec())
-	{
 		doc->itemSelection_SetLanguage(language);
-	}
 
 	textPalette->textPal->showLanguage(language);
 }
@@ -7520,9 +7518,9 @@
 void ScribusMainWindow::ManageJava()
 {
 	JavaDocs *dia = new JavaDocs(this, doc, view);
-	connect(dia, SIGNAL(docChanged(bool)), this, SLOT(slotDocCh(bool )));
+	connect(dia, SIGNAL(docChanged(bool)), this, SLOT(slotDocCh(bool)));
 	dia->exec();
-	disconnect(dia, SIGNAL(docChanged(bool)), this, SLOT(slotDocCh(bool )));
+	disconnect(dia, SIGNAL(docChanged(bool)), this, SLOT(slotDocCh(bool)));
 	delete dia;
 }
 
@@ -7532,7 +7530,7 @@
 		editSymbolStart(doc->m_Selection->itemAt(0)->pattern());
 }
 
-void ScribusMainWindow::editSymbolStart(QString temp)
+void ScribusMainWindow::editSymbolStart(const QString& temp)
 {
 	if (!HaveDoc || !doc->docPatterns.contains(temp))
 		return;
@@ -7819,7 +7817,7 @@
 	guidePalette->setupPage(false);
 }
 
-void ScribusMainWindow::Apply_MasterPage(QString pageName, int pageNumber, bool reb)
+void ScribusMainWindow::Apply_MasterPage(const QString& pageName, int pageNumber, bool reb)
 {
 	if (!HaveDoc)
 		return;
@@ -8071,7 +8069,7 @@
 	PicStatus *dia = new PicStatus(this, doc);
 	connect(dia, SIGNAL(selectPage(int)), this, SLOT(selectPagesFromOutlines(int)));
 	connect(dia, SIGNAL(selectMasterPage(QString)), this, SLOT(editMasterPagesStart(QString)));
-	connect(dia, SIGNAL(selectElementByItem(PageItem *, bool, int )), this, SLOT(selectItemsFromOutlines(PageItem *, bool, int)));
+	connect(dia, SIGNAL(selectElementByItem(PageItem*,bool,int)), this, SLOT(selectItemsFromOutlines(PageItem*,bool,int)));
 	dia->exec();
 	delete dia;
 }
@@ -8134,7 +8132,7 @@
 
 
 
-void ScribusMainWindow::recalcColors(QProgressBar *dia)
+void ScribusMainWindow::recalcColors()
 {
 	if (!HaveDoc)
 		return;
@@ -8467,7 +8465,7 @@
 		fileName = QDir::cleanPath(path + "/" + base + QString("_emergency_%1.sla").arg(dat.toString("dd_MM_yyyy_hh_mm")));
 		std::cout << "Saving: " << fileName.toStdString() << std::endl;
 		FileLoader fl(fileName);
-		fl.saveFile(fileName, doc, 0);
+		fl.saveFile(fileName, doc, nullptr);
 		view->close();
 		int numPages=doc->Pages->count();
 		for (int j=0; j<numPages; ++j)
@@ -9350,11 +9348,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, this, 0);
+				s_doc->setGUI(false, this, nullptr);
 				s_doc->PageColors = dia->m_colorList;
 				s_doc->setGradients(dia->dialogGradients);
 				s_doc->setPatterns(dia->dialogPatterns);
-				fmt->setupTargets(s_doc, 0, this, mainWindowProgressBar, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
+				fmt->setupTargets(s_doc, nullptr, this, mainWindowProgressBar, &(PrefsManager::instance()->appPrefs.fontPrefs.AvailFonts));
 				fmt->savePalette(Cpfad);
 				delete s_doc;
 			}

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sun May 27 18:15:32 2018
@@ -156,8 +156,8 @@
 	void requestUpdate(int);
 	void setTBvals(PageItem *currItem);
 	int ShowSubs();
-	void applyNewMaster(QString name);
-	void updateRecent(QString fn);
+	void applyNewMaster(const QString& name);
+	void updateRecent(const QString& fn);
 	void doPasteRecent(QString data);
 	bool getPDFDriver(const QString & filename, const QString & name, int components, const std::vector<int> & pageNumbers, const QMap<int, QImage> & thumbs, QString& error, bool* cancelled = nullptr);
 	bool DoSaveAsEps(QString fn, QString& error);
@@ -166,7 +166,7 @@
 	/*! \brief Recalculate the colors after changing CMS settings.
 	Call the appropriate document function and then update the GUI elements.
 	\param dia optional progress widget */
-	void recalcColors(QProgressBar *dia = 0);
+	void recalcColors();
 	void SwitchWin();
 	void RestoreBookMarks();
 	QStringList  scrapbookNames();
@@ -310,7 +310,7 @@
 	void setCurrentPage(int p);
 	void ManageJava();
 	void editSelectedSymbolStart();
-	void editSymbolStart(QString temp);
+	void editSymbolStart(const QString& temp);
 	void editSymbolEnd();
 	void editInlineStart(int id);
 	void editInlineEnd();
@@ -332,18 +332,18 @@
 	*/
 	void slotFileAppend();
 
-	void removeRecent(QString fn, bool fromFileWatcher = false);
-	void removeRecentFromWatcher(QString filename);
-	void loadRecent(QString filename);
+	void removeRecent(const QString& fn, bool fromFileWatcher = false);
+	void removeRecentFromWatcher(const QString& filename);
+	void loadRecent(const QString& filename);
 	void rebuildRecentFileMenu();
 	void rebuildRecentPasteMenu();
 	void rebuildScrapbookMenu();
-	void pasteRecent(QString fn);
-	void pasteFromScrapbook(QString fn);
+	void pasteRecent(const QString& fn);
+	void pasteFromScrapbook(const QString& fn);
 	void importVectorFile();
 	void rebuildLayersList();
 	bool slotFileOpen();
-	bool loadDoc(QString);
+	bool loadDoc(const QString& );
 	/**
 	 * @brief Do post loading functions
 	 */
@@ -398,7 +398,7 @@
 	void ToggleTips();
 	void ToggleMouseTips();
 	/** \brief Erzeugt eine neue Seite */
-	void slotNewPageP(int wo, QString templ);
+	void slotNewPageP(int wo, const QString& templ);
 	void slotNewPageM();
 	void slotNewMasterPage(int w, const QString &);
 	void slotNewPage(int w, const QString& masterPageName=QString::null, bool mov = true);
@@ -462,7 +462,7 @@
 	void SetNewFont(const QString& nf);
 	/** Setz die Zeichensatzgroesse */
 	void setItemFontSize(int fontSize);
-	void setItemLanguage(QString language);
+	void setItemLanguage(const QString& language);
 	/** Color Replacement */
 	void slotReplaceColors();
 	/** Style Manager */
@@ -507,7 +507,7 @@
 	 * @todo Make this work with real page numbers, negative numbers and document sections when they are implemented
 	*/
 	void ApplyMasterPage();
-	void Apply_MasterPage(QString pageName, int pageNumber, bool reb = true);
+	void Apply_MasterPage(const QString& pageName, int pageNumber, bool reb = true);
 	void GroupObj(bool showLockDia = true);
 	void UnGroupObj();
 	void AdjustGroupObj();
@@ -638,7 +638,7 @@
 	bool m_objectSpecificUndo;
 
 	//CB: #8212: add overrideMasterPageSizing, however default to true for compatibility with other calls.. for now
-	void addNewPages(int wo, int where, int numPages, double height, double width, int orient, QString siz, bool mov, QStringList* basedOn = 0, bool overrideMasterPageSizing=true);
+	void addNewPages(int wo, int where, int numPages, double height, double width, int orient, const QString& siz, bool mov, QStringList* basedOn = 0, bool overrideMasterPageSizing=true);
 
 	int m_DocNr;
 	bool m_PrinterUsed;

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Sun May 27 18:15:32 2018
@@ -1133,7 +1133,7 @@
 		HasCMS = false;
 		if (oldCM)
 		{
-			m_ScMW->recalcColors(m_ScMW->mainWindowProgressBar);
+			m_ScMW->recalcColors();
 			RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, m_ScMW->mainWindowProgressBar);
 		}
 	}
@@ -1146,7 +1146,7 @@
 		m_docPrefsData.pdfPrefs.PrintProf = m_docPrefsData.colorPrefs.DCMSset.DefaultPrinterProfile;
 		m_docPrefsData.pdfPrefs.Intent  = m_docPrefsData.colorPrefs.DCMSset.DefaultIntentColors;
 		m_docPrefsData.pdfPrefs.Intent2 = m_docPrefsData.colorPrefs.DCMSset.DefaultIntentImages;
-		m_ScMW->recalcColors(m_ScMW->mainWindowProgressBar);
+		m_ScMW->recalcColors();
 		RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, m_ScMW->mainWindowProgressBar);
 	}
 	else
@@ -3360,7 +3360,7 @@
 }
 
 
-bool ScribusDoc::setLayerMarker(const int layerID, QColor color)
+bool ScribusDoc::setLayerMarker(const int layerID, const QColor& color)
 {
 	bool found = false;
 	auto itend = Layers.end();
@@ -7182,7 +7182,7 @@
 	ScPage* lastDest = nullptr;
 	setCurrentPage(from);
 
-	uint oldItems = Items->count();
+	int oldItems = Items->count();
 	QList<QString> itemBuffer;
 	Selection tempSelection(this, false);
 	m_Selection->clear();
@@ -7458,12 +7458,12 @@
 
 
 
-void ScribusDoc::insertColor(QString nam, double c, double m, double y, double k)
-{
-	if (PageColors.contains(nam))
+void ScribusDoc::insertColor(const QString& name, double c, double m, double y, double k)
+{
+	if (PageColors.contains(name))
 		return;
 	ScColor tmp = ScColor(static_cast<int>(255 * c), static_cast<int>(255 * m), static_cast<int>(255 * y), static_cast<int>(255 * k));
-	PageColors.insert(nam, tmp);
+	PageColors.insert(name, tmp);
 }
 
 struct objOrdHelper
@@ -8979,7 +8979,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 
@@ -9023,7 +9023,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 
@@ -9067,7 +9067,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	UndoTransaction activeTransaction;
@@ -9120,7 +9120,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	UndoTransaction activeTransaction;
@@ -9212,7 +9212,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	for (uint aa = 0; aa < selectedItemCount; ++aa)
@@ -9281,7 +9281,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	itemSelection_ClearBulNumStrings(itemSelection);
@@ -9370,7 +9370,7 @@
 void ScribusDoc::itemSelection_ApplyCharStyle(const CharStyle & newStyle, Selection* customSelection, QString ETEA)
 {
 	Selection* itemSelection = (customSelection != 0) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 	uint selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -9509,7 +9509,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	UndoTransaction activeTransaction;
@@ -9589,7 +9589,7 @@
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	assert(itemSelection != nullptr);
-	uint selectedItemCount=itemSelection->count();
+	int selectedItemCount=itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	UndoTransaction activeTransaction;
@@ -9894,20 +9894,20 @@
 }
 
 //CB Same as RecalcPicturesRes apart from the name checking, which should be able to be removed
-void ScribusDoc::updatePict(QString name)
+void ScribusDoc::updatePict(const QString& name)
 {
 	bool updated=false;
 	QList<PageItem*> allItems;
-	for (int a = 0; a < DocItems.count(); ++a)
-	{
-		PageItem *currItem = DocItems.at(a);
+	for (int i = 0; i < DocItems.count(); ++i)
+	{
+		PageItem *currItem = DocItems.at(i);
 		if (currItem->isGroup())
 			allItems = currItem->getAllChildren();
 		else
 			allItems.append(currItem);
-		for (int ii = 0; ii < allItems.count(); ii++)
-		{
-			currItem = allItems.at(ii);
+		for (int j = 0; j < allItems.count(); j++)
+		{
+			currItem = allItems.at(j);
 			if ((!currItem->imageIsAvailable) || (currItem->Pfile != name))
 				continue;
 			bool fho = currItem->imageFlippedH();
@@ -9923,16 +9923,16 @@
 		}
 		allItems.clear();
 	}
-	for (int a = 0; a < MasterItems.count(); ++a)
-	{
-		PageItem *currItem = MasterItems.at(a);
+	for (int i = 0; i < MasterItems.count(); ++i)
+	{
+		PageItem *currItem = MasterItems.at(i);
 		if (currItem->isGroup())
 			allItems = currItem->getAllChildren();
 		else
 			allItems.append(currItem);
-		for (int ii = 0; ii < allItems.count(); ii++)
-		{
-			currItem = allItems.at(ii);
+		for (int j = 0; j < allItems.count(); j++)
+		{
+			currItem = allItems.at(j);
 			if ((!currItem->imageIsAvailable) || (currItem->Pfile != name))
 				continue;
 			bool fho = currItem->imageFlippedH();
@@ -9955,9 +9955,9 @@
 			allItems = currItem->getAllChildren();
 		else
 			allItems.append(currItem);
-		for (int ii = 0; ii < allItems.count(); ii++)
-		{
-			currItem = allItems.at(ii);
+		for (int j = 0; j < allItems.count(); j++)
+		{
+			currItem = allItems.at(j);
 			if ((!currItem->imageIsAvailable) || (currItem->Pfile != name))
 				continue;
 			bool fho = currItem->imageFlippedH();
@@ -9974,21 +9974,21 @@
 		allItems.clear();
 	}
 	QStringList patterns = docPatterns.keys();
-	for (int c = 0; c < patterns.count(); ++c)
-	{
-		ScPattern pa = docPatterns[patterns[c]];
+	for (int i = 0; i < patterns.count(); ++i)
+	{
+		ScPattern pa = docPatterns[patterns[i]];
 		if (pa.items.count() <= 0)
 			continue;
-		for (int o = 0; o < pa.items.count(); o++)
-		{
-			PageItem *currItem = pa.items.at(o);
+		for (int j = 0; j < pa.items.count(); j++)
+		{
+			PageItem *currItem = pa.items.at(j);
 			if (currItem->isGroup())
 				allItems = currItem->getAllChildren();
 			else
 				allItems.append(currItem);
-			for (int ii = 0; ii < allItems.count(); ii++)
-			{
-				currItem = allItems.at(ii);
+			for (int k = 0; k < allItems.count(); k++)
+			{
+				currItem = allItems.at(k);
 				if ((!currItem->imageIsAvailable) || (currItem->Pfile != name))
 					continue;
 				bool fho = currItem->imageFlippedH();
@@ -10015,7 +10015,7 @@
 		miny = qMin(miny, y1);
 		maxx = qMax(maxx, x2);
 		maxy = qMax(maxy, y2);
-		docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
+		docPatterns[patterns[i]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
 	}
 	if (updated)
 	{
@@ -10024,7 +10024,7 @@
 	}
 }
 
-void ScribusDoc::updatePictDir(QString name)
+void ScribusDoc::updatePictDir(const QString& name)
 {
 	bool updated=false;
 	QList<PageItem*> allItems;
@@ -10410,7 +10410,7 @@
 }
 
 
-void ScribusDoc::removePict(QString name)
+void ScribusDoc::removePict(const QString& name)
 {
 	bool updated=false;
 	QList<PageItem*> allItems;
@@ -11371,7 +11371,7 @@
 void ScribusDoc::itemSelection_ClearItem(Selection* customSelection, bool useWarning)
 {
 	Selection* itemSelection = (customSelection != 0) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount <= 0)
@@ -11402,7 +11402,7 @@
 void ScribusDoc::itemSelection_TruncateItem(Selection* customSelection)
 {
 	Selection* itemSelection = (customSelection != 0) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount <= 0)
@@ -12000,7 +12000,7 @@
 void ScribusDoc::itemSelection_SetImageRotation(double rot, Selection* customSelection)
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -13705,7 +13705,7 @@
 	}
 	if (activeTransaction)
 	{
-		activeTransaction.commit("", 0, "", tooltip, 0);
+		activeTransaction.commit("", nullptr, "", tooltip, nullptr);
 	}
 	DoDrawing = true;
 	view()->updatesOn(true);
@@ -13744,7 +13744,7 @@
 void ScribusDoc::itemSelection_ApplyArrowHead(int startArrowID, int endArrowID, Selection* customSelection)
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -13789,7 +13789,7 @@
 void ScribusDoc::itemSelection_ApplyArrowScale(int startArrowSc, int endArrowSc, Selection* customSelection)
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
-	assert(itemSelection != 0);
+	assert(itemSelection != nullptr);
 	int selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
@@ -14579,7 +14579,7 @@
 	rotateGroup(angle, rotationPoint, itemSelection);
 }
 
-void ScribusDoc::rotateGroup(double angle, FPoint RCenter, Selection* customSelection)
+void ScribusDoc::rotateGroup(double angle, const FPoint& RCenter, Selection* customSelection)
 {
 	Selection* itemSelection = (customSelection!=nullptr) ? customSelection : m_Selection;
 	Q_ASSERT(itemSelection != nullptr);
@@ -16132,7 +16132,7 @@
 			}
 			if (updCol)
 			{
-				m_ScMW->recalcColors(m_ScMW->mainWindowProgressBar);
+				m_ScMW->recalcColors();
 				RecalcPictures(&ScCore->InputProfiles, &ScCore->InputProfilesCMYK, m_ScMW->mainWindowProgressBar);
 			}
 			m_ScMW->mainWindowProgressBar->setValue(cc);

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Sun May 27 18:15:32 2018
@@ -415,7 +415,7 @@
 	 * @param color color of the marker
 	 * @return Success or failure
 	 */
-	bool setLayerMarker(const int layerID, QColor color);
+	bool setLayerMarker(const int layerID, const QColor& color);
 	/**
 	 * @brief returns the layer marker color
 	 * @param layerID ID of the layer
@@ -1011,7 +1011,7 @@
 	 * @param y Yellow component
 	 * @param k Black component
 	 */
-	void insertColor(QString nam, double c, double m, double y, double k);
+	void insertColor(const QString& name, double c, double m, double y, double k);
 	
 	QMap<QString, double>& constants() { return m_constants; }
 	/**
@@ -1175,7 +1175,7 @@
 	void adjustItemSize(PageItem *currItem, bool includeGroup = false, bool moveInGroup = true);
 	void moveGroup(double x, double y, Selection* customSelection = nullptr);
 	void rotateGroup(double angle, Selection* customSelection = nullptr);
-	void rotateGroup(double angle, FPoint RCenter, Selection* customSelection = nullptr);
+	void rotateGroup(double angle, const FPoint& RCenter, Selection* customSelection = nullptr);
 	void scaleGroup(double scx, double scy, bool scaleText=true, Selection* customSelection = nullptr, bool scaleLine = false);
 	//! \brief Get a list of frames of certain type
 	QHash<PageItem*, QString> getDocItemNames(PageItem::ItemType itemType);
@@ -1670,9 +1670,9 @@
 	void undoRedoDone();
 
 	void updatePic();
-	void updatePict(QString name);
-	void updatePictDir(QString name);
-	void removePict(QString name);
+	void updatePict(const QString& name);
+	void updatePictDir(const QString& name);
+	void removePict(const QString& name);
 
 // Marks and notes
 public:

Modified: trunk/Scribus/scribus/ui/cupsoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/ui/cupsoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cupsoptions.cpp	(original)
+++ trunk/Scribus/scribus/ui/cupsoptions.cpp	Sun May 27 18:15:32 2018
@@ -48,7 +48,7 @@
 #endif
 #include "iconmanager.h"
 
-CupsOptions::CupsOptions(QWidget* parent, QString Geraet) : QDialog( parent )
+CupsOptions::CupsOptions(QWidget* parent, const QString& device) : QDialog( parent )
 {
 	FlagsOpt.clear();
 	setModal(true);
@@ -76,11 +76,11 @@
 	cups_dest_t *dests;
 	cups_dest_t *dest;
 	int num_dests;
-	const char	*filename;	/* PPD filename */
-	ppd_file_t	*ppd;				/* PPD data */
-	ppd_group_t	*group;			/* Current group */
+	const char *filename;	/* PPD filename */
+	ppd_file_t *ppd = nullptr;				/* PPD data */
+	ppd_group_t *group = nullptr;			/* Current group */
 	num_dests = cupsGetDests(&dests);
-	dest = cupsGetDest(Geraet.toLocal8Bit().constData(), nullptr, num_dests, dests);
+	dest = cupsGetDest(device.toLocal8Bit().constData(), nullptr, num_dests, dests);
 	if (!(dest == nullptr || (filename = cupsGetPPD(dest->name)) == nullptr || (ppd = ppdOpenFile(filename)) == nullptr))
 	{
 		ppdMarkDefaults(ppd);
@@ -100,8 +100,7 @@
 				Marked = "";
 				struct OpData Daten;
 				opts.clear();
-				for (j = option->num_choices, choice = option->choices;
-						j > 0; j --, ++choice)
+				for (j = option->num_choices, choice = option->choices; j > 0; j --, ++choice)
 				{
 					opts.append(QString(choice->choice));
 					if (choice->marked)

Modified: trunk/Scribus/scribus/ui/cupsoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/ui/cupsoptions.h
==============================================================================
--- trunk/Scribus/scribus/ui/cupsoptions.h	(original)
+++ trunk/Scribus/scribus/ui/cupsoptions.h	Sun May 27 18:15:32 2018
@@ -46,7 +46,7 @@
     Q_OBJECT
 
 public: 
-	CupsOptions(QWidget* parent, QString Geraet);
+	CupsOptions(QWidget* parent, const QString& device);
 	~CupsOptions();
 	QPushButton* PushButton1;
 	QPushButton* PushButton2;

Modified: trunk/Scribus/scribus/ui/query.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/ui/query.h
==============================================================================
--- trunk/Scribus/scribus/ui/query.h	(original)
+++ trunk/Scribus/scribus/ui/query.h	Sun May 27 18:15:32 2018
@@ -23,7 +23,7 @@
 	Q_OBJECT
 
 public:
-	Query( QWidget* parent=0, const char* name=0, bool modal = false, QString text=0, QString titel=0 );
+	Query( QWidget* parent=0, const char* name=nullptr, bool modal = false, QString text=0, QString titel=0 );
 	~Query() {};
 
 	const QString getEditText();

Modified: trunk/Scribus/scribus/vgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22561&path=/trunk/Scribus/scribus/vgradient.h
==============================================================================
--- trunk/Scribus/scribus/vgradient.h	(original)
+++ trunk/Scribus/scribus/vgradient.h	Sun May 27 18:15:32 2018
@@ -36,7 +36,7 @@
 class SCRIBUS_API VColorStop
 {
 public:
-	VColorStop( double r, double m, QColor c, double o, QString n, int s )
+	VColorStop( double r, double m, const QColor& c, double o, const QString& n, int s )
 	{
 		rampPoint = r;
 		midPoint = m; 
@@ -44,7 +44,7 @@
 		opacity = o; 
 		name = n;
 		shade = s;
-	};
+	}
 	
 	VColorStop( const VColorStop& colorStop )
 	{
@@ -54,7 +54,7 @@
 		opacity = colorStop.opacity;
 		name = colorStop.name;
 		shade = colorStop.shade;
-	};
+	}
 
 	QColor color;
 
@@ -68,7 +68,7 @@
 	int shade;
 	QString name;
 	friend inline bool operator== ( VColorStop& s1, VColorStop& s2 )
-	{ return s1.rampPoint == s2.rampPoint; };
+	{ return s1.rampPoint == s2.rampPoint; }
 }
 ; // VColorStop
 
@@ -118,11 +118,11 @@
 	void removeStop( VColorStop& colorStop );
 	void removeStop( uint n );
 	void clearStops();
-	uint Stops()  const { return m_colorStops.count(); }
+	int Stops()  const { return m_colorStops.count(); }
 
 	// This function let only one stop with offset value equal to 0 and 1.0
 	// by removing the firsts with 0.0 value and the lasts with 1.0 value;
-	void filterStops(void);
+	void filterStops();
 
 	FPoint origin() const { return m_origin; }
 	void setOrigin( const FPoint &origin ) { m_origin = origin; }




More information about the scribus-commit mailing list