Branch: master

845e845e 2019-05-27 05:39:31 Michele Calgaro
Adjusted to latest TQVariant::TQVariant(bool) function.

Signed-off-by: Michele Calgaro <michele.calgaro@...>
M kommander/editor/propertyeditor.cpp
M kommander/editor/widgetfactory.cpp
M kommander/factory/domtool.cpp
M kommander/factory/kommanderfactory.cpp

kommander/editor/propertyeditor.cpp

diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index f105a4e..40b4caf 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -1085,7 +1085,7 @@
 void PropertyBoolItem::toggle()
 {
     bool b = value().toBool();
-    setValue( TQVariant( !b, 0 ) );
+    setValue( TQVariant( !b ) );
     setValue();
 }
 
@@ -1139,8 +1139,8 @@
     if ( !comb )
 	return;
     setText( 1, combo()->currentText() );
-    bool b = combo()->currentItem() == 0 ? (bool)false : (bool)true;
-    PropertyItem::setValue( TQVariant( b, 0 ) );
+    bool b = combo()->currentItem() == 0 ? false : true;
+    PropertyItem::setValue( TQVariant( b ) );
     notifyValueChange();
 }
 
@@ -1790,13 +1790,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() ) );
     }
 }
 
@@ -3081,9 +3081,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" ) {
 	    ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
 	} else if ( i->name() == "layoutMargin" ) {

kommander/editor/widgetfactory.cpp

diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 15f9ad1..5908574 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -1679,13 +1679,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" ) {
 	if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
 	    return TQVariant( 0 );

kommander/factory/domtool.cpp

diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
index 40190ff..56a98a6 100644
--- a/kommander/factory/domtool.cpp
+++ b/kommander/factory/domtool.cpp
@@ -177,7 +177,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" ) {

kommander/factory/kommanderfactory.cpp

diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index eee18d4..8154943 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -788,7 +788,7 @@
 		if ( prop == "buddy" ) {
 		buddies.insert( obj->name(), v.toCString() );
 	    } else if ( prop == "frameworkCode" ) {
-		if ( !DomTool::elementToVariant( e, TQVariant( true, 0 ) ).toBool() ) {
+		if ( !DomTool::elementToVariant( e, TQVariant( true ) ).toBool() ) {
 		    noDatabaseWidgets << obj->name();
 		}
 	    } else if ( prop == "buttonGroupId" ) {