summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/uilib/qwidgetfactory.cpp
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-23 20:11:33 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-23 20:11:33 +0000
commitf9c30e41d26594598abaa8315c4488b6c5ff38ea (patch)
tree0f3a5190aef92c865cb3f6a2304c093b949bc1b6 /kdevdesigner/uilib/qwidgetfactory.cpp
parent5e2135048c5de59f5351380653961b9a1e260d84 (diff)
downloadtdevelop-f9c30e41d26594598abaa8315c4488b6c5ff38ea.tar.gz
tdevelop-f9c30e41d26594598abaa8315c4488b6c5ff38ea.zip
[kdevelop] compatibility with QT_NO_ASCII_CAST and automoc
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1216512 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/uilib/qwidgetfactory.cpp')
-rw-r--r--kdevdesigner/uilib/qwidgetfactory.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp
index 2d40a7da..c9513043 100644
--- a/kdevdesigner/uilib/qwidgetfactory.cpp
+++ b/kdevdesigner/uilib/qwidgetfactory.cpp
@@ -177,9 +177,9 @@ static TQImage loadImageData( const TQString& format, ulong len, TQByteArray dat
dataTmp[3] = ( len & 0x000000ff );
TQByteArray baunzip = qUncompress( dataTmp );
len = baunzip.size();
- img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')) );
+ img.loadFromData( (const uchar*)baunzip.data(), len, format.left(format.find('.')).ascii() );
} else {
- img.loadFromData( (const uchar*)data.data(), data.size(), format );
+ img.loadFromData( (const uchar*)data.data(), data.size(), format.ascii() );
}
return img;
}
@@ -364,7 +364,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin();
it != widgetFactory->dbTables.end(); ++it ) {
- TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), "TQDataTable" );
+ TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), "TQDataTable" );
if ( !table )
continue;
if ( widgetFactory->noDatabaseWidgets.find( table->name() ) !=
@@ -391,8 +391,8 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge
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().ascii(), "TQLabel" );
+ TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), "TQWidget" );
if ( label && buddy )
label->setBuddy( buddy );
}
@@ -451,7 +451,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec
TQDomElement widget;
while ( !e.isNull() ) {
if ( e.tagName() == "class" ) {
- d->translationContext = e.firstChild().toText().data();
+ d->translationContext = e.firstChild().toText().data().ascii();
} else if ( e.tagName() == "widget" ) {
widget = e;
} else if ( e.tagName() == "pixmapinproject" ) {
@@ -1808,13 +1808,13 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) cons
void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
TQVariant value )
{
- int offset = obj->metaObject()->findProperty( prop, TRUE );
+ int offset = obj->metaObject()->findProperty( prop.ascii(), TRUE );
if ( offset != -1 ) {
if ( prop == "geometry" && obj == toplevel ) {
toplevel->resize( value.toRect().size() );
} else if ( prop == "accel" ) {
- obj->setProperty( prop, value.toKeySequence() );
+ obj->setProperty( prop.ascii(), value.toKeySequence() );
} else {
if ( value.type() == TQVariant::String ||
value.type() == TQVariant::CString ) {
@@ -1827,7 +1827,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
TQStringList::split( '|', value.asString() );
TQStringList::ConstIterator f = flagsStr.begin();
while ( f != flagsStr.end() ) {
- flagsCStr.append( *f );
+ flagsCStr.append( (*f).ascii() );
++f;
}
value = TQVariant( metaProp->keysToValue(flagsCStr) );
@@ -1837,7 +1837,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop,
}
}
}
- obj->setProperty( prop, value );
+ obj->setProperty( prop.ascii(), value );
}
} else {
if ( obj->isWidgetType() ) {
@@ -2068,12 +2068,12 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
while ( !n2.isNull() ) {
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
- if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2083,13 +2083,13 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
if ( !conn.sender )
conn.sender = findAction( name );
} else if ( n2.tagName() == "signal" ) {
- conn.signal = n2.firstChild().toText().data();
+ conn.signal = n2.firstChild().toText().data().ascii();
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
- if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
+ if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) {
conn.receiver = toplevel;
} else {
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2097,7 +2097,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
}
}
} else if ( n2.tagName() == "slot" ) {
- conn.slot = n2.firstChild().toText().data();
+ conn.slot = n2.firstChild().toText().data().ascii();
}
n2 = n2.nextSibling().toElement();
}
@@ -2159,7 +2159,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto
n = n.nextSibling().toElement();
continue;
}
- TQObject::connect( sender, s, receiver, s2 );
+ TQObject::connect( sender, s.ascii(), receiver, s2.ascii() );
}
n = n.nextSibling().toElement();
}
@@ -2172,7 +2172,7 @@ void TQWidgetFactory::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.ascii(), FALSE );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@@ -2466,7 +2466,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e )
Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
tb = new TQToolBar( TQString::null, mw, dock );
tb->setLabel( n.attribute( "label" ) );
- tb->setName( n.attribute( "name" ) );
+ tb->setName( n.attribute( "name" ).ascii() );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
@@ -2496,7 +2496,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e )
if ( n.tagName() == "item" ) {
TQPopupMenu *popup = new TQPopupMenu( mw );
loadPopupMenu( popup, n );
- popup->setName( n.attribute( "name" ) );
+ popup->setName( n.attribute( "name" ).ascii() );
mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) {
setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
@@ -2517,7 +2517,7 @@ void TQWidgetFactory::loadPopupMenu( TQPopupMenu *p, const TQDomElement &e )
TQDomElement n2 = n.nextSibling().toElement();
if ( n2.tagName() == "item") { // load submenu
TQPopupMenu *popup = new TQPopupMenu( mw );
- popup->setName( n2.attribute( "name" ) );
+ popup->setName( n2.attribute( "name" ).ascii() );
if ( a ) {
p->setAccel( a->accel(), p->insertItem( a->iconSet(),
translate( n2.attribute( "text" ).utf8().data() ),