Branch: master

5fcb1d91 2019-05-26 15:01:21 Slávek Banko
Adjusted to latest TQVariant::TQVariant(bool) function.

Signed-off-by: Slávek Banko <slavek.banko@...>
M kdevdesigner/designer/mainwindow.cpp
M kdevdesigner/designer/propertyeditor.cpp
M kdevdesigner/designer/widgetfactory.cpp
M kdevdesigner/shared/domtool.cpp
M kdevdesigner/uilib/qwidgetfactory.cpp

kdevdesigner/designer/mainwindow.cpp

diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp
index 3d90053..4caaab4 100644
--- a/kdevdesigner/designer/mainwindow.cpp
+++ b/kdevdesigner/designer/mainwindow.cpp
@@ -1739,8 +1739,8 @@
 	    if ( oldDoWrap != doWrap ) {
 		TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
 		SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
-								  "wordwrap", TQVariant( oldDoWrap, 0 ),
-								  TQVariant( doWrap, 0 ), TQString(), TQString() );
+								  "wordwrap", TQVariant( oldDoWrap ),
+								  TQVariant( doWrap ), TQString(), TQString() );
 		cmd->execute();
 		formWindow()->commandHistory()->addCommand( cmd );
 		MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );
@@ -2642,8 +2642,8 @@
 	    if ( oldDoWrap != doWrap ) {
 		TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
 		SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
-								  "wordwrap", TQVariant( oldDoWrap, 0 ),
-								  TQVariant( doWrap, 0 ), TQString(), TQString() );
+								  "wordwrap", TQVariant( oldDoWrap ),
+								  TQVariant( doWrap ), TQString(), TQString() );
 		cmd->execute();
 		formWindow()->commandHistory()->addCommand( cmd );
 		MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );

kdevdesigner/designer/propertyeditor.cpp

diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index 8397fc2..10fd4aa 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -1104,7 +1104,7 @@
 void PropertyBoolItem::toggle()
 {
     bool b = value().toBool();
-    setValue( TQVariant( !b, 0 ) );
+    setValue( TQVariant( !b ) );
     setValue();
 }
 
@@ -1159,7 +1159,7 @@
 	return;
     setText( 1, combo()->currentText() );
     bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
-    PropertyItem::setValue( TQVariant( b, 0 ) );
+    PropertyItem::setValue( TQVariant( b ) );
     notifyValueChange();
 }
 
@@ -1901,13 +1901,13 @@
 	} else if ( item->name() == i18n( "Point Size" ) )
 	    item->setValue( val.toFont().pointSize() );
 	else if ( item->name() == i18n( "Bold" ) )
-	    item->setValue( TQVariant( val.toFont().bold(), 0 ) );
+	    item->setValue( TQVariant( val.toFont().bold() ) );
 	else if ( item->name() == i18n( "Italic" ) )
-	    item->setValue( TQVariant( val.toFont().italic(), 0 ) );
+	    item->setValue( TQVariant( val.toFont().italic() ) );
 	else if ( item->name() == i18n( "Underline" ) )
-	    item->setValue( TQVariant( val.toFont().underline(), 0 ) );
+	    item->setValue( TQVariant( val.toFont().underline() ) );
 	else if ( item->name() == i18n( "Strikeout" ) )
-	    item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) );
+	    item->setValue( TQVariant( val.toFont().strikeOut() ) );
     }
 }
 
@@ -3712,9 +3712,9 @@
 	} else if ( i->name() == "wordwrap" ) {
 	    int align = editor->widget()->property( "alignment" ).toInt();
 	    if ( align & WordBreak )
-		i->setValue( TQVariant( TRUE, 0 ) );
+		i->setValue( TQVariant( true ) );
 	    else
-		i->setValue( TQVariant( FALSE, 0 ) );
+		i->setValue( TQVariant( false ) );
 	} else if ( i->name() == "layoutSpacing" ) {
 	    ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) ));
 	} else if ( i->name() == "layoutMargin" ) {

kdevdesigner/designer/widgetfactory.cpp

diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp
index 9d04535..9423b6a 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -1480,13 +1480,13 @@
 {
     if ( propName == "wordwrap" ) {
 	int v = defaultValue( w, "alignment" ).toInt();
-	return TQVariant( ( v & WordBreak ) == WordBreak, 0 );
+	return TQVariant( ( v & WordBreak ) == WordBreak );
     } else if ( propName == "toolTip" || propName == "whatsThis" ) {
 	return TQVariant( TQString::fromLatin1( "" ) );
     } else if ( w->inherits( "CustomWidget" ) ) {
 	return TQVariant();
     } else if ( propName == "frameworkCode" ) {
-	return TQVariant( TRUE, 0 );
+	return TQVariant( true );
     } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) {
 	return TQVariant( -1 );
     }

kdevdesigner/shared/domtool.cpp

diff --git a/kdevdesigner/shared/domtool.cpp b/kdevdesigner/shared/domtool.cpp
index f8ed4ec..ec79ffa 100644
--- a/kdevdesigner/shared/domtool.cpp
+++ b/kdevdesigner/shared/domtool.cpp
@@ -192,7 +192,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" ) {

kdevdesigner/uil

diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index 5664961..c431253 100644
--- a/kdevdesigner/uilib/qwidgetfactory.cpp
+++ b/kdevdesigner/uilib/qwidgetfactory.cpp
@@ -626,7 +626,7 @@
 	break;
     case TQVariant::Bool:
 	in >> bit;
-	value = TQVariant( bit != 0, 0 );
+	value = TQVariant( bit != 0 );
 	break;
     case TQVariant::Double:
 	in >> value.asDouble();