r22454 by craig - Fix passing by value of QStrings in About window

scribus-commit scribus-commit at lists.scribus.net
Wed Mar 28 22:40:30 UTC 2018


Author: craig
Date: Wed Mar 28 22:40:30 2018
New Revision: 22454

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22454
Log:
Fix passing by value of QStrings in About window

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/about.cpp
    trunk/Scribus/scribus/ui/about.h

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22454&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Wed Mar 28 22:40:30 2018
@@ -1167,11 +1167,11 @@
 {
 	if (m_doc->m_Selection->count() != 0)
 	{
-		uint selectedItemCount = m_doc->m_Selection->count();
-		PageItem *currItem = m_doc->m_Selection->itemAt(0);
+		int selectedItemCount = m_doc->m_Selection->count();
+		PageItem *currItem = NULL;
 		if (selectedItemCount < moveWithBoxesOnlyThreshold)
 		{
-			for (uint cu = 0; cu < selectedItemCount; cu++)
+			for (int cu = 0; cu < selectedItemCount; cu++)
 			{
 				currItem = m_doc->m_Selection->itemAt(cu);
 				pp->save();
@@ -1183,7 +1183,7 @@
 				{
 					PageItem_Group* gItem = currItem->asGroupFrame();
 					pp->scale(gItem->width() / gItem->groupWidth, gItem->height() / gItem->groupHeight);
-					uint itemCountG = gItem->groupItemList.count();
+					int itemCountG = gItem->groupItemList.count();
 					if (itemCountG < moveWithFullOutlinesThreshold)
 					{
 						for (uint cg = 0; cg < itemCountG; cg++)

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22454&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Wed Mar 28 22:40:30 2018
@@ -5254,7 +5254,7 @@
 		resourceManager=new ResourceManager(this);
 		resourceManager->exec();
 		resourceManager->deleteLater();
-		resourceManager=0;
+		resourceManager=NULL;
 	}
 }
 

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22454&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp	(original)
+++ trunk/Scribus/scribus/ui/about.cpp	Wed Mar 28 22:40:30 2018
@@ -274,7 +274,7 @@
 
 
 
-QString About::trAuthorTitle(QString title)
+QString About::trAuthorTitle(const QString& title)
 {
 	QString result;
 	if ( title == "Development Team:" )
@@ -312,7 +312,7 @@
 	}
 	return result;
 }
-QString About::trTranslationTitle(QString title)
+QString About::trTranslationTitle(const QString& title)
 {
 	QString result;
 	if ( title == "Official Translations and Translators (in order of locale shortcode):" )
@@ -328,7 +328,7 @@
 }
 
 
-QString About::trLinksTitle(QString title)
+QString About::trLinksTitle(const QString& title)
 {
 	QString result;
 	if ( title == "Homepage" )
@@ -359,7 +359,7 @@
 * @param QString fileName the file to be parsed
 * @return QString the html table
 */
-QString About::parseAuthorFile(QString fileName)
+QString About::parseAuthorFile(const QString& fileName)
 {
 	QString result;
 	QString file;
@@ -448,7 +448,7 @@
 * @param QString fileName the file to be parsed
 * @return QString the html table
 */
-QString About::parseTranslationFile(QString fileName)
+QString About::parseTranslationFile(const QString& fileName)
 {
 	QString result;
 	QString file;
@@ -604,7 +604,7 @@
 * @param QString fileName the file to be parsed
 * @return QString the html table
 */
-QString About::parseLinksFile(QString fileName)
+QString About::parseLinksFile(const QString& fileName)
 {
 	QString result;
 	QString file;

Modified: trunk/Scribus/scribus/ui/about.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22454&path=/trunk/Scribus/scribus/ui/about.h
==============================================================================
--- trunk/Scribus/scribus/ui/about.h	(original)
+++ trunk/Scribus/scribus/ui/about.h	Wed Mar 28 22:40:30 2018
@@ -34,7 +34,7 @@
 	} AboutMode;
 
 	About( QWidget* parent, AboutMode mode = About::Default );
-	~About() {};
+	~About() {}
 	
 protected:
 	QLabel* pixmapLabel1;
@@ -62,15 +62,15 @@
 	QHBoxLayout* tabLayout_4;
 	QHBoxLayout* layout2;
 
-	bool         m_firstShow;
-	AboutMode    m_mode;
-	virtual void showEvent ( QShowEvent * event ); 
-    QString trAuthorTitle(QString title);
-    QString trTranslationTitle(QString title);
-    QString trLinksTitle(QString title);
-    QString parseAuthorFile(QString fileName);
-    QString parseTranslationFile(QString fileName);
-    QString parseLinksFile(QString fileName);
+	bool m_firstShow;
+	AboutMode m_mode;
+	virtual void showEvent(QShowEvent* event);
+	QString trAuthorTitle(const QString& title);
+	QString trTranslationTitle(const QString& title);
+	QString trLinksTitle(const QString& title);
+	QString parseAuthorFile(const QString& fileName);
+	QString parseTranslationFile(const QString& fileName);
+	QString parseLinksFile(const QString& fileName);
 
 protected slots:
 	void runUpdateCheck();




More information about the scribus-commit mailing list