r22640 by craig - clazy and clang fixes, part 18

scribus-commit scribus-commit at lists.scribus.net
Tue Aug 21 21:50:50 UTC 2018


Author: craig
Date: Tue Aug 21 21:50:50 2018
New Revision: 22640

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

Modified:
    trunk/Scribus/scribus/colormgmt/sccolorspacedata.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
    trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
    trunk/Scribus/scribus/ui/charselectenhanced.cpp
    trunk/Scribus/scribus/ui/scrspinbox.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp

Modified: trunk/Scribus/scribus/colormgmt/sccolorspacedata.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/colormgmt/sccolorspacedata.cpp
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sccolorspacedata.cpp	(original)
+++ trunk/Scribus/scribus/colormgmt/sccolorspacedata.cpp	Tue Aug 21 21:50:50 2018
@@ -5,25 +5,25 @@
 for which a new license (GPL+exception) is in place.
 */
 
-#include <stdlib.h>
+#include <cstdlib>
 #include "sccolorspacedata.h"
 #include "sccolormgmtengine.h"
 
 ScColorTransform ScColorSpaceData::createTransform(const ScColorSpaceData& outputSpace, eRenderIntent renderIntent, 
-	                               long transformFlags)
+												   long transformFlags)
 {
 	ScColorTransform colorTransform;
 	if (m_profile && outputSpace.profile())
 	{
-		colorTransform = m_profile.engine().createTransform(m_profile, m_colorFormat, 
-		                                    outputSpace.profile(), outputSpace.colorFormat(), 
-											renderIntent, transformFlags);
+		colorTransform = m_profile.engine().createTransform(m_profile, m_colorFormat,
+															outputSpace.profile(), outputSpace.colorFormat(),
+															renderIntent, transformFlags);
 	}
 	return colorTransform;
 }
 
 ScColorTransform ScColorSpaceData::createTransform(const ScColorProfile& outputProfile, eColorFormat outputFormat,
-                                   eRenderIntent renderIntent, long transformFlags)
+												   eRenderIntent renderIntent, long transformFlags)
 {
 	ScColorTransform colorTransform;
 	if (m_profile)
@@ -32,40 +32,40 @@
 }
 
 ScColorTransform ScColorSpaceData::createProofingTransform(const ScColorSpaceData& outputSpace, const ScColorProfile& proofing, 
-	                               eRenderIntent renderIntent,  eRenderIntent proofingIntent, long transformFlags)
+														   eRenderIntent renderIntent,  eRenderIntent proofingIntent, long transformFlags)
 {
 	ScColorTransform colorTransform;
 	if (m_profile && outputSpace.profile())
 	{
-		colorTransform = m_profile.engine().createProofingTransform(m_profile, m_colorFormat, 
-		                                    outputSpace.profile(), outputSpace.colorFormat(), 
-											proofing, renderIntent, proofingIntent, transformFlags);
+		colorTransform = m_profile.engine().createProofingTransform(m_profile, m_colorFormat,
+																	outputSpace.profile(), outputSpace.colorFormat(),
+																	proofing, renderIntent, proofingIntent, transformFlags);
 	}
 	return colorTransform;
 }
 
 ScColorTransform ScColorSpaceData::createProofingTransform(const ScColorProfile& outputProfile, eColorFormat outputFormat,
-                                   const ScColorProfile& proofing, eRenderIntent renderIntent, 
-                                   eRenderIntent proofingIntent, long transformFlags)
+														   const ScColorProfile& proofing, eRenderIntent renderIntent,
+														   eRenderIntent proofingIntent, long transformFlags)
 {
 	ScColorTransform colorTransform;
 	if (m_profile)
 	{
-		colorTransform = m_profile.engine().createProofingTransform(m_profile, m_colorFormat, 
-		                                    outputProfile, outputFormat, proofing, renderIntent, 
-											proofingIntent, transformFlags);
+		colorTransform = m_profile.engine().createProofingTransform(m_profile, m_colorFormat,
+																	outputProfile, outputFormat, proofing, renderIntent,
+																	proofingIntent, transformFlags);
 	}
 	return colorTransform;
 }
 
 bool ScColorSpaceData::convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags, 
