r24936 by craig - Some code optimisations

scribus-commit scribus-commit at lists.scribus.net
Thu Feb 10 20:35:54 UTC 2022


Author: craig
Date: Thu Feb 10 20:35:53 2022
New Revision: 24936

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24936
Log:
Some code optimisations

Modified:
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.h
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
    trunk/Scribus/scribus/plugins/import/qxp/importqxp.h
    trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
    trunk/Scribus/scribus/plugins/import/zmf/importzmf.h
    trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
    trunk/Scribus/scribus/plugins/picbrowser/collection.h
    trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
    trunk/Scribus/scribus/sclayer.cpp
    trunk/Scribus/scribus/scraction.cpp
    trunk/Scribus/scribus/scraction.h
    trunk/Scribus/scribus/selection.cpp
    trunk/Scribus/scribus/selection.h
    trunk/Scribus/scribus/text/storytext.cpp
    trunk/Scribus/scribus/text/storytext.h
    trunk/Scribus/scribus/ui/actionsearchdialog.cpp
    trunk/Scribus/scribus/ui/actionsearchdialog.h
    trunk/Scribus/scribus/ui/scrapbookpalette.cpp
    trunk/Scribus/scribus/ui/scrapbookpalette.h
    trunk/Scribus/scribus/ui/smfontfeatures.cpp
    trunk/Scribus/scribus/ui/smfontfeatures.h
    trunk/Scribus/scribus/ui/smtabruler.cpp
    trunk/Scribus/scribus/ui/smtabruler.h
    trunk/Scribus/scribus/ui/tabmanager.cpp
    trunk/Scribus/scribus/ui/tabmanager.h
    trunk/Scribus/scribus/util.cpp
    trunk/Scribus/scribus/util.h

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.cpp	Thu Feb 10 20:35:53 2022
@@ -409,12 +409,10 @@
 	return ret;
 }
 
-int ScImgDataLoader_GMagick::blendModeToInt(QString compositeOp)
-{
-	int ret = 1;
-	if (compositeOp == "norm")
-		ret = 1;
-	else if (compositeOp == "dark")
+int ScImgDataLoader_GMagick::blendModeToInt(const QString& compositeOp)
+{
+	int ret = 1; // default compositeOp == "norm"
+	if (compositeOp == "dark")
 		ret = 24;
 	else if (compositeOp == "lite")
 		ret = 25;

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.h
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.h	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_gmagick.h	Thu Feb 10 20:35:53 2022
@@ -15,7 +15,7 @@
 protected:
 	void initSupportedFormatList();
 	QString blendModeToString(int compositeOp);
-	int blendModeToInt(QString compositeOp);
+	int blendModeToInt(const QString& compositeOp);
 	bool m_useRawImage;
 	int layerCount;
 private:

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Thu Feb 10 20:35:53 2022
@@ -2480,7 +2480,7 @@
 		m_patternName = newPattern;
 }
 
-void PageItem::set4ColorGeometry(FPoint c1, FPoint c2, FPoint c3, FPoint c4)
+void PageItem::set4ColorGeometry(const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4)
 {
 	GrControl1 = c1;
 	GrControl2 = c2;

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h	(original)
+++ trunk/Scribus/scribus/pageitem.h	Thu Feb 10 20:35:53 2022
@@ -673,7 +673,7 @@
 	void setMaskGradient(const VGradient& grad);
 	void setFillGradient(const VGradient& grad);
 	void setStrokeGradient(const VGradient& grad);
-	void set4ColorGeometry(FPoint c1, FPoint c2, FPoint c3, FPoint c4);
+	void set4ColorGeometry(const FPoint& c1, const FPoint& c2, const FPoint& c3, const FPoint& c4);
 	void set4ColorTransparency(double t1, double t2, double t3, double t4);
 	void set4ColorShade(int t1, int t2, int t3, int t4);
 	void set4ColorColors(const QString& col1, const QString& col2, const QString& col3, const QString& col4);

Modified: trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/qxp/importqxp.cpp	Thu Feb 10 20:35:53 2022
@@ -66,7 +66,7 @@
 	cancel = false;
 }
 
-QImage QxpPlug::readThumbnail(QString fName)
+QImage QxpPlug::readThumbnail(const QString& fName)
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
@@ -126,7 +126,7 @@
 	return QImage();
 }
 
