r23670 by craig - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 26 22:32:24 UTC 2020


Author: craig
Date: Sun Apr 26 22:32:24 2020
New Revision: 23670

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23670
Log:
Code cleanup

Modified:
    trunk/Scribus/scribus/fontlistmodel.cpp
    trunk/Scribus/scribus/text/textshaper.cpp
    trunk/Scribus/scribus/ui/dcolor.cpp
    trunk/Scribus/scribus/ui/dcolor.h
    trunk/Scribus/scribus/ui/fontcombo.cpp
    trunk/Scribus/scribus/ui/gradienteditor.cpp
    trunk/Scribus/scribus/ui/gradienteditor.h
    trunk/Scribus/scribus/ui/inspage.cpp
    trunk/Scribus/scribus/ui/inspage.h
    trunk/Scribus/scribus/ui/mergedoc.cpp
    trunk/Scribus/scribus/ui/mergedoc.h
    trunk/Scribus/scribus/ui/missing.cpp
    trunk/Scribus/scribus/ui/missing.h
    trunk/Scribus/scribus/ui/movepage.cpp
    trunk/Scribus/scribus/ui/movepage.h
    trunk/Scribus/scribus/ui/outlinepalette.cpp
    trunk/Scribus/scribus/ui/pdfexportdialog.cpp
    trunk/Scribus/scribus/ui/pdfexportdialog.h
    trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
    trunk/Scribus/scribus/ui/query.cpp
    trunk/Scribus/scribus/ui/query.h
    trunk/Scribus/scribus/ui/replaceonecolor.cpp
    trunk/Scribus/scribus/ui/replaceonecolor.h
    trunk/Scribus/scribus/ui/scrapbookpalette.cpp
    trunk/Scribus/scribus/ui/scrapbookpalette.h

Modified: trunk/Scribus/scribus/fontlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/fontlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.cpp	(original)
+++ trunk/Scribus/scribus/fontlistmodel.cpp	Sun Apr 26 22:32:24 2020
@@ -198,7 +198,7 @@
 			case FontListModel::FontFile:
 				return font.fontPath();
 			case FontListModel::SortIndex:
-				if (font.scName()[0] == QChar('.'))
+				if (font.scName().at(0) == QChar('.'))
 					return font.scName().mid(1).toLower();
 				return font.scName().toLower();
 			default:

