summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-23 22:57:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-05-23 22:57:29 +0900
commitcfc76de73cecd5c569cbec280fe8aaa680956df3 (patch)
tree294561f215a17658f23eac128312542ab30721f1 /src
parente9567cacadf2fdc305f3ddbebce43ef395368c51 (diff)
downloadtqt3-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 'src')
-rw-r--r--src/kernel/ntqvariant.h3
-rw-r--r--src/kernel/qucomextra.cpp2
-rw-r--r--src/kernel/qvariant.cpp8
-rw-r--r--src/moc/moc.y10
-rw-r--r--src/moc/moc_yacc.cpp10
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
-rw-r--r--src/widgets/qdialogbuttons.cpp6
7 files changed, 17 insertions, 24 deletions
diff --git a/src/kernel/ntqvariant.h b/src/kernel/ntqvariant.h
index f794eeb1..1d5206d9 100644
--- a/src/kernel/ntqvariant.h
+++ b/src/kernel/ntqvariant.h
@@ -167,8 +167,7 @@ public:
TQVariant( uint );
TQVariant( TQ_LLONG );
TQVariant( TQ_ULLONG );
- // ### Problems on some compilers ?
- TQVariant( bool, int );
+ TQVariant( bool );
TQVariant( double );
TQVariant( TQSizePolicy );
diff --git a/src/kernel/qucomextra.cpp b/src/kernel/qucomextra.cpp
index 1bb064ca..53af84de 100644
--- a/src/kernel/qucomextra.cpp
+++ b/src/kernel/qucomextra.cpp
@@ -85,7 +85,7 @@ bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
else if ( isEqual( o->type, &static_QUType_int ) )
var = new TQVariant( static_QUType_int.get( o ) );
else if ( isEqual( o->type, &static_QUType_bool ) )
- var = new TQVariant( static_QUType_bool.get( o ), 42 );
+ var = new TQVariant( static_QUType_bool.get( o ) );
else if ( isEqual( o->type, &static_QUType_double ) )
var = new TQVariant( static_QUType_double.get( o ) );
else if ( isEqual( o->type, &static_QUType_charstar ) )
diff --git a/src/kernel/qvariant.cpp b/src/kernel/qvariant.cpp
index 6d734d6b..f7479fb6 100644
--- a/src/kernel/qvariant.cpp
+++ b/src/kernel/qvariant.cpp
@@ -877,12 +877,10 @@ TQVariant::TQVariant( TQ_ULLONG val )
}
/*!
- Constructs a new variant with a boolean value, \a val. The integer
- argument is a dummy, necessary for compatibility with some
- compilers.
+ Constructs a new variant with a boolean value, \a val.
*/
-TQVariant::TQVariant( bool val, int )
-{ // this is the comment that does NOT name said compiler.
+TQVariant::TQVariant( bool val )
+{
d = new Private;
d->typ = Bool;
d->value.b = val;
diff --git a/src/moc/moc.y b/src/moc/moc.y
index 49fcc61f..cfd8af0c 100644
--- a/src/moc/moc.y
+++ b/src/moc/moc.y
@@ -3441,16 +3441,14 @@ void generateClass() // generate C++ source code for a class
}
if ( it.current()->getfunc ) {
if ( it.current()->gspec == Property::Pointer )
- fprintf( out, "\tcase 1: if ( this->%s() ) *v = TQVariant( %s*%s()%s ); break;\n",
+ fprintf( out, "\tcase 1: if ( this->%s() ) *v = TQVariant( %s*%s() ); break;\n",
it.current()->getfunc->name.data(),
!isVariantType( it.current()->type ) ? "(int)" : "",
- it.current()->getfunc->name.data(),
- it.current()->type == "bool" ? ", 0" : "" );
+ it.current()->getfunc->name.data());
else
- fprintf( out, "\tcase 1: *v = TQVariant( %sthis->%s()%s ); break;\n",
+ fprintf( out, "\tcase 1: *v = TQVariant( %sthis->%s() ); break;\n",
!isVariantType( it.current()->type ) ? "(int)" : "",
- it.current()->getfunc->name.data(),
- it.current()->type == "bool" ? ", 0" : "" );
+ it.current()->getfunc->name.data());
} else if ( it.current()->override ) {
flag_propagate |= 1<< (1+1);
}
diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp
index f2a5c53b..f5c59d84 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -6316,16 +6316,14 @@ void generateClass() // generate C++ source code for a class
}
if ( it.current()->getfunc ) {
if ( it.current()->gspec == Property::Pointer )
- fprintf( out, "\tcase 1: if ( this->%s() ) *v = TQVariant( %s*%s()%s ); break;\n",
+ fprintf( out, "\tcase 1: if ( this->%s() ) *v = TQVariant( %s*%s() ); break;\n",
it.current()->getfunc->name.data(),
!isVariantType( it.current()->type ) ? "(int)" : "",
- it.current()->getfunc->name.data(),
- it.current()->type == "bool" ? ", 0" : "" );
+ it.current()->getfunc->name.data());
else
- fprintf( out, "\tcase 1: *v = TQVariant( %sthis->%s()%s ); break;\n",
+ fprintf( out, "\tcase 1: *v = TQVariant( %sthis->%s() ); break;\n",
!isVariantType( it.current()->type ) ? "(int)" : "",
- it.current()->getfunc->name.data(),
- it.current()->type == "bool" ? ", 0" : "" );
+ it.current()->getfunc->name.data());
} else if ( it.current()->override ) {
flag_propagate |= 1<< (1+1);
}
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 8e2c02ad..b6466e89 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -288,7 +288,7 @@ TQVariant TQPSQLResult::data( int i )
switch ( type ) {
case TQVariant::Bool:
{
- TQVariant b ( (bool)(val == "t"), 0 );
+ TQVariant b ( (bool)(val == "t") );
return ( b );
}
case TQVariant::String:
diff --git a/src/widgets/qdialogbuttons.cpp b/src/widgets/qdialogbuttons.cpp
index c248d2e0..fd3d5c4c 100644
--- a/src/widgets/qdialogbuttons.cpp
+++ b/src/widgets/qdialogbuttons.cpp
@@ -185,12 +185,12 @@ TQDialogButtons::setDefaultButton(Button button)
if(d->def != button) {
#ifndef TQT_NO_PROPERTIES
if(d->buttons.contains(d->def))
- d->buttons[d->def]->setProperty("default", TQVariant(FALSE,0));
+ d->buttons[d->def]->setProperty("default", TQVariant(false));
#endif
d->def = button;
#ifndef TQT_NO_PROPERTIES
if(d->buttons.contains(d->def))
- d->buttons[d->def]->setProperty("default", TQVariant(FALSE,0));
+ d->buttons[d->def]->setProperty("default", TQVariant(false));
#endif
}
}
@@ -413,7 +413,7 @@ TQDialogButtons::layoutButtons()
if(b == d->def) {
w->setFocus();
#ifndef TQT_NO_PROPERTIES
- w->setProperty("default", TQVariant(TRUE,0));
+ w->setProperty("default", TQVariant(true));
#endif
}
w->setEnabled(d->enabled & b);