r22289 by craig -

scribus-commit scribus-commit at lists.scribus.net
Thu Dec 28 22:56:36 UTC 2017


Author: craig
Date: Thu Dec 28 22:56:36 2017
New Revision: 22289

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22289
Log:
Apply some coverity and clazy fixes

Modified:
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/hyphenator.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/short-words/configuration.cpp
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/schelptreemodel.cpp
    trunk/Scribus/scribus/scpainterex_ps2.cpp
    trunk/Scribus/scribus/scraction.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/ui/gradientpreview.cpp
    trunk/Scribus/scribus/ui/latexeditor.h
    trunk/Scribus/scribus/urllauncher.cpp
    trunk/Scribus/scribus/urllauncher.h
    trunk/Scribus/scribus/util.cpp

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Thu Dec 28 22:56:36 2017
@@ -199,6 +199,7 @@
 	ui/tablecolumnwidthsdialog.ui
 	ui/tablerowheightsdialog.ui
 	ui/tabpdfoptions.ui
+	ui/test_xyzbase.ui
 	ui/transformdialogbase.ui
 	ui/transparencypalette.ui
 	ui/copypagetomasterpage.ui
@@ -544,6 +545,7 @@
 	ui/tabmanager.h
 	ui/tabpdfoptions.h
 	ui/tabruler.h
+	ui/test_xyz.h
 	ui/textpalette.h
 	ui/transformdialog.h
 	ui/transparencypalette.h
@@ -1023,6 +1025,7 @@
 	ui/tabmanager.cpp
 	ui/tabpdfoptions.cpp
 	ui/tabruler.cpp
+	ui/test_xyz.cpp
 	ui/textpalette.cpp
 	ui/transformdialog.cpp
 	ui/transparencypalette.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp	(original)
+++ trunk/Scribus/scribus/actionmanager.cpp	Thu Dec 28 22:56:36 2017
@@ -1022,10 +1022,10 @@
 	connect( (*scrActions)["helpManual"], SIGNAL(triggered()), mainWindow, SLOT(slotOnlineHelp()) );
 	connect( (*scrActions)["helpCheckUpdates"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpCheckUpdates()) );
 	UrlLauncher* ul=UrlLauncher::instance();
-	connect( (*scrActions)["helpOnlineWWW"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(const QString)) );
-	connect( (*scrActions)["helpOnlineDocs"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(const QString)) );
-	connect( (*scrActions)["helpOnlineWiki"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(const QString)) );
-	connect( (*scrActions)["helpOnlineTutorial1"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(const QString)) );
+	connect( (*scrActions)["helpOnlineWWW"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(QString)) );
+	connect( (*scrActions)["helpOnlineDocs"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(QString)) );
+	connect( (*scrActions)["helpOnlineWiki"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(QString)) );
+	connect( (*scrActions)["helpOnlineTutorial1"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(QString)) );
 	connect( (*scrActions)["helpChat"], SIGNAL(triggeredData(QString)), ul, SLOT(launchUrlExt(const QString)) );
 }
 
@@ -1202,13 +1202,13 @@
 void ActionManager::disconnectModeActions()
 {
 	for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
-		disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
+		disconnect( (*scrActions)[*it], SIGNAL(toggledData(bool,int)) , mainWindow, SLOT(setAppModeByToggle(bool,int)) );
 }
 
 void ActionManager::connectModeActions()
 {
 	for ( QStringList::Iterator it = modeActionNames->begin(); it != modeActionNames->end(); ++it )
-		connect( (*scrActions)[*it], SIGNAL(toggledData(bool, int)) , mainWindow, SLOT(setAppModeByToggle(bool, int)) );
+		connect( (*scrActions)[*it], SIGNAL(toggledData(bool,int)) , mainWindow, SLOT(setAppModeByToggle(bool,int)) );
 }
 
 void ActionManager::disconnectNewDocActions()

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Thu Dec 28 22:56:36 2017
@@ -248,7 +248,7 @@
 	PageItem *currItem;
 	QPoint np, np2, mop;
 	QPainter p;
-	QRect tx;
+//	QRect tx;
 	m->accept();
 //	qDebug() << "legacy mode move:" << m->x() << m->y() << m_canvas->globalToCanvas(m->globalPos()).x() << m_canvas->globalToCanvas(m->globalPos()).y();
 //	emit MousePos(m->x()/m_canvas->scale(),// + m_doc->minCanvasCoordinate.x(), 