-bool QxpPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
+bool QxpPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
 {
 	bool success = false;
 	interactive = (flags & LoadSavePlugin::lfInteractive);
@@ -325,7 +325,7 @@
 	delete tmpSel;
 }
 
-bool QxpPlug::convert(QString fn)
+bool QxpPlug::convert(const QString& fn)
 {
 	importedColors.clear();
 	importedPatterns.clear();

Modified: trunk/Scribus/scribus/plugins/import/qxp/importqxp.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/import/qxp/importqxp.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/qxp/importqxp.h	(original)
+++ trunk/Scribus/scribus/plugins/import/qxp/importqxp.h	Thu Feb 10 20:35:53 2022
@@ -53,11 +53,11 @@
 	\param showProgress if progress must be displayed
 	\retval bool true if import was ok
 	 */
-	bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
-	QImage readThumbnail(QString fn);
+	bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
+	QImage readThumbnail(const QString& fName);
 
 private:
-	bool convert(QString fn);
+	bool convert(const QString& fn);
 
 	QList<PageItem*> Elements;
 	double baseX, baseY;

Modified: trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/zmf/importzmf.cpp	Thu Feb 10 20:35:53 2022
@@ -66,7 +66,7 @@
 	cancel = false;
 }
 
-QImage ZmfPlug::readThumbnail(QString fName)
+QImage ZmfPlug::readThumbnail(const QString& fName)
 {
 	QFileInfo fi = QFileInfo(fName);
 	double b, h;
@@ -126,7 +126,7 @@
 	return QImage();
 }
 