Modified: trunk/Scribus/scribus/text/textshaper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/text/textshaper.cpp
==============================================================================
--- trunk/Scribus/scribus/text/textshaper.cpp	(original)
+++ trunk/Scribus/scribus/text/textshaper.cpp	Sun Apr 26 22:32:24 2020
@@ -181,7 +181,7 @@
 	
 	for (int i = fromPos; i < toPos; ++i)
 	{
-		QString str = m_story.text(i,1);
+		QString str(m_story.text(i,1));
 		
 		if (m_singlePar)
 		{

Modified: trunk/Scribus/scribus/ui/dcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/dcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/dcolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/dcolor.cpp	Sun Apr 26 22:32:24 2020
@@ -80,7 +80,7 @@
 	replacementColor = replacementColData->itemText(id);
 }
 
-const QString DelColor::getReplacementColor()
+const QString& DelColor::getReplacementColor()
 {
 	return replacementColor;
 }

Modified: trunk/Scribus/scribus/ui/dcolor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/dcolor.h
==============================================================================
--- trunk/Scribus/scribus/ui/dcolor.h	(original)
+++ trunk/Scribus/scribus/ui/dcolor.h	Sun Apr 26 22:32:24 2020
@@ -25,7 +25,7 @@
 public:
 	DelColor(QWidget* parent, const ColorList& colorList, const QString& colorName, bool haveDoc );
 	~DelColor() {};
-	const QString getReplacementColor();
+	const QString &getReplacementColor();
 
 private:
 	QLabel* deleteLabel;

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Sun Apr 26 22:32:24 2020
@@ -170,7 +170,7 @@
 	fontStyle->clear();
 	QString fntFamily = fontFamily->itemText(id);
 	QStringList slist, styleList = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[fntFamily];
-	for (QStringList::ConstIterator it = styleList.begin(); it != styleList.end(); ++it)
+	for (QStringList::ConstIterator it = styleList.constBegin(); it != styleList.constEnd(); ++it)
 	{
 		SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(fntFamily + " " + *it);
 		if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
@@ -220,7 +220,7 @@
 	QStringList ilist;
 	if (currDoc != nullptr)
 	{
-		for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
+		for (QStringList::ConstIterator it3 = slist.constBegin(); it3 != slist.constEnd(); ++it3)
 		{
 			SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it3);
 			if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())
@@ -255,13 +255,13 @@
 	QStringList rlist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap.keys();
 	QMap<QString, ScFace::FontType> flist;
 	flist.clear();
-	for (QStringList::ConstIterator it2 = rlist.begin(); it2 != rlist.end(); ++it2)
+	for (QStringList::ConstIterator it2 = rlist.constBegin(); it2 != rlist.constEnd(); ++it2)
 	{
 		if (currentDoc != nullptr)
 		{
 			QStringList slist = prefsManager.appPrefs.fontPrefs.AvailFonts.fontMap[*it2];
 			slist.sort();
-			for (QStringList::ConstIterator it3 = slist.begin(); it3 != slist.end(); ++it3)
+			for (QStringList::ConstIterator it3 = slist.constBegin(); it3 != slist.constEnd(); ++it3)
 			{
 				if ( prefsManager.appPrefs.fontPrefs.AvailFonts.contains(*it2 + " " + *it3))
 				{
@@ -317,7 +317,7 @@
 	QStringList ilist;
 	if (currentDoc != nullptr)
 	{
-		for (QStringList::ConstIterator it = slist.begin(); it != slist.end(); ++it)
+		for (QStringList::ConstIterator it = slist.constBegin(); it != slist.constEnd(); ++it)
 		{
 			SCFonts::ConstIterator fIt = prefsManager.appPrefs.fontPrefs.AvailFonts.find(family + " " + *it);
 			if (fIt != prefsManager.appPrefs.fontPrefs.AvailFonts.end())

Modified: trunk/Scribus/scribus/ui/gradienteditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/gradienteditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradienteditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/gradienteditor.cpp	Sun Apr 26 22:32:24 2020
@@ -54,7 +54,7 @@
 	Preview->updateDisplay();
 }
 
-const VGradient GradientEditor::gradient()
+const VGradient& GradientEditor::gradient()
 {
 	return Preview->gradient();
 }

Modified: trunk/Scribus/scribus/ui/gradienteditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/gradienteditor.h
==============================================================================
--- trunk/Scribus/scribus/ui/gradienteditor.h	(original)
+++ trunk/Scribus/scribus/ui/gradienteditor.h	Sun Apr 26 22:32:24 2020
@@ -46,7 +46,7 @@
 	GradientEditor(QWidget *pa);
 	~GradientEditor() {};
 	void setGradient(const VGradient& grad);
-	const VGradient gradient();
+	const VGradient &gradient();
 	void setColors(ColorList &colorList);
 	QColor setColor(const QString& colorName, int shad);
 	void setGradientEditable(bool val);

Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp	(original)
+++ trunk/Scribus/scribus/ui/inspage.cpp	Sun Apr 26 22:32:24 2020
@@ -345,7 +345,7 @@
 	}
 }
 
-const QStringList InsPage::getMasterPages()
+const QStringList& InsPage::getMasterPages()
 {
 	QStringList ret;
 	for (int n = 0; n < masterPageCombos.count(); ++n)
@@ -357,7 +357,7 @@
 	return ret;
 }
 
-const QString InsPage::getMasterPageN(uint n)
+const QString& InsPage::getMasterPageN(uint n)
 {
 	QComboBox* comboBox = masterPageCombos.at(n);
 	int currentIndex = comboBox->currentIndex();

Modified: trunk/Scribus/scribus/ui/inspage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/inspage.h
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.h	(original)
+++ trunk/Scribus/scribus/ui/inspage.h	Sun Apr 26 22:32:24 2020
@@ -34,8 +34,8 @@
 
 	QString prefsPageSizeName;
 
-	const QStringList getMasterPages();
-	const QString getMasterPageN(uint n);
+	const QStringList &getMasterPages();
+	const QString &getMasterPageN(uint n);
 	int getWhere() const;
 	int getWherePage() const;
 	int getCount() const;

Modified: trunk/Scribus/scribus/ui/mergedoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/mergedoc.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/mergedoc.cpp	(original)
+++ trunk/Scribus/scribus/ui/mergedoc.cpp	Sun Apr 26 22:32:24 2020
@@ -217,12 +217,12 @@
 	}
 }
 
-const QString MergeDoc::getFromDoc()
+const QString& MergeDoc::getFromDoc()
 {
 	return QDir::fromNativeSeparators(fromDocData->text());
 }
 
-const QStringList MergeDoc::getMasterPageNames() const
+const QStringList& MergeDoc::getMasterPageNames() const
 {
 	QStringList result;
 	for (const auto item : masterPageNameData->selectedItems())
@@ -238,27 +238,27 @@
 	return result;
 }
 
-const int MergeDoc::getImportWhere()
+int MergeDoc::getImportWhere()
 {
 	return importWhereData->currentIndex();
 }
 
-const int MergeDoc::getImportWherePage()
+int MergeDoc::getImportWherePage()
 {
 	return importWherePageData->value();
 }
 
-const bool MergeDoc::getCreatePageChecked()
+bool MergeDoc::getCreatePageChecked()
 {
 	return createPageData->isChecked();
 }
 
-const QString MergeDoc::getPageNumbers()
+const QString& MergeDoc::getPageNumbers()
 {
 	return pageNumberData->text();
 }
 
-const int MergeDoc::getPageCounter()
+int MergeDoc::getPageCounter()
 {
 	return count;
 }

Modified: trunk/Scribus/scribus/ui/mergedoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/mergedoc.h
==============================================================================
--- trunk/Scribus/scribus/ui/mergedoc.h	(original)
+++ trunk/Scribus/scribus/ui/mergedoc.h	Sun Apr 26 22:32:24 2020
@@ -34,14 +34,14 @@
 	MergeDoc( QWidget* parent, bool importMasterPages, int targetDocPageCount = -1, int currentPage = 1 );
 	~MergeDoc();
 
-	const QString getFromDoc();
-	const QStringList getMasterPageNames() const;
+	const QString &getFromDoc();
+	const QStringList &getMasterPageNames() const;
 	QList<int> getMasterPageIndexes() const;
-	const int getImportWhere();
-	const int getImportWherePage();
-	const bool getCreatePageChecked();
-	const QString getPageNumbers();
-	const int getPageCounter();
+	int getImportWhere();
+	int getImportWherePage();
+	bool getCreatePageChecked();
+	const QString &getPageNumbers();
+	int getPageCounter();
 
 private:
 	QLabel* fromDocLabel {nullptr};

Modified: trunk/Scribus/scribus/ui/missing.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/missing.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/missing.cpp	(original)
+++ trunk/Scribus/scribus/ui/missing.cpp	Sun Apr 26 22:32:24 2020
@@ -59,7 +59,7 @@
 	replacementFont = replacement;
 }
 
-const QString MissingFont::getReplacementFont()
+const QString& MissingFont::getReplacementFont()
 {
 	return replacementFont;
 }

Modified: trunk/Scribus/scribus/ui/missing.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/missing.h
==============================================================================
--- trunk/Scribus/scribus/ui/missing.h	(original)
+++ trunk/Scribus/scribus/ui/missing.h	Sun Apr 26 22:32:24 2020
@@ -26,7 +26,7 @@
 	MissingFont(QWidget* parent, const QString& fon, ScribusDoc* doc);
 	~MissingFont() = default;
 	
-	const QString getReplacementFont();
+	const QString &getReplacementFont();
 
 public slots:
 	virtual void newFont(const QString& replacement);

Modified: trunk/Scribus/scribus/ui/movepage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/movepage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/movepage.cpp	(original)
+++ trunk/Scribus/scribus/ui/movepage.cpp	Sun Apr 26 22:32:24 2020
@@ -154,27 +154,27 @@
 }
 
 
-const int MovePages::getFromPage()
+int MovePages::getFromPage()
 {
 	return static_cast<int>(fromPageData->value());
 }
 
-const int MovePages::getToPage()
+int MovePages::getToPage()
 {
 	return static_cast<int>(toPageData->value());
 }
 
-const int MovePages::getWhere()
+int MovePages::getWhere()
 {
 	return mvWhereData->currentIndex();
 }
 
-const int MovePages::getWherePage()
+int MovePages::getWherePage()
 {
 	return static_cast<int>(mvWherePageData->value());
 }
 
-const int MovePages::getCopyCount()
+int MovePages::getCopyCount()
 {
 	return static_cast<int>(numberOfCopiesData->value());
 }

Modified: trunk/Scribus/scribus/ui/movepage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/movepage.h
==============================================================================
--- trunk/Scribus/scribus/ui/movepage.h	(original)
+++ trunk/Scribus/scribus/ui/movepage.h	Sun Apr 26 22:32:24 2020
@@ -27,11 +27,11 @@
 	MovePages( QWidget* parent, int currentPage, int maxPages, bool moving );
 	~MovePages() = default;
 
-	const int getFromPage();
-	const int getToPage();
-	const int getWhere();
-	const int getWherePage();
-	const int getCopyCount();
+	int getFromPage();
+	int getToPage();
+	int getWhere();
+	int getWherePage();
+	int getCopyCount();
 
 
 private:

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp	Sun Apr 26 22:32:24 2020
@@ -317,7 +317,7 @@
 	if (!item)
 		return QTreeWidget::viewportEvent(event);
 
- 	QString tipText("");
+	QString tipText;
 	if (item->type == 5)
 	{
 		tipText += "<b>" + tr("Layer is:") + "</b><br><br>";
@@ -335,7 +335,7 @@
 			tipText += "<br>" + tr("locked");
 	}
 	else if ((item->type == 1) || (item->type == 3) || (item->type == 4))
- 	{
+	{
 		PageItem *pgItem = item->PageItemObject;
 		QPainter p;
 		QImage pm = QImage(80, 80, QImage::Format_ARGB32_Premultiplied);
@@ -351,80 +351,80 @@
 		QByteArray ba = buffer.buffer().toBase64();
 		buffer.close();
 		tipText = "<p align=\"center\"><img src=\"data:image/png;base64," + QString(ba) + "\"></p><p>";
- 		switch (pgItem->itemType())
- 		{
- 			case PageItem::ImageFrame:
- 				if (pgItem->asLatexFrame())
+		switch (pgItem->itemType())
+		{
+			case PageItem::ImageFrame:
+				if (pgItem->asLatexFrame())
 					tipText += CommonStrings::itemType_LatexFrame;
- 				else if (pgItem->asOSGFrame())
+				else if (pgItem->asOSGFrame())
 					tipText += CommonStrings::itemType_OSGFrame;
- 				else
+				else
 					tipText += CommonStrings::itemType_ImageFrame;
- 				break;
- 			case PageItem::TextFrame:
- 				switch (pgItem->annotation().Type())
- 				{
+				break;
+			case PageItem::TextFrame:
+				switch (pgItem->annotation().Type())
+				{
 					case Annotation::Button:
 						tipText += CommonStrings::itemSubType_PDF_PushButton;
- 						break;
+						break;
 					case Annotation::Textfield:
 						tipText += CommonStrings::itemSubType_PDF_TextField;
- 						break;
+						break;
 					case Annotation::Checkbox:
 						tipText += CommonStrings::itemSubType_PDF_CheckBox;
- 						break;
+						break;
 					case Annotation::Combobox:
 						tipText += CommonStrings::itemSubType_PDF_ComboBox;
- 						break;
+						break;
 					case Annotation::Listbox:
 						tipText += CommonStrings::itemSubType_PDF_ListBox;
- 						break;
+						break;
 					case Annotation::Text:
 						tipText += CommonStrings::itemSubType_PDF_TextAnnotation;
- 						break;
+						break;
 					case Annotation::Link:
 						tipText += CommonStrings::itemSubType_PDF_LinkAnnotation;
 						break;
 					case Annotation::RadioButton:
 						tipText += CommonStrings::itemSubType_PDF_RadioButton;
- 						break;
- 					default:
+						break;
+					default:
 						tipText += CommonStrings::itemType_TextFrame;
- 						break;
- 				}
- 				break;
- 			case PageItem::Line:
+						break;
+				}
+				break;
+			case PageItem::Line:
 				tipText += CommonStrings::itemType_Line;
- 				break;
- 			case PageItem::Arc:
+				break;
+			case PageItem::Arc:
 				tipText += CommonStrings::itemType_Arc;
 				break;
- 			case PageItem::Polygon:
+			case PageItem::Polygon:
 				tipText += CommonStrings::itemType_Polygon;
 				break;
 			case PageItem::RegularPolygon:
 				tipText += CommonStrings::itemType_RegularPolygon;
- 				break;
- 			case PageItem::PolyLine:
+				break;
+			case PageItem::PolyLine:
 				tipText += CommonStrings::itemType_Polyline;
 				break;
 			case PageItem::Spiral:
 				tipText += CommonStrings::itemType_Spiral;
- 				break;
- 			case PageItem::PathText:
+				break;
+			case PageItem::PathText:
 				tipText += CommonStrings::itemType_PathText;
- 				break;
- 			case PageItem::Symbol:
+				break;
+			case PageItem::Symbol:
 				tipText += CommonStrings::itemType_Symbol;
- 				break;
+				break;
 			case PageItem::Group:
 				tipText += CommonStrings::itemType_Group;
 				break;
 			case PageItem::Table:
 				tipText += CommonStrings::itemType_Table;
 				break;
- 			default:
- 				break;
+			default:
+				break;
 		}
 		tipText +="<br>" + tr("X-Pos:") + " ";
 		if (pgItem->OwnPage != -1)

Modified: trunk/Scribus/scribus/ui/pdfexportdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/pdfexportdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfexportdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/pdfexportdialog.cpp	Sun Apr 26 22:32:24 2020
@@ -412,17 +412,17 @@
 	}
 }
 
-const QString PDFExportDialog::cmsDescriptor()
+const QString& PDFExportDialog::cmsDescriptor()
 {
 	return m_cmsDescriptor;
 }
 
-const int PDFExportDialog::colorSpaceComponents()
+int PDFExportDialog::colorSpaceComponents()
 {
 	return m_components;
 }
 
-const QString PDFExportDialog::getPagesString()
+QString PDFExportDialog::getPagesString()
 {
 	if (Options->AllPages->isChecked())
 		return "*";

Modified: trunk/Scribus/scribus/ui/pdfexportdialog.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/pdfexportdialog.h
==============================================================================
--- trunk/Scribus/scribus/ui/pdfexportdialog.h	(original)
+++ trunk/Scribus/scribus/ui/pdfexportdialog.h	Sun Apr 26 22:32:24 2020
@@ -50,9 +50,9 @@
 	~PDFExportDialog() {};
 
 	void updateDocOptions();
-	const QString cmsDescriptor();
-	const int colorSpaceComponents();
-	const QString getPagesString();
+	const QString &cmsDescriptor();
+	int colorSpaceComponents();
+	QString getPagesString();
 
 protected slots:
 	void DoExport();

Modified: trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/prefs_pdfexport.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_pdfexport.cpp	Sun Apr 26 22:32:24 2020
@@ -351,7 +351,7 @@
 			QStringList docFonts = m_doc->usedFonts().keys();
 			embeddedFontsListWidget->clear();
 			subsettedFontsListWidget->clear();
-			for (int fe = 0; fe < docFonts.count(); ++ fe)
+			for (int fe = 0; fe < docFonts.count(); ++fe)
 			{
 				const QString& fontName = docFonts.at(fe);
 				const ScFace fontFace = AllFonts[fontName];

Modified: trunk/Scribus/scribus/ui/query.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/query.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/query.cpp	(original)
+++ trunk/Scribus/scribus/ui/query.cpp	Sun Apr 26 22:32:24 2020
@@ -100,7 +100,7 @@
 		accept();
 }
 
-const QString Query::getEditText()
+const QString& Query::getEditText()
 {
 	return answerEdit->text();
 }

Modified: trunk/Scribus/scribus/ui/query.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/query.h
==============================================================================
--- trunk/Scribus/scribus/ui/query.h	(original)
+++ trunk/Scribus/scribus/ui/query.h	Sun Apr 26 22:32:24 2020
@@ -26,7 +26,7 @@
 	Query(QWidget* parent=0, const char* name=nullptr, bool modal = false, const QString& text=0, const QString& titel=0 );
 	~Query() {};
 
-	const QString getEditText();
+	const QString &getEditText();
 	void setEditText(const QString& newText, bool setSelected);
 	void setTestList(const QStringList& tList);
 	void setForbiddenList(const QStringList& tList);

Modified: trunk/Scribus/scribus/ui/replaceonecolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/replaceonecolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/replaceonecolor.cpp	(original)
+++ trunk/Scribus/scribus/ui/replaceonecolor.cpp	Sun Apr 26 22:32:24 2020
@@ -39,12 +39,12 @@
 	replacementColor->setColors(availableColors, true);
 }
 
-const QString replaceColorDialog::getOriginalColor()
+const QString& replaceColorDialog::getOriginalColor()
 {
 	return originalColor->currentText();
 }
 
-const QString replaceColorDialog::getReplacementColor()
+const QString& replaceColorDialog::getReplacementColor()
 {
 	return replacementColor->currentText();
 }

Modified: trunk/Scribus/scribus/ui/replaceonecolor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/replaceonecolor.h
==============================================================================
--- trunk/Scribus/scribus/ui/replaceonecolor.h	(original)
+++ trunk/Scribus/scribus/ui/replaceonecolor.h	Sun Apr 26 22:32:24 2020
@@ -39,8 +39,8 @@
 public:
 	replaceColorDialog(QWidget* parent, ColorList &availableColors, ColorList &usedColors);
 	~replaceColorDialog() {};
-	const QString getOriginalColor();
-	const QString getReplacementColor();
+	const QString& getOriginalColor();
+	const QString& getReplacementColor();
 	void setReplacementColor(const QString& color);
 	void setOriginalColor(const QString& color);
 };

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.cpp	Sun Apr 26 22:32:24 2020
@@ -873,12 +873,12 @@
 	activeBView->ScFilename=fileName;
 }
 
-const QString Biblio::getScrapbookFileName()
+const QString& Biblio::getScrapbookFileName()
 {
 	return activeBView->ScFilename;
 }
 
-const int Biblio::objectCount()
+int Biblio::objectCount()
 {
 	return activeBView->objectMap.count();
 }

Modified: trunk/Scribus/scribus/ui/scrapbookpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23670&path=/trunk/Scribus/scribus/ui/scrapbookpalette.h
==============================================================================
--- trunk/Scribus/scribus/ui/scrapbookpalette.h	(original)
+++ trunk/Scribus/scribus/ui/scrapbookpalette.h	Sun Apr 26 22:32:24 2020
@@ -82,8 +82,8 @@
 	void adjustReferencesGroups(const QDomElement& elem, const QFileInfo& fid);
 	void cleanUpTemp();
 	void setScrapbookFileName(const QString&);
-	const QString getScrapbookFileName();
-	const int objectCount();
+	const QString &getScrapbookFileName();
+	int objectCount();
 	bool tempHasContents();
 	void readContents(const QString&);
 	void readTempContents(const QString&);




More information about the scribus-commit mailing list