Branch: master

989e3c1d 2019-05-24 14:28:08 Michele Calgaro
Adjusted to latest TQVariant::TQVariant(bool) function.

Signed-off-by: Michele Calgaro <michele.calgaro@...>
M pyuic2/domtool.cpp
M pyuic2/uic.cpp
M pyuic3/domtool.cpp
M pyuic3/form.cpp
M pyuic3/object.cpp
M pyuic3/uic.cpp
M sip/qt/qvariant.sip

pyuic2/domtool.cpp

diff --git a/pyuic2/domtool.cpp b/pyuic2/domtool.cpp
index 108844e..8a0cff2 100644
--- a/pyuic2/domtool.cpp
+++ b/pyuic2/domtool.cpp
@@ -165,7 +165,7 @@
 	v = TQVariant( e.firstChild().toText().data().toInt() );
     } else if ( e.tagName() == "bool" ) {
 	TQString t = e.firstChild().toText().data();
-	v = TQVariant( t == "true" || t == "1", 0 );
+	v = TQVariant( t == "true" || t == "1" );
     } else if ( e.tagName() == "pixmap" ) {
 	v = TQVariant( e.firstChild().toText().data() );
     } else if ( e.tagName() == "iconset" ) {

pyuic2/uic.cpp

diff --git a/pyuic2/uic.cpp b/pyuic2/uic.cpp
index 58db033..a140ae3 100644
--- a/pyuic2/uic.cpp
+++ b/pyuic2/uic.cpp
@@ -432,7 +432,7 @@
 		TQString page = createObjectImpl( n, objClass, "self" );
 		TQString label = DomTool::readAttribute( n, "title", "" ).toString();
 		out << indent << "self.addPage(" << page << ","<< trmacro << "(" << fixString( label ) << "))" << endl;
-		TQVariant def( FALSE, 0 );
+		TQVariant def( FALSE );
 		if ( DomTool::hasAttribute( n, "backEnabled" ) )
 		    out << indent << "self.setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ")" << endl;
 		if ( DomTool::hasAttribute( n, "nextEnabled" ) )

pyuic3/domtool.cpp

diff --git a/pyuic3/domtool.cpp b/pyuic3/domtool.cpp
index 74d024f..740088e 100644
--- a/pyuic3/domtool.cpp
+++ b/pyuic3/domtool.cpp
@@ -186,7 +186,7 @@
 	    v = TQVariant( e.firstChild().toText().data().toDouble() );
     } else if ( e.tagName() == "bool" ) {
 	TQString t = e.firstChild().toText().data();
-	v = TQVariant( t == "true" || t == "1", 0 );
+	v = TQVariant( t == "true" || t == "1" );
     } else if ( e.tagName() == "pixmap" ) {
 	v = TQVariant( e.firstChild().toText().data() );
     } else if ( e.tagName() == "iconset" ) {

pyuic3/form.cpp

diff --git a/pyuic3/form.cpp b/pyuic3/form.cpp
index 3ef0c04..df2636d 100644
--- a/pyuic3/form.cpp
+++ b/pyuic3/form.cpp
@@ -518,7 +518,7 @@
 		TQString label = DomTool::readAttribute( n, "title", "", comment ).toString();
 		out << indent << "self.addPage(" << page << ",TQString(\"\"))" << endl;
 		trout << trindent << "self.setTitle(" << page << ","<< trcall( label, comment ) << ")" << endl;
-		TQVariant def( FALSE, 0 );
+		TQVariant def( FALSE );
 		if ( DomTool::hasAttribute( n, "backEnabled" ) )
 		    out << indent << "self.setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ")" << endl;
 		if ( DomTool::hasAttribute( n, "nextEnabled" ) )

pyuic3/object.cpp

diff --git a/pyuic3/object.cpp b/pyuic3/object.cpp
index b4c443b..5ee2b73 100644
--- a/pyuic3/object.cpp
+++ b/pyuic3/object.cpp
@@ -492,7 +492,7 @@
 	if ( stdset )
 	    v = "%1";
 	else
-	    v = "TQVariant(%1,0)";
+	    v = "TQVariant(%1)";
 	v = v.arg( mkBool( e.firstChild().toText().data() ) );
     } else if ( e.tagName() == "pixmap" ) {
 	v = e.firstChild().toText().data();

pyuic3/uic.cpp

diff --git a/pyuic3/uic.cpp b/pyuic3/uic.cpp
index ea483a4..ac6af9b 100644
--- a/pyuic3/uic.cpp
+++ b/pyuic3/uic.cpp
@@ -315,7 +315,7 @@
 {
     TQDomElement n = getObjectProperty( e, "frameworkCode" );
     if ( n.attribute("name") == "frameworkCode" &&
-	 !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( TRUE, 0 ) ).toBool() )
+	 !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( TRUE ) ).toBool() )
 	return FALSE;
     return TRUE;
 }

sip/qt/qvariant.sip

diff --git a/sip/qt/qvariant.sip b/sip/qt/qvariant.sip
index 36d9eca..783418c 100644
--- a/sip/qt/qvariant.sip
+++ b/sip/qt/qvariant.sip
@@ -286,7 +286,7 @@
 //	TQVariant(TQ_LLONG);
 //	TQVariant(TQ_ULLONG);
 %End
-	TQVariant(bool,int);
+	TQVariant(bool /Constrained/);
 	TQVariant(double);
 %If (TQt_2_2_0 -)
 	TQVariant(TQSizePolicy);