View Issue Details

IDProjectCategoryView StatusLast Update
0008983ScribusGeneralpublic2010-04-13 19:15
Reportersharkcz Assigned Tofschmid  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.6 
Fixed in Version1.3.7svn 
Summary0008983: QStrings initialized with 0 instead of QString::null
DescriptionBuild of Scribus 1.3.6 on Fedora Rawhide with Qt 4.7 Technology Preview failed because there are 2 places where QStrings are initialized with 0 instead of QString::null and the compiler throws an error:

/builddir/build/BUILD/scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.cpp: In member function 'void BarcodeGenerator::bcComboChanged()':
/builddir/build/BUILD/scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.cpp:167: error: call of overloaded 'QString(int)' is ambiguous
/usr/include/QtCore/qstring.h:427: note: candidates are: QString::QString(const QByteArray&)
/usr/include/QtCore/qstring.h:425: note: QString::QString(const char*)
/usr/include/QtCore/qstring.h:726: note: QString::QString(const QString&)
/usr/include/QtCore/qstring.h:106: note: QString::QString(QChar)
/usr/include/QtCore/qstring.h:105: note: QString::QString(const QChar*)

All logs from the failed build are available at https://koji.fedoraproject.org/koji/taskinfo?taskID=2084177

This issue exists in both 1.3.6 and 1.5.0 branches, see the attached patch for a fix.
TagsNo tags attached.
Patch

Activities

sharkcz

2010-03-31 10:18

reporter  

scribus-1.3.6-qstring.patch (1,295 bytes)   
diff -up scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.h.qstring scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.h
--- scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.h.qstring	2010-03-30 15:38:04.000000000 +0200
+++ scribus-1.3.6/scribus/plugins/barcodegenerator/barcodegenerator.h	2010-03-30 15:39:46.000000000 +0200
@@ -100,7 +100,7 @@ class BarcodeGenerator : public QDialog
 		\param dpi optional DPI value. Default is 72 for preview.
 		\retval bool true on success.
 		*/
-		bool paintBarcode(QString fileName = 0, int dpi = 72);
+		bool paintBarcode(QString fileName = QString::null, int dpi = 72);
 		/*! \brief Create color preview.
 		Used for Color box feedback.
 		\param l A pointer to the sample QLabel
diff -up scribus-1.3.6/scribus/scribusdoc.cpp.qstring scribus-1.3.6/scribus/scribusdoc.cpp
--- scribus-1.3.6/scribus/scribusdoc.cpp.qstring	2010-03-31 11:41:08.000000000 +0200
+++ scribus-1.3.6/scribus/scribusdoc.cpp	2010-03-31 11:40:45.000000000 +0200
@@ -189,7 +189,7 @@ ScribusDoc::ScribusDoc() : UndoObject( t
 	pageSets(prefsData.pageSets),
 	PageSp(1), PageSpa(0),
 	currentPageLayout(0),
-	PageOri(0), m_pageSize(0),
+	PageOri(0), m_pageSize(QString::null),
 	FirstPnum(1),
 	useRaster(false),
 	PageColors(this, true),
scribus-1.3.6-qstring.patch (1,295 bytes)   

fschmid

2010-03-31 16:58

developer   ~0023632

For 1.5.0svn this issue should already be fixed, as i'm testing with Qt-4.7.0tp too.

sharkcz

2010-03-31 17:56

reporter   ~0023633

Oh yes, you are right, looks like I didn't update my svn-to-git snapshot of the 1.5.0 branch. But one question - is QString::null equal to "" (empty string) in the paintBarcode() method of the barcodegenerator plugin?

Issue History

Date Modified Username Field Change
2010-03-31 10:18 sharkcz New Issue
2010-03-31 10:18 sharkcz File Added: scribus-1.3.6-qstring.patch
2010-03-31 16:58 fschmid Note Added: 0023632
2010-03-31 17:56 sharkcz Note Added: 0023633
2010-03-31 20:08 fschmid Status new => resolved
2010-03-31 20:08 fschmid Fixed in Version => 1.3.7svn
2010-03-31 20:08 fschmid Resolution open => fixed
2010-03-31 20:08 fschmid Assigned To => fschmid
2010-04-13 19:15 cbradney Status resolved => closed