-bool ZmfPlug::import(QString fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
+bool ZmfPlug::import(const QString& fNameIn, const TransactionSettings& trSettings, int flags, bool showProgress)
 {
 	bool success = false;
 	interactive = (flags & LoadSavePlugin::lfInteractive);
@@ -325,7 +325,7 @@
 	delete tmpSel;
 }
 
-bool ZmfPlug::convert(QString fn)
+bool ZmfPlug::convert(const QString& fn)
 {
 	importedColors.clear();
 	importedPatterns.clear();

Modified: trunk/Scribus/scribus/plugins/import/zmf/importzmf.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/import/zmf/importzmf.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/zmf/importzmf.h	(original)
+++ trunk/Scribus/scribus/plugins/import/zmf/importzmf.h	Thu Feb 10 20:35:53 2022
@@ -53,11 +53,11 @@
 	\param showProgress if progress must be displayed
 	\retval bool true if import was ok
 	 */
-	bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
-	QImage readThumbnail(QString fn);
+	bool import(const QString& fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
+	QImage readThumbnail(const QString& fn);
 
 private:
-	bool convert(QString fn);
+	bool convert(const QString& fn);
 
 	QList<PageItem*> Elements;
 	double baseX, baseY;

Modified: trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/collection.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/collection.cpp	Thu Feb 10 20:35:53 2022
@@ -304,7 +304,7 @@
 }
 
 
-collectionsWriterThread::collectionsWriterThread ( const QString& xmlFile2, QList<collections *> saveCollections2 )
+collectionsWriterThread::collectionsWriterThread ( const QString& xmlFile2, const QList<collections *>& saveCollections2 )
 {
 	xmlFile = xmlFile2;
 	saveCollections = saveCollections2;

Modified: trunk/Scribus/scribus/plugins/picbrowser/collection.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/picbrowser/collection.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/collection.h	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/collection.h	Thu Feb 10 20:35:53 2022
@@ -150,7 +150,7 @@
 		//QString &xmlFile2: the file to write
 		//int fileType: the type of file, 0 for collectionfile, 1 for collectionsdb
 		//QList<collections *> saveCollections2: the collectionsset to write to the file
-		collectionsWriterThread (const QString& xmlFile2, QList<collections *> saveCollections2 );
+		collectionsWriterThread (const QString& xmlFile2, const QList<collections *> &saveCollections2 );
 		//starts writing to the file
 		void writeFile();
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp	Thu Feb 10 20:35:53 2022
@@ -1444,6 +1444,7 @@
 	// Apply pages attribute
 	std::vector<int> pageNs;
 	int nn = PyList_Size(self->pages);
+	pageNs.reserve(nn);
 	for (int i = 0; i < nn; ++i) {
 		pageNs.push_back((int) PyLong_AsLong(PyList_GetItem(self->pages, i)));
 	}

Modified: trunk/Scribus/scribus/sclayer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/sclayer.cpp
==============================================================================
--- trunk/Scribus/scribus/sclayer.cpp	(original)
+++ trunk/Scribus/scribus/sclayer.cpp	Thu Feb 10 20:35:53 2022
@@ -593,7 +593,7 @@
 	ScLayer* layer = byID(layerID);
 	if (!layer)
 		return false;
-	layer->markerColor = std::move(color);
+	layer->markerColor = color;
 	return true;
 }
 

Modified: trunk/Scribus/scribus/scraction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/scraction.cpp
==============================================================================
--- trunk/Scribus/scribus/scraction.cpp	(original)
+++ trunk/Scribus/scribus/scraction.cpp	Thu Feb 10 20:35:53 2022
@@ -34,13 +34,13 @@
 	initScrAction();
 }
 
-ScrAction::ScrAction(const QString & menuText, QKeySequence accel, QObject * parent ) : QAction(menuText, parent)
-{
-	setShortcut(accel);
-	initScrAction();
-}
-
-ScrAction::ScrAction(ActionType aType, const QString & menuText, QKeySequence accel, QObject * parent, QVariant d) : QAction(menuText, parent)
+ScrAction::ScrAction(const QString & menuText, const QKeySequence& accel, QObject * parent ) : QAction(menuText, parent)
+{
+	setShortcut(accel);
+	initScrAction();
+}
+
+ScrAction::ScrAction(ActionType aType, const QString & menuText, const QKeySequence& accel, QObject * parent, const QVariant& d) : QAction(menuText, parent)
 {
 	setShortcut(accel);
 	initScrAction();
@@ -51,7 +51,7 @@
 		connect (this, SIGNAL(triggered()), this, SLOT(triggeredToTriggeredData()));
 }
 
-ScrAction::ScrAction(ActionType aType, const QPixmap& icon16, const QPixmap& icon22, const QString & menuText, QKeySequence accel, QObject * parent, QVariant d)
+ScrAction::ScrAction(ActionType aType, const QPixmap& icon16, const QPixmap& icon22, const QString & menuText, const QKeySequence& accel, QObject * parent, const QVariant& d)
           : QAction(QIcon(icon16), menuText, parent)
 {
 	setShortcut(accel);
@@ -64,7 +64,7 @@
 		connect (this, SIGNAL(triggered()), this, SLOT(triggeredToTriggeredData()));
 }
 
-ScrAction::ScrAction(ActionType aType, const QString& icon16Path, const QString& icon22Path, const QString & menuText, QKeySequence accel, QObject * parent, QVariant d)
+ScrAction::ScrAction(ActionType aType, const QString& icon16Path, const QString& icon22Path, const QString & menuText, const QKeySequence& accel, QObject * parent, const QVariant& d)
          : QAction(menuText, parent), m_iconPath16(icon16Path), m_iconPath22(icon22Path)
 {
 	setShortcut(accel);
@@ -79,7 +79,7 @@
 		connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(loadIcon()));
 }
 