-	                     void* dataIn, void* dataOut, uint numElems, ScColorTransform* lastTrans)
+							   void* dataIn, void* dataOut, uint numElems, ScColorTransform* lastTrans)
 {
 	ScColorTransform transform;
 	if (lastTrans)
 		transform = *lastTrans;
 	if (!transform)
-		transform = createTransform(data, renderIntent, transformFlags);	
+		transform = createTransform(data, renderIntent, transformFlags);
 
 	bool success = false;
 	if (transform)
@@ -81,7 +81,7 @@
 }
 
 bool ScColorSpaceData::convert(ScColorSpaceData& data, eRenderIntent renderIntent, long transformFlags, 
-	                     void* dataIn, QIODevice* device, uint numElems, ScColorTransform* lastTrans)
+							   void* dataIn, QIODevice* device, uint numElems, ScColorTransform* lastTrans)
 {
 	bool success = false;
 	uint numChannels = data.numChannels();

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_jpeg.cpp	Tue Aug 21 21:50:50 2018
@@ -7,7 +7,7 @@
 #include <QFile>
 #include <QFileInfo>
 #include <QObject>
-#include <setjmp.h>
+#include <csetjmp>
 #include "scconfig.h"
 #include "colormgmt/sccolormgmtengine.h"
 #include "scimgdataloader_jpeg.h"

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Tue Aug 21 21:50:50 2018
@@ -186,7 +186,7 @@
 	getReplacedFonts.clear();
 }
 
-bool Scribus150Format::loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc)
+bool Scribus150Format::loadElements(const QString& data, const QString& fileDir, int toLayer, double Xp_in, double Yp_in, bool loc)
 {
 	ParagraphStyle vg;
 	isNewFormat = false;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h	Tue Aug 21 21:50:50 2018
@@ -52,7 +52,7 @@
 		virtual bool savePalette(const QString & fileName);
 		virtual QString saveElements(double xp, double yp, double wp, double hp, Selection* selection, QByteArray &prevData);
 		virtual bool loadPalette(const QString & fileName);
-		virtual bool loadElements(const QString & data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc);
+		virtual bool loadElements(const QString & data, const QString& fileDir, int toLayer, double Xp_in, double Yp_in, bool loc);
 		virtual void addToMainWindowMenu(ScribusMainWindow *) {};
 
 		// Special features - .sla page extraction support

Modified: trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/imagedialog.cpp	Tue Aug 21 21:50:50 2018
@@ -32,10 +32,10 @@
 		pView->fitImage();
 		pView->setKeepFitted(true);
 
-		connect ( fitToWindowRadiobutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( fitToWindowRadiobuttonToggled ( bool ) ) );
-		connect ( zoomRadiobutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( zoomRadiobuttonToggled ( bool ) ) );
-		connect ( zoomSpinbox, SIGNAL ( valueChanged ( int ) ), this, SLOT ( zoomSpinboxValueChanged ( int ) ) );
-		connect ( showOriginalSizeButton, SIGNAL ( clicked() ), this, SLOT ( showOriginalSizeButtonClicked() ) );
+		connect(fitToWindowRadiobutton, SIGNAL(toggled(bool)), this, SLOT(fitToWindowRadiobuttonToggled(bool)));
+		connect(zoomRadiobutton, SIGNAL(toggled(bool)), this, SLOT(zoomRadiobuttonToggled(bool)));
+		connect(zoomSpinbox, SIGNAL(valueChanged(int)), this, SLOT(zoomSpinboxValueChanged(int)));
+		connect(showOriginalSizeButton, SIGNAL(clicked()), this, SLOT(showOriginalSizeButtonClicked()));
 	}
 	else
 	{
@@ -45,12 +45,10 @@
 }
 
 
