Adjusted to latest TQVariant::TQVariant(bool) function.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/34/head
Michele Calgaro 6 years ago
parent 080948356f
commit 352c8f6a21
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -339,7 +339,7 @@ void marshall( TQDataStream &arg, QCStringList args, uint &i, TQString type )
int tqRectKeywordLength = strlen(TQRECT_OBJECT_NAME_STRING); int tqRectKeywordLength = strlen(TQRECT_OBJECT_NAME_STRING);
int tqColorKeywordLength = strlen(TQCOLOR_OBJECT_NAME_STRING); int tqColorKeywordLength = strlen(TQCOLOR_OBJECT_NAME_STRING);
if ( s == "true" || s == "false" ) { if ( s == "true" || s == "false" ) {
arg << TQVariant( mkBool( s ), 42 ); arg << TQVariant( mkBool( s ) );
} }
else if ( s.left( 4 ) == "int(" ) { else if ( s.left( 4 ) == "int(" ) {
arg << TQVariant( s.mid(4, s.length()-5).toInt() ); arg << TQVariant( s.mid(4, s.length()-5).toInt() );

@ -230,7 +230,7 @@ bool KDCOPPropertyProxy::processPropertyRequest( const TQCString &fun, const TQB
{ {
TQ_INT8 v; TQ_INT8 v;
stream >> v; stream >> v;
prop = TQVariant( static_cast<bool>( v ), 1 ); prop = TQVariant( static_cast<bool>( v ) );
} }
break; break;
DEMARSHAL( Double, double ) DEMARSHAL( Double, double )

@ -417,7 +417,7 @@ TQVariant TDEConfigBase::readPropertyEntry( const char *pKey,
case TQVariant::ULongLong: case TQVariant::ULongLong:
return TQVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) ); return TQVariant( readUnsignedNum64Entry( pKey, aDefault.toULongLong() ) );
case TQVariant::Bool: case TQVariant::Bool:
return TQVariant( readBoolEntry( pKey, aDefault.toBool() ), 0 ); return TQVariant( readBoolEntry( pKey, aDefault.toBool() ) );
case TQVariant::Double: case TQVariant::Double:
return TQVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) ); return TQVariant( readDoubleNumEntry( pKey, aDefault.toDouble() ) );
case TQVariant::DateTime: case TQVariant::DateTime:

@ -161,7 +161,7 @@ void TDEConfigSkeleton::ItemBool::setProperty(const TQVariant & p)
TQVariant TDEConfigSkeleton::ItemBool::property() const TQVariant TDEConfigSkeleton::ItemBool::property() const
{ {
return TQVariant( mReference, 42 /* dummy */ ); return TQVariant( mReference );
} }

@ -328,7 +328,7 @@ TQVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
TQVariant res; TQVariant res;
switch (val.type()) { switch (val.type()) {
case BooleanType: case BooleanType:
res = TQVariant(val.toBoolean(exec), 0); res = TQVariant(val.toBoolean(exec));
break; break;
case NumberType: case NumberType:
res = TQVariant(val.toNumber(exec)); res = TQVariant(val.toNumber(exec));

@ -862,7 +862,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (dontShowAgain) { if (dontShowAgain) {
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();
TDEConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings")); TDEConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings"));
config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0)); config->writeEntry("ReportJavaScriptErrors",TQVariant(false));
config->sync(); config->sync();
TQByteArray data; TQByteArray data;
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data ); kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );

@ -388,7 +388,7 @@ void KMimeType::init( KDesktopFile * config )
// Read the X-TDE-AutoEmbed setting and store it in the properties map // Read the X-TDE-AutoEmbed setting and store it in the properties map
TQString XKDEAutoEmbed = TQString::fromLatin1("X-TDE-AutoEmbed"); TQString XKDEAutoEmbed = TQString::fromLatin1("X-TDE-AutoEmbed");
if ( config->hasKey( XKDEAutoEmbed ) ) if ( config->hasKey( XKDEAutoEmbed ) )
m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ), 0 ) ); m_mapProps.insert( XKDEAutoEmbed, TQVariant( config->readBoolEntry( XKDEAutoEmbed ) ) );
TQString XKDEText = TQString::fromLatin1("X-TDE-text"); TQString XKDEText = TQString::fromLatin1("X-TDE-text");
if ( config->hasKey( XKDEText ) ) if ( config->hasKey( XKDEText ) )

@ -620,7 +620,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const
} }
if (t == TQVariant::Bool) if (t == TQVariant::Bool)
{ {
return TQVariant((bool)val, 1); return TQVariant((bool)val);
} }
return TQVariant(val); return TQVariant(val);
} }

Loading…
Cancel
Save