-ScrAction::ScrAction(const QString& icon16Path, const QString& icon22Path, const QString & menuText, QKeySequence accel, QObject * parent )
+ScrAction::ScrAction(const QString& icon16Path, const QString& icon22Path, const QString & menuText, const QKeySequence& accel, QObject * parent )
          : QAction(menuText, parent), m_iconPath16(icon16Path), m_iconPath22(icon22Path)
 {
 	setShortcut(accel);
@@ -91,7 +91,7 @@
 }
 
 
-ScrAction::ScrAction(QKeySequence accel, QObject * parent, QVariant d)
+ScrAction::ScrAction(const QKeySequence& accel, QObject * parent, const QVariant& d)
 	: QAction( QIcon(QPixmap()), "", parent )
 {
 	setShortcut(accel);

Modified: trunk/Scribus/scribus/scraction.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/scraction.h
==============================================================================
--- trunk/Scribus/scribus/scraction.h	(original)
+++ trunk/Scribus/scribus/scraction.h	Thu Feb 10 20:35:53 2022
@@ -55,7 +55,7 @@
 		\param accel Accelerator QKeySequence
 		\param parent Parent object of this action
 	*/
-	ScrAction(const QString &menuText, QKeySequence accel, QObject *parent);
+	ScrAction(const QString &menuText, const QKeySequence& accel, QObject *parent);
 		
 	/*!
 		\author Craig Bradney
@@ -71,9 +71,9 @@
 		\param extraDouble extra double value
 		\param extraQString extra QString value
 	 */
-	ScrAction(ActionType aType, const QString &menuText, QKeySequence accel, QObject *parent, QVariant d = QVariant());
-	ScrAction(ActionType aType, const QPixmap& icon16, const QPixmap& icon22, const QString &menuText, QKeySequence accel, QObject *parent, QVariant d = QVariant());
-	ScrAction(ActionType aType, const QString& icon16Path, const QString& icon22Path, const QString &menuText, QKeySequence accel, QObject *parent, QVariant d = QVariant());
+	ScrAction(ActionType aType, const QString &menuText, const QKeySequence& accel, QObject *parent, const QVariant& d = QVariant());
+	ScrAction(ActionType aType, const QPixmap& icon16, const QPixmap& icon22, const QString &menuText, const QKeySequence& accel, QObject *parent, const QVariant& d = QVariant());
+	ScrAction(ActionType aType, const QString& icon16Path, const QString& icon22Path, const QString &menuText, const QKeySequence& accel, QObject *parent, const QVariant& d = QVariant());
 	/*!
 		\author Craig Bradney
 		\date Jan 2005
@@ -83,7 +83,7 @@
 		\param accel Accelerator QKeySequence
 		\param parent Parent of this action
 	*/
-	ScrAction(const QString& icon16Path, const QString& icon22Path, const QString & menuText, QKeySequence accel, QObject *parent);
+	ScrAction(const QString& icon16Path, const QString& icon22Path, const QString & menuText, const QKeySequence& accel, QObject *parent);
 	/*!
 	\author Craig Bradney
 	\date Mar 2008
@@ -93,7 +93,7 @@
 	\param extraInt extra int value
 	\param extraQString extra QString value
 	 */
-	ScrAction(QKeySequence accel, QObject *parent, QVariant data = QVariant());
+	ScrAction(const QKeySequence& accel, QObject *parent, const QVariant& data = QVariant());
 	~ScrAction() = default;
 	
 	/*!

Modified: trunk/Scribus/scribus/selection.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/selection.cpp
==============================================================================
--- trunk/Scribus/scribus/selection.cpp	(original)
+++ trunk/Scribus/scribus/selection.cpp	Thu Feb 10 20:35:53 2022
@@ -202,7 +202,7 @@
 	return false;
 }
 
-bool Selection::addItems(const QList<PageItem *> items)
+bool Selection::addItems(const QList<PageItem *>& items)
 {
 	if (items.isEmpty())
 		return false;

Modified: trunk/Scribus/scribus/selection.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/selection.h
==============================================================================
--- trunk/Scribus/scribus/selection.h	(original)
+++ trunk/Scribus/scribus/selection.h	Thu Feb 10 20:35:53 2022
@@ -84,7 +84,7 @@
 		 * @param item Item to add
 		 * @return If any item was added
 		 */
-		bool addItems(QList<PageItem *> items);
+		bool addItems(const QList<PageItem *>& items);
 		/**
 		 * @brief Prepend an item to the selection. 
 		 * If its added to a GUI selection selection and its item 0, its connected to the GUI too

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp	(original)
+++ trunk/Scribus/scribus/text/storytext.cpp	Thu Feb 10 20:35:53 2022
@@ -1648,7 +1648,7 @@
 	invalidate(0, len);	
 }
 
-void StoryText::replaceCharStyles(QMap<QString,QString> newNameForOld)
+void StoryText::replaceCharStyles(const QMap<QString,QString>& newNameForOld)
 {
 	ResourceCollection newnames;
 	newnames.mapCharStyles(newNameForOld);

Modified: trunk/Scribus/scribus/text/storytext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/text/storytext.h
==============================================================================
--- trunk/Scribus/scribus/text/storytext.h	(original)
+++ trunk/Scribus/scribus/text/storytext.h	Thu Feb 10 20:35:53 2022
@@ -206,7 +206,7 @@
 	void eraseCharStyle(int pos, uint len, const CharStyle& style);
 	void eraseStyle(int pos, const ParagraphStyle& style);
 	void replaceStyles(const QMap<QString,QString>& newNameForOld);
-	void replaceCharStyles(QMap<QString,QString> newNameForOld);
+	void replaceCharStyles(const QMap<QString,QString>& newNameForOld);
 
 	// Cleanup legacy formatting for whole story, ie remove direct
 	// formatting for parameters already set at paragraph level

Modified: trunk/Scribus/scribus/ui/actionsearchdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/actionsearchdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/actionsearchdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/actionsearchdialog.cpp	Thu Feb 10 20:35:53 2022
@@ -16,7 +16,7 @@
 #include "actionsearchdialog.h"
 #include "ui_actionsearchdialog.h"
 
-ActionSearchDialog::ActionSearchDialog(QMainWindow *parent, QList<QString> actionNames) :
+ActionSearchDialog::ActionSearchDialog(QMainWindow *parent, const QList<QString>& actionNames) :
 	QDialog{parent},
 	ui{new Ui::ActionSearchDialog},
 	m_actionNames{actionNames}

Modified: trunk/Scribus/scribus/ui/actionsearchdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/actionsearchdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/actionsearchdialog.h	(original)
+++ trunk/Scribus/scribus/ui/actionsearchdialog.h	Thu Feb 10 20:35:53 2022
@@ -25,7 +25,7 @@
 	Q_OBJECT
 
 public:
-	explicit ActionSearchDialog(QMainWindow *parent, QList<QString> actionNames);
+	explicit ActionSearchDialog(QMainWindow *parent, const QList<QString> &actionNames);
 	~ActionSearchDialog();
 
 	QString getActionName() const;

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp	Thu Feb 10 20:35:53 2022
@@ -1728,7 +1728,7 @@
 	reloadLib(activeBView->ScFilename);
 }
 
-void Biblio::objFromMenu(QString text)
+void Biblio::objFromMenu(const QString& text)
 {
 	QString tmp;
 	if (!activeBView->canWrite)
@@ -1905,7 +1905,7 @@
 	reloadLib(tempBView->ScFilename);
 }
 
-void Biblio::objFromMainMenu(QString text, int scrapID)
+void Biblio::objFromMainMenu(const QString& text, int scrapID)
 {
 	QString nam;
 	QString tmp;

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/scrapbookpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.h	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.h	Thu Feb 10 20:35:53 2022
@@ -102,8 +102,8 @@
 	void iconSetChange();
 	void languageChange();
 	void objFromFile(const QString& path, int testResult);
-	void objFromMenu(QString text);
-	void objFromMainMenu(QString text, int scrapID);
+	void objFromMenu(const QString& text);
+	void objFromMainMenu(const QString& text, int scrapID);
 	void closeOnDel(const QString& libName);
 	void reloadLib(const QString& fileName);
 

Modified: trunk/Scribus/scribus/ui/smfontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/smfontfeatures.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smfontfeatures.cpp	(original)
+++ trunk/Scribus/scribus/ui/smfontfeatures.cpp	Thu Feb 10 20:35:53 2022
@@ -104,7 +104,7 @@
 	return features;
 }
 
-void SMFontFeatures::setFontFeatures(const QString& s, QStringList fontFeaturesList)
+void SMFontFeatures::setFontFeatures(const QString& s, const QStringList& fontFeaturesList)
 {
 	disconnectSignals();
 	m_hasParent = false;
@@ -134,30 +134,30 @@
 			setCurrentComboItemFromData(positionComboBox, fontFeatures[i]);
 		}
 		// Capitals ComboBox
-		else if (fontFeatures[i] == "+smcp" || 
-		         fontFeatures[i] == "+c2sc" || 
-		         fontFeatures[i] == "+pcap" || 
-		         fontFeatures[i] == "+c2pc" || 
-		         fontFeatures[i] == "+unic" || 
-		         fontFeatures[i] == "+titl")
+		else if (fontFeatures[i] == "+smcp" ||
+				 fontFeatures[i] == "+c2sc" ||
+				 fontFeatures[i] == "+pcap" ||
+				 fontFeatures[i] == "+c2pc" ||
+				 fontFeatures[i] == "+unic" ||
+				 fontFeatures[i] == "+titl")
 		{
 			setCurrentComboItemFromData(capitalsComboBox, fontFeatures[i]);
 		}
 		// Numerals style
-		else if (fontFeatures[i] == "+lnum" || 
-		         fontFeatures[i] == "+onum")
+		else if (fontFeatures[i] == "+lnum" ||
+				 fontFeatures[i] == "+onum")
 		{
 			setCurrentComboItemFromData(numeralComboBox, fontFeatures[i]);
 		}
 		// Numerals width
-		else if (fontFeatures[i] == "+pnum" || 
-		         fontFeatures[i] == "+tnum")
+		else if (fontFeatures[i] == "+pnum" ||
+				 fontFeatures[i] == "+tnum")
 		{
 			setCurrentComboItemFromData(widthComboBox, fontFeatures[i]);
 		}
 		// Numerals Fraction
-		else if (fontFeatures[i] == "+frac" || 
-		         fontFeatures[i] == "+afrc")
+		else if (fontFeatures[i] == "+frac" ||
+				 fontFeatures[i] == "+afrc")
 		{
 			setCurrentComboItemFromData(fractionComboBox, fontFeatures[i]);
 		}
@@ -214,7 +214,7 @@
 	}
 }
 
-void SMFontFeatures::setFontFeatures(const QString& val, QStringList fontFeatures, bool isParentVal)
+void SMFontFeatures::setFontFeatures(const QString& val, const QStringList& fontFeatures, bool isParentVal)
 {
 	disconnectSignals();
 	m_hasParent = true;

Modified: trunk/Scribus/scribus/ui/smfontfeatures.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/smfontfeatures.h
==============================================================================
--- trunk/Scribus/scribus/ui/smfontfeatures.h	(original)
+++ trunk/Scribus/scribus/ui/smfontfeatures.h	Thu Feb 10 20:35:53 2022
@@ -41,8 +41,8 @@
 
 	void languageChange();
 
-	void setFontFeatures(const QString& s, QStringList fontFeaturesList);
-	void setFontFeatures(const QString& val, QStringList fontFeatures, bool isParentVal);
+	void setFontFeatures(const QString& s, const QStringList& fontFeaturesList);
+	void setFontFeatures(const QString& val, const QStringList& fontFeatures, bool isParentVal);
 	QString fontFeatures();
 	void enableFontFeatures(const QStringList& fontFeatures);
 	void resetFontFeatures();

Modified: trunk/Scribus/scribus/ui/smtabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/smtabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtabruler.cpp	Thu Feb 10 20:35:53 2022
@@ -12,7 +12,7 @@
 #include "units.h"
 
 
-SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin, QList<ParagraphStyle::TabRecord> Tabs, double wid)
+SMTabruler::SMTabruler(QWidget* parent, bool haveFirst, int dEin, const QList<ParagraphStyle::TabRecord>& Tabs, double wid)
 	: Tabruler(parent, haveFirst, dEin, Tabs, wid)
 {
 	m_parentButton = new QToolButton(this);

Modified: trunk/Scribus/scribus/ui/smtabruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/smtabruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtabruler.h	(original)
+++ trunk/Scribus/scribus/ui/smtabruler.h	Thu Feb 10 20:35:53 2022
@@ -19,7 +19,7 @@
 	SMTabruler(QWidget* parent,
 			   bool haveFirst = true,
 			   int dEin = 1,
-			   QList<ParagraphStyle::TabRecord> Tabs = QList<ParagraphStyle::TabRecord>(),
+			   const QList<ParagraphStyle::TabRecord>& Tabs = QList<ParagraphStyle::TabRecord>(),
 			   double wid = -1);
 	~SMTabruler() {};
 

Modified: trunk/Scribus/scribus/ui/tabmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/tabmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabmanager.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabmanager.cpp	Thu Feb 10 20:35:53 2022
@@ -17,7 +17,7 @@
 #include "commonstrings.h"
 #include "iconmanager.h"
 
-TabManager::TabManager( QWidget* parent, int dEin, QList<ParagraphStyle::TabRecord> inTab, double) : QDialog( parent )
+TabManager::TabManager( QWidget* parent, int dEin, const QList<ParagraphStyle::TabRecord>& inTab, double) : QDialog( parent )
 {
 	setModal(true);
 	setWindowTitle( tr( "Manage Tabulators" ) );

Modified: trunk/Scribus/scribus/ui/tabmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/ui/tabmanager.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabmanager.h	(original)
+++ trunk/Scribus/scribus/ui/tabmanager.h	Thu Feb 10 20:35:53 2022
@@ -22,7 +22,7 @@
 	Q_OBJECT
 
 public:
-	TabManager( QWidget* parent, int dEin, QList<ParagraphStyle::TabRecord> inTab, double wid);
+	TabManager( QWidget* parent, int dEin, const QList<ParagraphStyle::TabRecord>& inTab, double wid);
 	~TabManager() = default;
 
 	QList<ParagraphStyle::TabRecord> tabList() const;

Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp	(original)
+++ trunk/Scribus/scribus/util.cpp	Thu Feb 10 20:35:53 2022
@@ -510,7 +510,7 @@
 	return retList;
 }
 
-bool sortingQPairOfStrings( QPair<QString, QString> aP, QPair<QString, QString> bP)
+bool sortingQPairOfStrings(const QPair<QString, QString>& aP, const QPair<QString, QString>& bP)
 {
 	if (aP.first == bP.first)
 		return (aP.second < bP.second);

Modified: trunk/Scribus/scribus/util.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24936&path=/trunk/Scribus/scribus/util.h
==============================================================================
--- trunk/Scribus/scribus/util.h	(original)
+++ trunk/Scribus/scribus/util.h	Thu Feb 10 20:35:53 2022
@@ -52,7 +52,7 @@
 \retval QStringList sorted string list
  */
 QStringList SCRIBUS_API sortQStringList(QStringList aList);
-bool SCRIBUS_API sortingQPairOfStrings( QPair<QString, QString> aP, QPair<QString, QString> bP);
+bool SCRIBUS_API sortingQPairOfStrings( const QPair<QString, QString>& aP, const QPair<QString, QString>& bP);
 void SCRIBUS_API ReOrderText(ScribusDoc *currentDoc, ScribusView *view);
 void SCRIBUS_API WordAndPara(PageItem *currItem, int *w, int *p, int *c, int *wN, int *pN, int *cN);
 bool SCRIBUS_API overwrite(QWidget *parent, const QString& filename);




More information about the scribus-commit mailing list