-void Imagedialog::resizeEvent ( QResizeEvent * event )
+void Imagedialog::resizeEvent(QResizeEvent* event)
 {
-	if ( fitToWindowRadiobutton->isChecked() )
-	{
+	if (fitToWindowRadiobutton->isChecked())
 		zoomSpinbox->setValue ( qRound ( pView->getZoom() * 100  * m_hRatio) );
-	}
 }
 
 

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Tue Aug 21 21:50:50 2018
@@ -248,7 +248,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QFrame::changeEvent(e);
 }
 
 void ScribusView::languageChange()

Modified: trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/ui/autoformbuttongroup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/autoformbuttongroup.cpp	(original)
+++ trunk/Scribus/scribus/ui/autoformbuttongroup.cpp	Tue Aug 21 21:50:50 2018
@@ -763,7 +763,7 @@
 	if (e->type() == QEvent::LanguageChange)
 		languageChange();
 	else
-		QWidget::changeEvent(e);
+		QMenu::changeEvent(e);
 }
 
 void AutoformButtonGroup::languageChange()

Modified: trunk/Scribus/scribus/ui/charselectenhanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/ui/charselectenhanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/charselectenhanced.cpp	(original)
+++ trunk/Scribus/scribus/ui/charselectenhanced.cpp	Tue Aug 21 21:50:50 2018
@@ -34,7 +34,7 @@
 	// signals and slots connections
 	connect(deleteButton, SIGNAL(clicked()), this, SLOT(delEdit()));
 	connect(insertButton, SIGNAL(clicked()), this, SLOT(insChar()));
-	connect(m_charTable, SIGNAL(selectChar(uint, QString)), this, SLOT(newChar(uint, QString)));
+	connect(m_charTable, SIGNAL(selectChar(uint,QString)), this, SLOT(newChar(uint,QString)));
 	connect(fontSelector, SIGNAL(activated(int)), this, SLOT(newFont(int)));
 	connect(rangeSelector, SIGNAL(activated(int)), this, SLOT(newCharClass(int)));
 	connect(hexLineEdit, SIGNAL(returnPressed()), this, SLOT(hexLineEdit_returnPressed()));

Modified: trunk/Scribus/scribus/ui/scrspinbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/ui/scrspinbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrspinbox.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrspinbox.cpp	Tue Aug 21 21:50:50 2018
@@ -367,22 +367,22 @@
 		if (shiftB && !altB)
 		{
 			setSingleStep(0.1);
-			retval=QWidget::event(event);
+			retval=QAbstractSpinBox::event(event);
 		} 
 		else if (!shiftB && altB)
 		{
 			setSingleStep(10.0);
-			retval=QWidget::event(event);
+			retval=QAbstractSpinBox::event(event);
 		}
 		else if (shiftB && altB)
 		{
 			setSingleStep(0.01);
-			retval=QWidget::event(event);
+			retval=QAbstractSpinBox::event(event);
 		}
 		else if (!shiftB && !altB)
 		{
 			setSingleStep(1.0);
-			retval=QWidget::event(event);
+			retval=QAbstractSpinBox::event(event);
 		}
 	}
 	else

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22640&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Tue Aug 21 21:50:50 2018
@@ -1159,7 +1159,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QToolBar::changeEvent(e);
 }
 
 
@@ -1225,7 +1225,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QToolBar::changeEvent(e);
 }
 
 void SToolBColorS::languageChange()
@@ -1297,7 +1297,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QToolBar::changeEvent(e);
 }
 
 void SToolBStyle::languageChange()
@@ -1407,7 +1407,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QToolBar::changeEvent(e);
 }
 
 void SToolBAlign::languageChange()
@@ -1482,7 +1482,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		QToolBar::changeEvent(e);
 }
 
 void SToolBFont::languageChange()




More information about the scribus-commit mailing list