diff options
Diffstat (limited to 'kdevdesigner/uilib/qwidgetfactory.cpp')
-rw-r--r-- | kdevdesigner/uilib/qwidgetfactory.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index a79687a8..9d0d3656 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -356,10 +356,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge continue; if ( cit.key()->inherits( "QDesignerDataBrowser2" ) ) ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); else if ( cit.key()->inherits( "QDesignerDataView2" ) ) ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, - TQT_TQOBJECT(cit.key()), *(*cit).dbControls ); + cit.key(), *(*cit).dbControls ); } for ( TQMap<TQString, TQStringList>::Iterator it = widgetFactory->dbTables.begin(); @@ -787,7 +787,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQListView *listView = 0; if ( parent != 0 && parent->inherits("TQListView") ) - parent = TQT_TQOBJECT((TQListView *) parent); + parent = (TQListView *) parent; TQListViewItem *item = 0; if ( listView != 0 ) { if ( parentItem == 0 ) { @@ -946,22 +946,22 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, } else { layout = createLayout( parentWidget, parentLayout, type ); } - obj = TQT_TQOBJECT(layout); + obj = layout; } else if ( className == "TQMenuBar" ) { unpackCString( strings, in, className ); widget = ((TQMainWindow *) parent)->menuBar(); - obj = TQT_TQOBJECT(widget); + obj = widget; } else if ( className == "TQToolBar" ) { TQ_UINT8 dock; in >> dock; unpackCString( strings, in, className ); widget = new TQToolBar( TQString(), (TQMainWindow *) parent, (TQt::Dock) dock ); - obj = TQT_TQOBJECT(widget); + obj = widget; } else if ( className == "TQWidget" ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); - obj = TQT_TQOBJECT(widget); + obj = widget; } if ( widget != 0 ) @@ -1208,7 +1208,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, switch ( blockType ) { case Block_Actions: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel) ); + inputObject( objects, numObjects, strings, in, toplevel, toplevel ); break; case Block_Buddies: { @@ -1300,7 +1300,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, } break; case Block_Menubar: - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(toplevel), + inputObject( objects, numObjects, strings, in, toplevel, toplevel, "TQMenuBar" ); break; case Block_Slots: @@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - TQT_TQOBJECT(toplevel), "TQToolBar" ); + toplevel, "TQToolBar" ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1344,7 +1344,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, break; case Block_Widget: toplevel = (TQWidget *) - inputObject( objects, numObjects, strings, in, toplevel, TQT_TQOBJECT(parent), + inputObject( objects, numObjects, strings, in, toplevel, parent, "TQWidget" ); if ( toplevel != 0 ) toplevel->setName( name ); @@ -1597,7 +1597,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget // hide layout widgets w = parent; } else { - obj = TQT_TQOBJECT(TQWidgetFactory::createWidget( className, parent, 0 )); + obj = TQWidgetFactory::createWidget( className, parent, 0 ); if ( !obj ) return 0; w = (TQWidget*)obj; @@ -1647,7 +1647,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::HBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -1659,7 +1659,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::Grid, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -1671,7 +1671,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget layout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); else layout = createLayout( w, layout, TQWidgetFactory::VBox, isTQLayoutWidget ); - obj = TQT_TQOBJECT(layout); + obj = layout; n = n.firstChild().toElement(); if ( parentLayout && parentLayout->inherits( "TQGridLayout" ) ) ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, @@ -2069,7 +2069,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto if ( n2.tagName() == "sender" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); + conn.sender = toplevel; } else { if ( name == "this" ) name = toplevel->name(); @@ -2087,7 +2087,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto } else if ( n2.tagName() == "receiver" ) { TQString name = n2.firstChild().toText().data(); if ( name == "this" || qstrcmp( toplevel->name(), name.ascii() ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); + conn.receiver = toplevel; } else { TQObjectList *l = toplevel->queryList( 0, name.ascii(), FALSE ); if ( l ) { @@ -2113,7 +2113,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQObject *sender = 0, *receiver = 0; TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { - sender = TQT_TQOBJECT(toplevel); + sender = toplevel; } else { if ( !l || !l->first() ) { delete l; @@ -2127,7 +2127,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto sender = findAction( conn.sender->name() ); if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { - receiver = TQT_TQOBJECT(toplevel); + receiver = toplevel; } else { l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); if ( !l || !l->first() ) { @@ -2448,9 +2448,9 @@ void TQWidgetFactory::loadActions( const TQDomElement &e ) TQDomElement n = e.firstChild().toElement(); while ( !n.isNull() ) { if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(toplevel), n ); + loadChildAction( toplevel, n ); } n = n.nextSibling().toElement(); } @@ -2478,7 +2478,7 @@ void TQWidgetFactory::loadToolBars( const TQDomElement &e ) } else if ( n2.tagName() == "widget" ) { (void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", "TQWidget" ) ); } else if ( n2.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); } @@ -2499,7 +2499,7 @@ void TQWidgetFactory::loadMenuBar( const TQDomElement &e ) popup->setName( n.attribute( "name" ).ascii() ); mb->insertItem( translate( n.attribute( "text" ) ), popup ); } else if ( n.tagName() == "property" ) { - setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() ); } else if ( n.tagName() == "separator" ) { mb->insertSeparator(); } |