diff options
Diffstat (limited to 'kdevdesigner/designer/metadatabase.cpp')
-rw-r--r-- | kdevdesigner/designer/metadatabase.cpp | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 74d8ef33..2639639b 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -321,8 +321,8 @@ int MetaDataBase::spacing( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -352,9 +352,9 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) bool isInnerLayout = TRUE; TQWidget *widget = (TQWidget*)o; - if ( widget && !::tqqt_cast<TQLayoutWidget*>(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) + if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || + widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) isInnerLayout = FALSE; @@ -378,8 +378,8 @@ int MetaDataBase::margin( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -409,8 +409,8 @@ TQString MetaDataBase::resizeMode( TQObject *o ) if ( !o ) return TQString(); setupDataBase(); - if ( ::tqqt_cast<TQMainWindow*>(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( ::tqt_cast<TQMainWindow*>(o) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -440,15 +440,15 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString r->connections.append( conn ); if ( addCode ) { TQString rec = receiver->name(); - if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast<FormWindow*>(o) && sender ==( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; - if ( ::tqqt_cast<FormFile*>(o) ) + if ( ::tqt_cast<FormFile*>(o) ) ff = (FormFile*)o; - else if ( ::tqqt_cast<FormWindow*>(o) ) + else if ( ::tqt_cast<FormWindow*>(o) ) ff = ( (FormWindow*)o )->formFile(); ff->addConnection( sen, signal, rec, slot ); } @@ -468,17 +468,17 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr return; for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) { r->connections.remove( it ); break; } } - if ( ::tqqt_cast<FormWindow*>(o) ) { + if ( ::tqt_cast<FormWindow*>(o) ) { TQString rec = receiver->name(); - if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + if ( receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); } @@ -494,7 +494,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte return; } - if ( !::tqqt_cast<FormFile*>(o) ) + if ( !::tqt_cast<FormFile*>(o) ) return; FormFile *formfile = (FormFile*)o; @@ -514,8 +514,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender = formfile->project()->objectForFakeFormFile( formfile ); if ( !sender && senderName == "this" ) sender = formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ); if ( !sender ) continue; MetaDataBase::addConnection( formfile->formWindow() ? @@ -524,8 +524,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte sender, (*cit).signal.latin1(), formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), + formfile->formWindow()->mainContainer() : + formfile->project()->objectForFakeFormFile( formfile ), (*cit).slot.latin1(), FALSE ); } @@ -544,9 +544,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && + if ( conn.sender ==sender && conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.receiver ==receiver && conn.slot == slot ) return TRUE; } @@ -581,8 +581,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==sender && - TQT_BASE_OBJECT((*conn).receiver) ==receiver ) + if ( (*conn).sender ==sender && + (*conn).receiver ==receiver ) ret << *conn; } @@ -603,8 +603,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==object || - TQT_BASE_OBJECT((*conn).receiver) ==object ) + if ( (*conn).sender ==object || + (*conn).receiver ==object ) ret << *conn; } return ret; @@ -679,14 +679,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( slotList.find( slot ) != -1 ) return TRUE; - if ( ::tqqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + if ( ::tqt_cast<FormWindow*>(o) ) { + o = ( (FormWindow*)o )->mainContainer(); slotList = o->metaObject()->slotNames( TRUE ); if ( slotList.find( slot ) != -1 ) return TRUE; } - //if ( ::tqqt_cast<CustomWidget*>(o) ) { + //if ( ::tqt_cast<CustomWidget*>(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { @@ -909,14 +909,14 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( functionList.find( function ) != -1 ) return TRUE; - if ( ::tqqt_cast<FormWindow*>(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + if ( ::tqt_cast<FormWindow*>(o) ) { + o = ( (FormWindow*)o )->mainContainer(); functionList = o->metaObject()->slotNames( TRUE ); if ( functionList.find( function ) != -1 ) return TRUE; } - //if ( ::tqqt_cast<CustomWidget*>(o) ) { + //if ( ::tqt_cast<CustomWidget*>(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { @@ -1545,7 +1545,6 @@ void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) languageInterfaceManager = new TQPluginManager<LanguageInterface>( IID_Language, TQApplication::libraryPaths(), -// kapp->dirs()->resourceDirs("qtplugins"), plugDir ); langList = languageInterfaceManager->featureList(); |