diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-05-23 22:57:29 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-05-23 22:57:29 +0900 |
commit | cfc76de73cecd5c569cbec280fe8aaa680956df3 (patch) | |
tree | 294561f215a17658f23eac128312542ab30721f1 /tools | |
parent | e9567cacadf2fdc305f3ddbebce43ef395368c51 (diff) | |
download | tqt3-cfc76de73cecd5c569cbec280fe8aaa680956df3.tar.gz tqt3-cfc76de73cecd5c569cbec280fe8aaa680956df3.zip |
Removed dummy int parameter from TQVariant(bool, int).
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/designer/designer/mainwindow.cpp | 8 | ||||
-rw-r--r-- | tools/designer/designer/propertyeditor.cpp | 16 | ||||
-rw-r--r-- | tools/designer/designer/widgetfactory.cpp | 4 | ||||
-rw-r--r-- | tools/designer/plugins/dlg/dlg2ui.cpp | 4 | ||||
-rw-r--r-- | tools/designer/plugins/glade/glade2ui.cpp | 20 | ||||
-rw-r--r-- | tools/designer/shared/domtool.cpp | 2 | ||||
-rw-r--r-- | tools/designer/uic/form.cpp | 2 | ||||
-rw-r--r-- | tools/designer/uic/object.cpp | 2 | ||||
-rw-r--r-- | tools/designer/uic/uic.cpp | 2 | ||||
-rw-r--r-- | tools/designer/uilib/qwidgetfactory.cpp | 2 |
10 files changed, 31 insertions, 31 deletions
diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index f80cf6026..5e4a4678a 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -1740,8 +1740,8 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid if ( oldDoWrap != doWrap ) { TQString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString::null, TQString::null ); + "wordwrap", TQVariant( oldDoWrap ), + TQVariant( doWrap ), TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); @@ -2647,8 +2647,8 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( oldDoWrap != doWrap ) { TQString pn( tr( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString::null, TQString::null ); + "wordwrap", TQVariant( oldDoWrap ), + TQVariant( doWrap ), TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index b3448a8d0..31908b3e0 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -1103,7 +1103,7 @@ PropertyBoolItem::~PropertyBoolItem() void PropertyBoolItem::toggle() { bool b = value().toBool(); - setValue( TQVariant( !b, 0 ) ); + setValue( TQVariant( !b ) ); setValue(); } @@ -1158,7 +1158,7 @@ void PropertyBoolItem::setValue() return; setText( 1, combo()->currentText() ); bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; - PropertyItem::setValue( TQVariant( b, 0 ) ); + PropertyItem::setValue( TQVariant( b ) ); notifyValueChange(); } @@ -1900,13 +1900,13 @@ void PropertyFontItem::initChildren() } else if ( item->name() == tr( "Point Size" ) ) item->setValue( val.toFont().pointSize() ); else if ( item->name() == tr( "Bold" ) ) - item->setValue( TQVariant( val.toFont().bold(), 0 ) ); + item->setValue( TQVariant( val.toFont().bold() ) ); else if ( item->name() == tr( "Italic" ) ) - item->setValue( TQVariant( val.toFont().italic(), 0 ) ); + item->setValue( TQVariant( val.toFont().italic() ) ); else if ( item->name() == tr( "Underline" ) ) - item->setValue( TQVariant( val.toFont().underline(), 0 ) ); + item->setValue( TQVariant( val.toFont().underline() ) ); else if ( item->name() == tr( "Strikeout" ) ) - item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); + item->setValue( TQVariant( val.toFont().strikeOut() ) ); } } @@ -3702,9 +3702,9 @@ void PropertyList::setPropertyValue( PropertyItem *i ) } 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( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) ); } else if ( i->name() == "layoutMargin" ) { diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index 53fa747c4..2bcf18865 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -1486,13 +1486,13 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) { 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 ); } diff --git a/tools/designer/plugins/dlg/dlg2ui.cpp b/tools/designer/plugins/dlg/dlg2ui.cpp index e44c285f2..23e18063e 100644 --- a/tools/designer/plugins/dlg/dlg2ui.cpp +++ b/tools/designer/plugins/dlg/dlg2ui.cpp @@ -718,7 +718,7 @@ void Dlg2Ui::emitWidgetBody( const TQDomElement& e, bool layouted ) if ( tagName == TQString("Style") ) { if ( getTextValue(n) == TQString("ReadWrite") ) emitProperty( TQString("editable"), - TQVariant(TRUE, 0) ); + TQVariant(true) ); } } else if ( parentTagName == TQString("DlgWidget") ) { if ( tagName == TQString("Name") ) { @@ -891,7 +891,7 @@ TQVariant Dlg2Ui::getValue( const TQDomElement& e, const TQString& tagName, if ( type == TQString("integer") ) { return getTextValue( e ).toInt(); } else if ( type == TQString("boolean") ) { - return TQVariant( isTrue(getTextValue(e)), 0 ); + return TQVariant( isTrue(getTextValue(e)) ); } else if ( type == TQString("double") ) { return getTextValue( e ).toDouble(); } else if ( type == TQString("qcstring") ) { diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp index 4d4eae25e..b1bbe9ca7 100644 --- a/tools/designer/plugins/glade/glade2ui.cpp +++ b/tools/designer/plugins/glade/glade2ui.cpp @@ -839,7 +839,7 @@ void Glade2Ui::emitPushButton( const TQString& text, const TQString& name ) emitProperty( TQString("name"), name.latin1() ); emitProperty( TQString("text"), text ); if ( name.contains(TQString("ok")) > 0 ) { - emitProperty( TQString("default"), TQVariant(TRUE, 0) ); + emitProperty( TQString("default"), TQVariant(true) ); } else if ( name.contains(TQString("help")) > 0 ) { emitProperty( TQString("accel"), (int) TQt::Key_F1 ); } @@ -1215,7 +1215,7 @@ void Glade2Ui::emitTQListViewColumns( const TQDomElement& qlistview ) } else if ( tagName == TQString("class") ) { TQString gtkClass = getTextValue( n ); if ( gtkClass.endsWith(TQString("Tree")) ) - emitProperty( TQString("rootIsDecorated"), TQVariant(TRUE, 0) ); + emitProperty( TQString("rootIsDecorated"), TQVariant(true) ); } else if ( tagName == TQString("selection_mode") ) { emitProperty( TQString("selectionMode"), gtk2qtSelectionMode(getTextValue(n)) ); @@ -1815,16 +1815,16 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, if ( !layouted && (x != 0 || y != 0 || width != 0 || height != 0) ) emitProperty( TQString("geometry"), TQRect(x, y, width, height) ); if ( gtkClass == TQString("GtkToggleButton") ) { - emitProperty( TQString("toggleButton"), TQVariant(TRUE, 0) ); + emitProperty( TQString("toggleButton"), TQVariant(true) ); if ( active ) - emitProperty( TQString("on"), TQVariant(TRUE, 0) ); + emitProperty( TQString("on"), TQVariant(true) ); } else { if ( active ) - emitProperty( TQString("checked"), TQVariant(TRUE, 0) ); + emitProperty( TQString("checked"), TQVariant(true) ); } if ( !editable ) - emitProperty( TQString("readOnly"), TQVariant(TRUE, 0) ); + emitProperty( TQString("readOnly"), TQVariant(true) ); if ( !focusTarget.isEmpty() ) emitProperty( TQString("buddy"), fixedName(focusTarget).latin1() ); @@ -1889,7 +1889,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, } if ( !showText ) emitProperty( TQString("percentageVisible"), - TQVariant(FALSE, 0) ); + TQVariant(false) ); if ( step != 1 ) emitProperty( TQString("lineStep"), step ); if ( tabPos.endsWith(TQString("_BOTTOM")) || @@ -1905,12 +1905,12 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, if ( !tooltip.isEmpty() ) emitProperty( TQString("toolTip"), tooltip ); if ( !valueInList ) - emitProperty( TQString("editable"), TQVariant(TRUE, 0) ); + emitProperty( TQString("editable"), TQVariant(true) ); if ( wrap && gtkClass == TQString("GtkSpinButton") ) - emitProperty( TQString("wrapping"), TQVariant(TRUE, 0) ); + emitProperty( TQString("wrapping"), TQVariant(true) ); if ( gtkClass.endsWith(TQString("Tree")) ) { - emitProperty( TQString("rootIsDecorated"), TQVariant(TRUE, 0) ); + emitProperty( TQString("rootIsDecorated"), TQVariant(true) ); } else if ( gtkOrientedWidget.exactMatch(gtkClass) ) { TQString s = ( gtkOrientedWidget.cap(1) == TQChar('H') ) ? TQString( "Horizontal" ) : TQString( "Vertical" ); diff --git a/tools/designer/shared/domtool.cpp b/tools/designer/shared/domtool.cpp index 4baf19412..499ee562f 100644 --- a/tools/designer/shared/domtool.cpp +++ b/tools/designer/shared/domtool.cpp @@ -199,7 +199,7 @@ TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& def 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" ) { diff --git a/tools/designer/uic/form.cpp b/tools/designer/uic/form.cpp index 5c564c9dd..198f2c089 100644 --- a/tools/designer/uic/form.cpp +++ b/tools/designer/uic/form.cpp @@ -1052,7 +1052,7 @@ void Uic::createFormImpl( const TQDomElement &e ) TQString label = DomTool::readAttribute( n, "title", "", comment ).toString(); out << indent << "addPage( " << page << ", TQString(\"\") );" << endl; trout << indent << "setTitle( " << page << ", " << trcall( label, comment ) << " );" << endl; - TQVariant def( FALSE, 0 ); + TQVariant def( false ); if ( DomTool::hasAttribute( n, "backEnabled" ) ) out << indent << "setBackEnabled( " << page << ", " << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << endl; if ( DomTool::hasAttribute( n, "nextEnabled" ) ) diff --git a/tools/designer/uic/object.cpp b/tools/designer/uic/object.cpp index 82aabee32..1306e9c06 100644 --- a/tools/designer/uic/object.cpp +++ b/tools/designer/uic/object.cpp @@ -537,7 +537,7 @@ TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, 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(); diff --git a/tools/designer/uic/uic.cpp b/tools/designer/uic/uic.cpp index 305f7133e..c38802714 100644 --- a/tools/designer/uic/uic.cpp +++ b/tools/designer/uic/uic.cpp @@ -263,7 +263,7 @@ bool Uic::isFrameworkCodeGenerated( const TQDomElement& e ) { 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; } diff --git a/tools/designer/uilib/qwidgetfactory.cpp b/tools/designer/uilib/qwidgetfactory.cpp index a0bc08523..6d9014469 100644 --- a/tools/designer/uilib/qwidgetfactory.cpp +++ b/tools/designer/uilib/qwidgetfactory.cpp @@ -637,7 +637,7 @@ void TQWidgetFactory::unpackVariant( const UibStrTable& strings, TQDataStream& i break; case TQVariant::Bool: in >> bit; - value = TQVariant( bit != 0, 0 ); + value = TQVariant( bit != 0 ); break; case TQVariant::Double: in >> value.asDouble(); |