summaryrefslogtreecommitdiffstats
path: root/kommander/factory/kommanderfactory.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2021-03-07 20:24:08 +0100
committergregory guy <[email protected]>2021-03-11 15:04:46 +0100
commit70defe5e6d9498c5c6011eee50c4dc506abebd61 (patch)
treec2d269ffeaf389637607efa6547ff8eb2d41cd45 /kommander/factory/kommanderfactory.cpp
parent4c43d1fbb66a296958ed1d0dbddf3f8ac4466130 (diff)
downloadtdewebdev-70defe5e6d9498c5c6011eee50c4dc506abebd61.tar.gz
tdewebdev-70defe5e6d9498c5c6011eee50c4dc506abebd61.zip
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed. Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'kommander/factory/kommanderfactory.cpp')
-rw-r--r--kommander/factory/kommanderfactory.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index cf624a6b..57737fb7 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -288,8 +288,8 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
}
for ( TQMap<TQString, TQString>::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) {
- TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key(), "TQLabel" );
- TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( *it, "TQWidget" );
+ TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().utf8(), "TQLabel" );
+ TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).utf8(), "TQWidget" );
if ( label && buddy )
label->setBuddy( buddy );
}
@@ -724,7 +724,7 @@ KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) co
void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+ const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop.latin1(), true ), true );
TQVariant defVariant;
if ( e.tagName() == "font" ) {
@@ -816,13 +816,13 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
v = TQPalette( p );
} else if ( e.tagName() == "enum" && p && p->isEnumType() ) {
TQString key( v.toString() );
- v = TQVariant( p->keyToValue( key ) );
+ v = TQVariant( p->keyToValue( key.utf8() ) );
} else if ( e.tagName() == "set" && p && p->isSetType() ) {
TQString keys( v.toString() );
TQStringList lst = TQStringList::split( '|', keys );
TQStrList l;
for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
- l.append( *it );
+ l.append( (*it).utf8() );
v = TQVariant( p->keysToValue( l ) );
}
@@ -833,7 +833,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
}
}
- obj->setProperty( prop, v );
+ obj->setProperty( prop.latin1(), v );
}
void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
@@ -920,7 +920,7 @@ static TQImage loadImageData( TQDomElement &n2 )
::uncompress( (uchar*) baunzip.data(), &len, (uchar*) ba, data.length()/2 );
img.loadFromData( (const uchar*)baunzip.data(), len, "XPM" );
} else {
- img.loadFromData( (const uchar*)ba, data.length() / 2, format );
+ img.loadFromData( (const uchar*)ba, data.length() / 2, format.utf8() );
}
delete [] ba;
@@ -1021,12 +1021,12 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
- if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ if ( name == "this" || name == toplevel->name() ) {
conn.sender = TQT_TQOBJECT(toplevel);
} else {
if ( name == "this" )
name = toplevel->name();
- TQObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name.utf8(), false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -1036,13 +1036,13 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
if ( !conn.sender )
conn.sender = findAction( name );
} else if ( n2.tagName() == "signal" ) {
- conn.signal = n2.firstChild().toText().data();
+ conn.signal = n2.firstChild().toText().data().utf8();
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
- if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ if ( name == "this" || name == toplevel->name() ) {
conn.receiver = TQT_TQOBJECT(toplevel);
} else {
- TQObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name.utf8(), false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -1050,7 +1050,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
}
}
} else if ( n2.tagName() == "slot" ) {
- conn.slot = n2.firstChild().toText().data();
+ conn.slot = n2.firstChild().toText().data().utf8();
}
n2 = n2.nextSibling().toElement();
}
@@ -1108,7 +1108,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
n = n.nextSibling().toElement();
continue;
}
- TQObject::connect( sender, s, receiver, s2 );
+ TQObject::connect( sender, s.utf8(), receiver, s2.utf8() );
} else {
EventFunction ef = eventMap[ conn.sender ];
ef.events.append( conn.signal );
@@ -1130,7 +1130,7 @@ void KommanderFactory::loadTabOrder( const TQDomElement &e )
while ( !n.isNull() ) {
if ( n.tagName() == "tabstop" ) {
TQString name = n.firstChild().toText().data();
- TQObjectList *l = toplevel->queryList( 0, name, false );
+ TQObjectList *l = toplevel->queryList( 0, name.utf8(), false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@@ -1404,7 +1404,7 @@ void KommanderFactory::loadToolBars( const TQDomElement &e )
TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
tb = new TQToolBar( TQString(), mw, dock );
tb->setLabel( n.attribute( "label" ) );
- tb->setName( n.attribute( "name" ) );
+ tb->setName( n.attribute( "name" ).utf8() );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
@@ -1433,7 +1433,7 @@ void KommanderFactory::loadMenuBar( const TQDomElement &e )
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
TQPopupMenu *popup = new TQPopupMenu( mw );
- popup->setName( n.attribute( "name" ) );
+ popup->setName( n.attribute( "name" ).utf8() );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {