summaryrefslogtreecommitdiffstats
path: root/kommander/factory
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/factory')
-rw-r--r--kommander/factory/domtool.cpp2
-rw-r--r--kommander/factory/kommanderfactory.cpp34
2 files changed, 18 insertions, 18 deletions
diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
index 56a98a69..587b4a24 100644
--- a/kommander/factory/domtool.cpp
+++ b/kommander/factory/domtool.cpp
@@ -169,7 +169,7 @@ TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& def
if ( n.tagName() == "comment" )
comment = n.firstChild().toText().data();
} else if ( e.tagName() == "cstring" ) {
- v = TQVariant( TQCString( e.firstChild().toText().data() ) );
+ v = TQVariant( e.firstChild().toText().data().utf8() );
} else if ( e.tagName() == "number" ) {
bool ok = true;
v = TQVariant( e.firstChild().toText().data().toInt( &ok ) );
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" ) {