@@ -352,7 +352,7 @@
 //	oldClip = 0;
 	m->accept();
 	m_view->registerMousePress(m->globalPos());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 //	mpo.moveBy(qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 	canvasPressCoord = mousePointDoc;
 	createObjectMode = m_doc->appMode;
@@ -449,7 +449,7 @@
 	m_MouseButtonPressed = true;
 	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	canvasPressCoord     = mousePointDoc;
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 //	mpo.moveBy(qRound(Doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 	m_doc->nodeEdit.deselect();
 	m_view->Deselect(false);

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Thu Dec 28 22:56:36 2017
@@ -229,7 +229,7 @@
 	PageItem *currItem;
 	QPoint np, np2, mop;
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	m->accept();
 	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
 //	qDebug() << "legacy mode move:" << m->x() << m->y() << m_canvas->globalToCanvas(m->globalPos()).x() << m_canvas->globalToCanvas(m->globalPos()).y();
@@ -307,7 +307,7 @@
 	PageItem *currItem;
 //	m_canvas->PaintSizeRect(QRect());
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	QTransform pm;
 	m_MouseButtonPressed = true;
 	m_view->HaveSelRect = false;
@@ -320,7 +320,7 @@
 	m_view->registerMousePress(m->globalPos());
 	Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 //	mpo.moveBy(qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 	Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
 	Rxpd = Mxp - Rxp;
@@ -503,7 +503,7 @@
 	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
 	Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 //	mpo.moveBy(qRound(Doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 	m_doc->nodeEdit.deselect();
 	m_view->Deselect(false);

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Thu Dec 28 22:56:36 2017
@@ -42,9 +42,6 @@
 #include "util_math.h"
 
 
-
-
-
 CalligraphicMode::CalligraphicMode(ScribusView* view) : CanvasMode(view) 
 {
 	Mxp = Myp = -1;
@@ -54,7 +51,7 @@
 }
 
 
-void CalligraphicMode::drawControls(QPainter* p) 
+void CalligraphicMode::drawControls(QPainter* /*p*/)
 {
 	//
 }
@@ -109,7 +106,7 @@
 	PageItem *currItem;
 	QPoint np, np2, mop;
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	m->accept();
 	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
 
@@ -191,7 +188,7 @@
 	double Rxp = 0;
 	double Ryp = 0;
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	QTransform pm;
 	m_MouseButtonPressed = true;
 	m_view->HaveSelRect = false;
@@ -201,7 +198,7 @@
 	m_view->registerMousePress(m->globalPos());
 	Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 	Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
 	Mxp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
@@ -338,7 +335,7 @@
 	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
 	Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 	m_doc->nodeEdit.deselect();
 	m_view->Deselect(false);
 	if (!m_doc->masterPageMode())

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Thu Dec 28 22:56:36 2017
@@ -103,7 +103,7 @@
 	PageItem *currItem;
 	QPoint np, np2, mop;
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	m->accept();
 	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
 	if (commonMouseMove(m))
@@ -176,7 +176,7 @@
 	double Rxp = 0;
 	double Ryp = 0;
 	FPoint npf, npf2;
-	QRect tx;
+//	QRect tx;
 	QTransform pm;
 	m_MouseButtonPressed = true;
 	m_view->HaveSelRect = false;
@@ -187,7 +187,7 @@
 	m_view->registerMousePress(m->globalPos());
 	Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 	Rxp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).x();
 	Mxp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(Mxp, Myp)).y();
@@ -325,7 +325,7 @@
 	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
 	Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 	m_doc->nodeEdit.deselect();
 	m_view->Deselect(false);
 	if (!m_doc->masterPageMode())

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp	Thu Dec 28 22:56:36 2017
@@ -70,7 +70,7 @@
 	frameResizeHandle = -1;
 	m_blinker = new QTimer(view);	
 	connect(m_blinker, SIGNAL(timeout()), this, SLOT(blinkTextCursor()));
-	connect(view->horizRuler, SIGNAL(MarkerMoved(double, double)), this, SLOT(rulerPreview(double, double)));
+	connect(view->horizRuler, SIGNAL(MarkerMoved(double,double)), this, SLOT(rulerPreview(double,double)));
 	mRulerGuide = -1;
 	m_cursorVisible = false;
 	m_longCursorTime = false;

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp	Thu Dec 28 22:56:36 2017
@@ -185,7 +185,7 @@
 		m_view->update();
 	}
 	connect(m_view, SIGNAL(changeUN(int)), vectorDialog, SLOT(unitChange(int)), Qt::UniqueConnection);
-	connect(vectorDialog, SIGNAL(NewVectors(double, double, double, double)), this, SLOT(applyValues(double, double, double, double)));
+	connect(vectorDialog, SIGNAL(NewVectors(double,double,double,double)), this, SLOT(applyValues(double,double,double,double)));
 	connect(vectorDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
 	connect(vectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
 	connect(m_doc, SIGNAL(docChanged()), this, SLOT(updateFromItem()));

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Thu Dec 28 22:56:36 2017
@@ -836,7 +836,7 @@
 	m_doc->leaveDrag = false;
 	m->accept();
 	m_view->registerMousePress(m->globalPos());
-	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 //	mpo.moveBy(qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()), qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 
 	if (m->button() == Qt::MidButton)
@@ -1582,7 +1582,7 @@
 	double grabRadius = m_doc->guidesPrefs().grabRadius / m_canvas->scale();
 	int MxpS = static_cast<int>(mousePointDoc.x()); //m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
 	int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-	QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
+//	QRectF mpo(m_mouseCurrentPoint.x()-grabRadius, m_mouseCurrentPoint.y()-grabRadius, grabRadius*2, grabRadius*2);
 	m_doc->nodeEdit.deselect();
 
 	if (m_doc->guidesPrefs().renderStackOrder.indexOf(3) > m_doc->guidesPrefs().renderStackOrder.indexOf(4)) // guides are on foreground and want to be processed first

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Thu Dec 28 22:56:36 2017
@@ -204,7 +204,7 @@
 	double Rxp = 0,  Ryp = 0;
 	PageItem *currItem;
 	m_canvas->PaintSizeRect(QRect());
-	QRect tx;
+//	QRect tx;
 	QTransform pm;
 	m_canvas->m_viewMode.m_MouseButtonPressed = true;
 	m_canvas->m_viewMode.operItemMoving = false;

Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp	(original)
+++ trunk/Scribus/scribus/hyphenator.cpp	Thu Dec 28 22:56:36 2017
@@ -205,7 +205,7 @@
 					if(buffer[i] & 1)
 						outs += "-";
 				}
-				outs += word.right(1);
+				outs += word.rightRef(1);
 				input = outs;
 				if (!ignoredWords.contains(word))
 				{

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Thu Dec 28 22:56:36 2017
@@ -146,7 +146,7 @@
 		}
 		if ((((docItem->lineColor() != CommonStrings::None) || (!docItem->patternStrokeVal.isEmpty()) || (docItem->GrTypeStroke > 0)) && (docItem->lineWidth() > 1)) || (!docItem->NamedLStyle.isEmpty()))
 		{
-			QVector<double> m_array;
+//			QVector<double> m_array;
 			QPainterPath ppa;
 			QPainterPath result;
 			if (docItem->itemType() == PageItem::PolyLine)
@@ -1282,8 +1282,7 @@
 		if (style.keepTogether())
 			need = incompleteLines;
 		int pull = 0;
-		if (style.keepTogether() || (incompleteLines < need))
-			pull = incompleteLines;
+		if (style.keepTogether() || (incompleteLines < need)) pull = incompleteLines;
 		// if we need to keep it with the next one, pull one line. Next frame layouting
 		// will pull more from us if it proves necessary.
 		if (keepWithNext && (!pull))

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Thu Dec 28 22:56:36 2017
@@ -3848,7 +3848,7 @@
 {
 	PageItem* ite;
 	QByteArray content, output;
-	QList<PageItem*> PItems;
+//	QList<PageItem*> PItems;
 
 	if (pag->MPageNam.isEmpty())
 		return true;

Modified: trunk/Scribus/scribus/plugins/short-words/configuration.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/configuration.cpp	(original)
+++ trunk/Scribus/scribus/plugins/short-words/configuration.cpp	Thu Dec 28 22:56:36 2017
@@ -102,7 +102,7 @@
 
 	QTextStream t(&f);
 	QStringList nations;
-	QString aRow, code, lang;
+	QString aRow, code;
 	while (!t.atEnd())
 	{
 		aRow = t.readLine();

Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Thu Dec 28 22:56:36 2017
@@ -1513,7 +1513,7 @@
 		pagemult = spots.count();
 	else
 		pagemult = 1;
-	QVector<double> dum;
+//	QVector<double> dum;
 	double gx = 0.0;
 	double gy = 0.0;
 	double gw = 0.0;

Modified: trunk/Scribus/scribus/schelptreemodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/schelptreemodel.cpp
==============================================================================
--- trunk/Scribus/scribus/schelptreemodel.cpp	(original)
+++ trunk/Scribus/scribus/schelptreemodel.cpp	Thu Dec 28 22:56:36 2017
@@ -215,7 +215,7 @@
 void ScHelpTreeModel::addRow(const QString& s1, const QString& s2, int i)
 {
 	QList<TreeItem*> parents;
-	QList<int> indentations;
+//	QList<int> indentations;
 	parents << m_rootItem;
 	if (parents.last()->childCount() > 0) 
 		parents << parents.last()->child(parents.last()->childCount()-1);

Modified: trunk/Scribus/scribus/scpainterex_ps2.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/scpainterex_ps2.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainterex_ps2.cpp	(original)
+++ trunk/Scribus/scribus/scpainterex_ps2.cpp	Thu Dec 28 22:56:36 2017
@@ -963,7 +963,7 @@
 
 void ScPainterEx_Ps2::drawGradient( VGradientEx& gradient )
 {
-	QRect clipPathRect;
+//	QRect clipPathRect;
 	save();
 	//setClipPath();
 	m_stream << "clip\n";

Modified: trunk/Scribus/scribus/scraction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/scraction.h
==============================================================================
--- trunk/Scribus/scribus/scraction.h	(original)
+++ trunk/Scribus/scribus/scraction.h	Thu Dec 28 22:56:36 2017
@@ -202,7 +202,7 @@
 		\param index The saved index within the QPopupMenu
 		\param menu The menu we are adding this action to
 	*/
-	void addedTo( int index, QMenu * menu );
+	void addedTo(int index, QMenu* menu);
 				
 private slots:
 	/*!

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Thu Dec 28 22:56:36 2017
@@ -1608,7 +1608,7 @@
 
 	if ( e->type() == QEvent::KeyPress )
 	{
-		QKeyEvent *k = (QKeyEvent *)e;
+		QKeyEvent *k = dynamic_cast<QKeyEvent *>(e);
 		int keyMod=0;
 		if (k->modifiers() & Qt::ShiftModifier)
 			keyMod |= Qt::SHIFT;
@@ -3925,7 +3925,9 @@
 			{
 				m_prefsManager->prefsFile->getContext("dirs")->set("images", fileNames[0].left(fileNames[0].lastIndexOf("/")));
 				view->requestMode(modeImportImage);
-				dynamic_cast<CanvasMode_ImageImport*>(view->canvasMode())->setImageList(fileNames);
+				CanvasMode_ImageImport* cii=dynamic_cast<CanvasMode_ImageImport*>(view->canvasMode());
+				if (cii)
+					cii->setImageList(fileNames);
 			}
 		}
 		else if (currItem->asTextFrame())
@@ -9816,6 +9818,7 @@
 				Mark* masterMark = note->masterMark();
 				doc->setCursor2MarkPos(masterMark);
 			}
+			break;
 		case MARKIndexType:
 			return false;
 			break;
@@ -9834,7 +9837,7 @@
 		MarkData markdata;
 		if (currItem != NULL)
 			markdata.itemName = currItem->itemName();
-		QString label = "", text = "";
+		QString label, text;
 		QString oldStr = mrk->getString();
 		bool newMark = false;
 		bool replaceMark = false;

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Thu Dec 28 22:56:36 2017
@@ -151,7 +151,7 @@
 	void closeEvent(QCloseEvent *ce);
 	void keyPressEvent(QKeyEvent *k);
 	void keyReleaseEvent(QKeyEvent *k);
-	void inputMethodEvent ( QInputMethodEvent * event );
+	void inputMethodEvent (QInputMethodEvent *event);
 	QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const ;
 	void requestUpdate(int);
 	void setTBvals(PageItem *currItem);

Modified: trunk/Scribus/scribus/ui/gradientpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/ui/gradientpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradientpreview.cpp	(original)
+++ trunk/Scribus/scribus/ui/gradientpreview.cpp	Thu Dec 28 22:56:36 2017
@@ -205,7 +205,7 @@
 		else if (m->button() == Qt::RightButton)
 		{
 			Mpressed = false;
-			QList<VColorStop*> cstops = fill_gradient.colorStops();
+//			QList<VColorStop*> cstops = fill_gradient.colorStops();
 			int stop = -1;
 			for (int yg = 0; yg < static_cast<int>(StopM.count()); ++yg)
 			{

Modified: trunk/Scribus/scribus/ui/latexeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/ui/latexeditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/latexeditor.h	(original)
+++ trunk/Scribus/scribus/ui/latexeditor.h	Thu Dec 28 22:56:36 2017
@@ -43,22 +43,22 @@
 {
 	Q_OBJECT
 	public:
-		LatexEditor ( PageItem_LatexFrame * );
+		LatexEditor(PageItem_LatexFrame *);
 		~LatexEditor();
-		virtual void changeEvent ( QEvent *e );
+		virtual void changeEvent(QEvent *e);
 		void startEditor();
 		void exitEditor();
 		void revert();
-		void apply ( bool force=false );
+		void apply(bool force=false);
 		void initialize();
-		static QIcon icon ( QString config, QString fn );
-		static QString iconFile ( QString config );
+		static QIcon icon(QString config, QString fn);
+		static QString iconFile(QString config);
 	protected:
 		PageItem_LatexFrame *frame;
 		LatexHighlighter *highlighter;
 		void loadSettings();
-		void createNewSettingsTab ( I18nXmlStreamReader *xml );
-		void createNewItemsTab ( I18nXmlStreamReader *xml );
+		void createNewSettingsTab(I18nXmlStreamReader *xml);
+		void createNewItemsTab(I18nXmlStreamReader *xml);
 		QMap<QString, XmlWidget *> widgetMap;
 		QString currentConfigFile, currentIconFile;
 		/*External Editor*/
@@ -68,24 +68,24 @@
 		QProcess *extEditor;
 		FileWatcher *fileWatcher;
 	protected slots:
-		void extEditorFinished ( int exitCode, QProcess::ExitStatus exitStatus );
-		void extEditorFileChanged ( QString filename );
-		void extEditorError ( QProcess::ProcessError error );
+		void extEditorFinished(int exitCode, QProcess::ExitStatus exitStatus);
+		void extEditorFileChanged(QString filename);
+		void extEditorError(QProcess::ProcessError error);
 	public slots:
 		void okClicked();
 		void cancelClicked();
-		void updateClicked ( bool );
-		void revertClicked ( bool );
+		void updateClicked(bool);
+		void revertClicked(bool);
 		void dpiChanged();
-		void formulaChanged ( QString, QString );
+		void formulaChanged(QString, QString);
 		void applicationChanged();
 		void latexFinished();
-		void stateChanged ( QProcess::ProcessState );
+		void stateChanged(QProcess::ProcessState);
 		//Slots for the dynamic interface
-		void tagButtonClicked ( QString );
-		void insertButtonClicked ( QObject * );
-		void newItemSelected ( QListWidgetItem *, QListWidgetItem * );
-		void itemDoubleClicked ( QListWidgetItem * );
+		void tagButtonClicked(QString);
+		void insertButtonClicked(QObject *);
+		void newItemSelected(QListWidgetItem *, QListWidgetItem *);
+		void itemDoubleClicked(QListWidgetItem *);
 		void updateConfigFile();
 		void extEditorClicked();
 };
@@ -95,58 +95,59 @@
 {
 	Q_OBJECT
 	public:
-		DataPushButton ( QString caption, QObject *data, bool deleteOnDestroy=false ) :
-				QPushButton ( caption ), data ( data ), del ( deleteOnDestroy )
+		DataPushButton(QString caption, QObject *data, bool deleteOnDestroy=false):
+				QPushButton(caption), data(data), del(deleteOnDestroy)
 		{
-			connect ( this, SIGNAL ( clicked ( bool ) ), this, SLOT ( buttonClicked ( bool ) ) );
+			connect(this, SIGNAL(clicked(bool)), this, SLOT(buttonClicked(bool)));
 		}
 		~DataPushButton()
 		{
-			if ( del ) delete data;
+			if (del)
+				delete data;
 		}
 	protected:
 		QObject *data;
 		bool del;
 	private slots:
-		void buttonClicked ( bool checked )
+		void buttonClicked(bool checked)
 		{
-			emit clickedWithData ( data );
+			emit clickedWithData(data);
 		}
 	signals:
-		void clickedWithData ( QObject *data );
+		void clickedWithData(QObject *data);
 };
 
 class SCRIBUS_API StringPushButton : public QPushButton
 {
 	Q_OBJECT
 	public:
-		StringPushButton ( QString caption, QString data ) :
-				QPushButton ( caption ), data ( data )
+		StringPushButton(QString caption, QString data) :
+				QPushButton(caption), data(data)
 		{
-			connect ( this, SIGNAL ( clicked ( bool ) ), this, SLOT ( buttonClicked ( bool ) ) );
+			connect (this, SIGNAL(clicked(bool)), this, SLOT(buttonClicked(bool)));
 		}
 	protected:
 		QString data;
 	private slots:
-		void buttonClicked ( bool checked )
+		void buttonClicked(bool checked)
 		{
-			emit clickedWithData ( data );
+			emit clickedWithData(data);
 		}
 	signals:
-		void clickedWithData ( QString data );
+		void clickedWithData(QString data);
 };
 
 class SCRIBUS_API XmlWidget
 {
 	public:
-		static XmlWidget *fromXml ( I18nXmlStreamReader *xml );
-		XmlWidget ( I18nXmlStreamReader *xml, bool readDescription=true );
-		virtual ~XmlWidget() {};
+		static XmlWidget *fromXml(I18nXmlStreamReader *xml);
+		XmlWidget(I18nXmlStreamReader *xml, bool readDescription=true);
+		virtual ~XmlWidget() {}
 		QString name() const { return m_name; }
 		QString description() const { return m_description; }
 		QString defaultValue() const { return m_defaultValue; }
 		virtual QString toString() const { return ""; }
-		virtual void fromString ( QString str ) {};
+		virtual void fromString(QString str){}
 	protected:
 		QString m_name;
 		QString m_description;
@@ -158,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(QString filename);
+		QIcon *icon(QString filename, QString name);
 	protected:
 		QFile *file;
 		QMap<QString, QIcon> icons;

Modified: trunk/Scribus/scribus/urllauncher.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/urllauncher.cpp
==============================================================================
--- trunk/Scribus/scribus/urllauncher.cpp	(original)
+++ trunk/Scribus/scribus/urllauncher.cpp	Thu Dec 28 22:56:36 2017
@@ -43,12 +43,12 @@
 	_instance = 0;
 }
 
-void UrlLauncher::launchUrlExt(const QString& link, QWidget *parent)
+void UrlLauncher::launchUrlExt(QString link, QWidget *parent)
 {
 	launchUrlExt(QUrl(link), parent);
 }
 
-void UrlLauncher::launchUrlExt(const QUrl& link, QWidget *parent)
+void UrlLauncher::launchUrlExt(QUrl link, QWidget *parent)
 {
 	if (link.scheme()=="http" || link.scheme()=="https")
 	{

Modified: trunk/Scribus/scribus/urllauncher.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/urllauncher.h
==============================================================================
--- trunk/Scribus/scribus/urllauncher.h	(original)
+++ trunk/Scribus/scribus/urllauncher.h	Thu Dec 28 22:56:36 2017
@@ -37,8 +37,8 @@
 		static void deleteInstance();
 		
 	public slots:
-		void launchUrlExt(const QString& link, QWidget *parent=0);
-		void launchUrlExt(const QUrl& link, QWidget *parent=0);
+		void launchUrlExt(QString link, QWidget *parent=0);
+		void launchUrlExt(QUrl link, QWidget *parent=0);
 
 	private:
 		/**

Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22289&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp	(original)
+++ trunk/Scribus/scribus/util.cpp	Thu Dec 28 22:56:36 2017
@@ -24,7 +24,7 @@
 #include <algorithm>
 #include "util.h"
 #include <zlib.h>
-
+#include <qglobal.h>
 #include <QApplication>
 #include <QCryptographicHash>
 #include <QDomElement>




More information about the scribus-commit mailing list