From 676a13490dc7163e5c99a0f39094a2a4148d3963 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 26 Nov 2023 02:33:14 +0900 Subject: [PATCH] Replaced various '#define' with actual strings - part 4 Signed-off-by: Michele Calgaro --- buildtools/autotools/autotoolsaction.cpp | 4 +- kdevdesigner/designer/actiondnd.cpp | 40 +-- kdevdesigner/designer/actiondnd.h | 6 +- kdevdesigner/designer/actioneditorimpl.cpp | 14 +- kdevdesigner/designer/actionlistview.cpp | 8 +- kdevdesigner/designer/command.cpp | 34 +-- kdevdesigner/designer/connectionitems.cpp | 24 +- kdevdesigner/designer/designerappiface.cpp | 18 +- kdevdesigner/designer/formwindow.cpp | 40 +-- kdevdesigner/designer/hierarchyview.cpp | 72 ++--- kdevdesigner/designer/layout.cpp | 18 +- kdevdesigner/designer/mainwindow.cpp | 262 +++++++++--------- kdevdesigner/designer/mainwindowactions.cpp | 44 +-- kdevdesigner/designer/menubareditor.cpp | 2 +- kdevdesigner/designer/metadatabase.cpp | 30 +- kdevdesigner/designer/multilineeditorimpl.cpp | 2 +- kdevdesigner/designer/popupmenueditor.cpp | 36 +-- kdevdesigner/designer/project.cpp | 6 +- kdevdesigner/designer/propertyeditor.cpp | 72 ++--- kdevdesigner/designer/resource.cpp | 108 ++++---- kdevdesigner/designer/sourceeditor.cpp | 10 +- kdevdesigner/designer/tableeditorimpl.cpp | 10 +- kdevdesigner/designer/widgetaction.cpp | 2 +- kdevdesigner/designer/widgetfactory.cpp | 238 ++++++++-------- kdevdesigner/interfaces/widgetinterface.h | 2 +- .../plugins/languageinterfaceimpl.cpp | 2 +- .../app_templates/opieapplet/simpleimpl.cpp | 2 +- .../app_templates/opieinput/simpleimpl.cpp | 2 +- .../cpp/app_templates/opiemenu/simpleimpl.cpp | 2 +- .../opietoday/examplepluginimpl.cpp | 2 +- 30 files changed, 556 insertions(+), 556 deletions(-) diff --git a/buildtools/autotools/autotoolsaction.cpp b/buildtools/autotools/autotoolsaction.cpp index 820c4bd9..c520a3de 100644 --- a/buildtools/autotools/autotoolsaction.cpp +++ b/buildtools/autotools/autotoolsaction.cpp @@ -107,7 +107,7 @@ int AutoToolsAction::plug( TQWidget* w, int index ) if (kapp && !kapp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast( w ) ) + if ( ::tqt_cast( w ) ) { TQToolButton* tb = static_cast( w ); connect( tb, TQT_SIGNAL( clicked() ), this, TQT_SLOT( activate() ) ); @@ -145,7 +145,7 @@ void AutoToolsAction::updateEnabled( int i ) { TQWidget* w = container( i ); - if ( ::tqqt_cast( w ) ) + if ( ::tqt_cast( w ) ) static_cast( w )->setEnabled( isEnabled() ); else TDEAction::updateEnabled( i ) ; diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 9539a372..071845c9 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -105,7 +105,7 @@ bool QDesignerAction::addTo( TQWidget *w ) if ( !widgetToInsert ) return TQAction::addTo( w ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return FALSE; widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); @@ -184,11 +184,11 @@ QSeparatorAction::QSeparatorAction( TQObject *parent ) bool QSeparatorAction::addTo( TQWidget *w ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { TQToolBar *tb = (TQToolBar*)w; wid = new QDesignerToolBarSeparator( tb->orientation(), tb ); return TRUE; - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { idx = ( (TQPopupMenu*)w )->count(); ( (TQPopupMenu*)w )->insertSeparator( idx ); return TRUE; @@ -198,10 +198,10 @@ bool QSeparatorAction::addTo( TQWidget *w ) bool QSeparatorAction::removeFrom( TQWidget *w ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { delete wid; return TRUE; - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { ( (TQPopupMenu*)w )->removeItemAt( idx ); return TRUE; } @@ -250,7 +250,7 @@ void QDesignerToolBar::findFormWindow() { TQWidget *w = this; while ( w ) { - formWindow = ::tqqt_cast(w); + formWindow = ::tqt_cast(w); if ( formWindow ) break; w = w->parentWidget(); @@ -261,10 +261,10 @@ void QDesignerToolBar::addAction( TQAction *a ) { actionList.append( a ); connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) ); - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); - } else if ( ::tqqt_cast(a) ) { + } else if ( ::tqt_cast(a) ) { ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); } else { @@ -275,7 +275,7 @@ void QDesignerToolBar::addAction( TQAction *a ) static void fixObject( TQObject *&o ) { - while ( o && o->parent() && !::tqqt_cast(o->parent()) ) + while ( o && o->parent() && !::tqt_cast(o->parent()) ) o = o->parent(); } @@ -393,7 +393,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject * const int ID_SEP = 2; const int ID_DELTOOLBAR = 3; TQMap::Iterator it = actionMap.find( (TQWidget*)o ); - if ( it != actionMap.end() && ::tqqt_cast(*it) ) + if ( it != actionMap.end() && ::tqt_cast(*it) ) menu.insertItem( i18n( "Delete Separator" ), ID_DELETE ); else menu.insertItem( i18n( "Delete Item" ), ID_DELETE ); @@ -494,11 +494,11 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) TQApplication::sendPostedEvents(); adjustSize(); - TQString type = ::tqqt_cast(a) ? TQString( "application/x-designer-actiongroup" ) : - ::tqqt_cast(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); + TQString type = ::tqt_cast(a) ? TQString( "application/x-designer-actiongroup" ) : + ::tqt_cast(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); TQStoredDrag *drag = new ActionDrag( type, a, this ); drag->setPixmap( a->iconSet().pixmap() ); - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) ) formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE ); } @@ -555,11 +555,11 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e ) if ( e->provides( "application/x-designer-actions" ) || e->provides( "application/x-designer-separator" ) ) { if ( e->provides( "application/x-designer-actions" ) ) - a = ::tqqt_cast(ActionDrag::action()); + a = ::tqt_cast(ActionDrag::action()); else - a = ::tqqt_cast(ActionDrag::action()); + a = ::tqt_cast(ActionDrag::action()); } else { - a = ::tqqt_cast(ActionDrag::action()); + a = ::tqt_cast(ActionDrag::action()); } if ( actionList.findRef( a ) != -1 ) { @@ -588,14 +588,14 @@ void QDesignerToolBar::reInsert() clear(); for ( a = actionList.first(); a; a = actionList.next() ) { a->addTo( this ); - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a ); if ( ( (QDesignerActionGroup*)a )->widget() ) ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast(a) ) { + } else if ( ::tqt_cast(a) ) { actionMap.insert( ( (QDesignerAction*)a )->widget(), a ); ( (QDesignerAction*)a )->widget()->installEventFilter( this ); - } else if ( ::tqqt_cast(a) ) { + } else if ( ::tqt_cast(a) ) { actionMap.insert( ( (QSeparatorAction*)a )->widget(), a ); ( (QSeparatorAction*)a )->widget()->installEventFilter( this ); } @@ -709,7 +709,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p ) void QDesignerToolBar::clear() { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast(a) ) + if ( ::tqt_cast(a) ) ( (QDesignerAction*)a )->remove(); } TQToolBar::clear(); diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h index 62166ffe..ae8d8df0 100644 --- a/kdevdesigner/designer/actiondnd.h +++ b/kdevdesigner/designer/actiondnd.h @@ -86,7 +86,7 @@ class QDesignerActionGroup : public TQActionGroup public: QDesignerActionGroup( TQObject *parent ) - : TQActionGroup( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } + : TQActionGroup( ::tqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } void init(); @@ -122,9 +122,9 @@ class QDesignerAction : public TQAction public: QDesignerAction( TQObject *parent ) - : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } + : TQAction( ::tqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } QDesignerAction( TQWidget *w, TQObject *parent ) - : TQAction( ::tqqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } + : TQAction( ::tqt_cast(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } void init(); diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp index 294507a9..a08edc67 100644 --- a/kdevdesigner/designer/actioneditorimpl.cpp +++ b/kdevdesigner/designer/actioneditorimpl.cpp @@ -149,7 +149,7 @@ void ActionEditor::newAction() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::tqqt_cast(actionParent->actionGroup()) ) + if ( !::tqt_cast(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -185,7 +185,7 @@ void ActionEditor::newActionGroup() { ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); if ( actionParent ) { - if ( !::tqqt_cast(actionParent->actionGroup()) ) + if ( !::tqt_cast(actionParent->actionGroup()) ) actionParent = (ActionItem*)actionParent->parent(); } @@ -225,13 +225,13 @@ void ActionEditor::setFormWindow( FormWindow *fw ) listActions->clear(); formWindow = fw; if ( !formWindow || - !::tqqt_cast(formWindow->mainContainer()) ) { + !::tqt_cast(formWindow->mainContainer()) ) { setEnabled( FALSE ); } else { setEnabled( TRUE ); for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { ActionItem *i = 0; - if ( ::tqqt_cast(a->parent()) ) + if ( ::tqt_cast(a->parent()) ) continue; i = new ActionItem( listActions, a ); i->setText( 0, a->name() ); @@ -241,7 +241,7 @@ void ActionEditor::setFormWindow( FormWindow *fw ) this, TQT_SLOT( removeConnections( TQObject * ) ) ); TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( removeConnections( TQObject* ) ) ); - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { insertChildActions( i ); } } @@ -261,7 +261,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast(o) ) + if ( !::tqt_cast(o) ) continue; TQAction *a = (TQAction*)o; ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); @@ -273,7 +273,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) this, TQT_SLOT( removeConnections( TQObject * ) ) ); TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( removeConnections( TQObject * ) ) ); - if ( ::tqqt_cast(a) ) + if ( ::tqt_cast(a) ) insertChildActions( i2 ); } } diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp index 3e8c95c2..21a1dc6d 100644 --- a/kdevdesigner/designer/actionlistview.cpp +++ b/kdevdesigner/designer/actionlistview.cpp @@ -43,18 +43,18 @@ ActionListView::ActionListView( TQWidget *parent, const char *name ) ActionItem::ActionItem( TQListView *lv, TQAction *ac ) : TQListViewItem( lv ), a( 0 ), g( 0 ) { - g = ::tqqt_cast(ac); + g = ::tqt_cast(ac); if ( !g ) - a = ::tqqt_cast(ac); + a = ::tqt_cast(ac); setDragEnabled( TRUE ); } ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) : TQListViewItem( i ), a( 0 ), g( 0 ) { - g = ::tqqt_cast(ac); + g = ::tqt_cast(ac); if ( !g ) - a = ::tqqt_cast(ac); + a = ::tqt_cast(ac); setDragEnabled( TRUE ); moveToEnd(); } diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index 8f11679a..a1c445ad 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -494,7 +494,7 @@ bool SetPropertyCommand::canMerge( Command *c ) if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return TRUE; - if ( ::tqqt_cast((TQObject *)widget) ) { + if ( ::tqt_cast((TQObject *)widget) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); if ( !cw ) return FALSE; @@ -545,7 +545,7 @@ bool SetPropertyCommand::checkProperty() return FALSE; } - if ( ::tqqt_cast(widget->parent()) ) + if ( ::tqt_cast(widget->parent()) ) formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); } return TRUE; @@ -597,7 +597,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } else if ( ::tqqt_cast(editor->widget()) ) { + } else if ( ::tqt_cast(editor->widget()) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); if ( cw ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); @@ -645,10 +645,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( formWindow()->isMainContainer( widget ) ) formWindow()->setName( v.toCString() ); } - if ( propName == "name" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + if ( propName == "name" && ::tqt_cast((TQObject *)widget) && ::tqt_cast(formWindow()->mainContainer()) ) { formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); } - if ( propName == "iconSet" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + if ( propName == "iconSet" && ::tqt_cast((TQObject *)widget) && ::tqt_cast(formWindow()->mainContainer()) ) { formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); } if ( propName == "caption" ) { @@ -795,9 +795,9 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); layout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast(layoutBase) != 0 ); else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast(layoutBase) != 0 ); else if ( lay == WidgetFactory::Grid ) layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); } @@ -1857,7 +1857,7 @@ void AddActionToToolBarCommand::execute() { action->addTo( toolBar ); - if ( ::tqqt_cast(action) ) { + if ( ::tqt_cast(action) ) { TQString s = ( (QDesignerAction*)action )->widget()->name(); if ( s.startsWith( "qt_dead_widget_" ) ) { s.remove( 0, TQString( "qt_dead_widget_" ).length() ); @@ -1865,16 +1865,16 @@ void AddActionToToolBarCommand::execute() } toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::tqqt_cast(action) ) { + } else if ( ::tqt_cast(action) ) { if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); } - } else if ( ::tqqt_cast(action) ) { + } else if ( ::tqt_cast(action) ) { toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); } - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( !::tqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { if ( index == -1 ) toolBar->appendAction( action ); else @@ -1889,10 +1889,10 @@ void AddActionToToolBarCommand::execute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast(o) ) + if ( !::tqt_cast(o) ) continue; // ### fix it for nested actiongroups - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { QDesignerAction *ac = (QDesignerAction*)o; toolBar->insertAction( ac->widget(), ac ); ac->widget()->installEventFilter( toolBar ); @@ -1912,7 +1912,7 @@ void AddActionToToolBarCommand::execute() void AddActionToToolBarCommand::unexecute() { - if ( ::tqqt_cast(action) ) { + if ( ::tqt_cast(action) ) { TQString s = ( (QDesignerAction*)action )->widget()->name(); s.prepend( "qt_dead_widget_" ); ( (QDesignerAction*)action )->widget()->setName( s ); @@ -1921,7 +1921,7 @@ void AddActionToToolBarCommand::unexecute() toolBar->removeAction( action ); action->removeFrom( toolBar ); TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( !::tqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { action->removeEventFilter( toolBar ); } else { TQObjectList clo = action->childrenListObject(); @@ -1930,9 +1930,9 @@ void AddActionToToolBarCommand::unexecute() while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast(o) ) + if ( !::tqt_cast(o) ) continue; - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { o->removeEventFilter( toolBar ); toolBar->removeAction( (TQAction*)o ); } diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index 3234878a..f0a04362 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -187,10 +187,10 @@ static void appendChildActions( TQAction *action, TQStringList &lst ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast(o) ) + if ( !::tqt_cast(o) ) continue; lst << o->name(); - if ( !o->childrenListObject().isEmpty() && ::tqqt_cast(o) ) + if ( !o->childrenListObject().isEmpty() && ::tqt_cast(o) ) appendChildActions( (TQAction*)o, lst ); } } @@ -203,7 +203,7 @@ static TQStringList flatActions( const TQPtrList &l ) while ( it.current() ) { TQAction *action = it.current(); lst << action->name(); - if ( !action->childrenListObject().isEmpty() && ::tqqt_cast(action) ) + if ( !action->childrenListObject().isEmpty() && ::tqt_cast(action) ) appendChildActions( action, lst ); ++it; } @@ -225,9 +225,9 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && + !::tqt_cast(it.current()) && + !::tqt_cast(it.current()) && + !::tqt_cast(it.current()) && qstrcmp( it.current()->name(), "central widget" ) != 0 ) { lst << it.current()->name(); } @@ -282,9 +282,9 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw ) continue; } if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && - !::tqqt_cast(it.current()) && + !::tqt_cast(it.current()) && + !::tqt_cast(it.current()) && + !::tqt_cast(it.current()) && qstrcmp( it.current()->name(), "central widget" ) != 0 ) { lst << it.current()->name(); } @@ -346,7 +346,7 @@ void SignalItem::senderChanged( TQObject *sender ) TQStringList lst = TQStringList::fromStrList( sigs ); - if ( ::tqqt_cast(sender) ) { + if ( ::tqt_cast(sender) ) { MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget(); for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) @@ -408,7 +408,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const { #ifndef TQT_NO_SQL if ( qstrcmp( slot, "update()" ) == 0 && - ::tqqt_cast(lastReceiver) ) + ::tqt_cast(lastReceiver) ) return FALSE; #endif @@ -478,7 +478,7 @@ void SlotItem::updateSlotList() } } - if ( ::tqqt_cast(lastReceiver) ) { + if ( ::tqt_cast(lastReceiver) ) { MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget(); for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp index 57ee992e..4a223cef 100644 --- a/kdevdesigner/designer/designerappiface.cpp +++ b/kdevdesigner/designer/designerappiface.cpp @@ -55,9 +55,9 @@ TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt { *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = (TQUnknownInterface*)this; - else if ( uuid == IID_TQComponentInformation ) + else if ( uuid == IID_QComponentInformation ) *iface = (TQComponentInformationInterface*)this; else if ( uuid == IID_Designer ) *iface = (DesignerInterface*)this; @@ -190,7 +190,7 @@ TQPtrList DesignerProjectImpl::formList() const while ( it.current() ) { TQObject *obj = it.current(); ++it; - TQWidget *par = ::tqqt_cast(obj->parent()); + TQWidget *par = ::tqt_cast(obj->parent()); if ( !obj->isWidgetType() || !par ) continue; @@ -957,7 +957,7 @@ void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const cha void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); @@ -977,7 +977,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -990,7 +990,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); if ( !mw->child( 0, "MenuBarEditor" ) ) @@ -1004,7 +1004,7 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQToolBar *tb = new QDesignerToolBar( mw ); @@ -1016,7 +1016,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); @@ -1028,7 +1028,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) { - if ( !::tqqt_cast(formWindow->mainContainer()) ) + if ( !::tqt_cast(formWindow->mainContainer()) ) return; TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" ); diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index c25d5927..2dc7bb9d 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -87,7 +87,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start ) TQObjectList l = start->childrenListObject(); if ( !l.isEmpty() ) { for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) + if ( o->isWidgetType() && !::tqt_cast(o) ) setCursorToAll( c, ( (TQWidget*)o ) ); } } @@ -102,7 +102,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw ) TQObjectList l = start->childrenListObject(); if ( !l.isEmpty() ) { for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) + if ( o->isWidgetType() && !::tqt_cast(o) ) restoreCursors( ( (TQWidget*)o ), fw ); } } @@ -544,7 +544,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) w = w->parentWidget(); - if ( ::tqqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { + if ( ::tqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { e->accept(); mainwindow->popupFormWindowMenu( e->globalPos(), this ); } else { @@ -656,7 +656,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) break; validForBuddy = FALSE; if ( currTool == BUDDY_TOOL ) { - if ( !::tqqt_cast(w) ) + if ( !::tqt_cast(w) ) break; clearSelection( FALSE ); validForBuddy = TRUE; @@ -698,7 +698,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) for (;;) { int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && - !::tqqt_cast(wid) && !::tqqt_cast(wid) ) { + !::tqt_cast(wid) && !::tqt_cast(wid) ) { insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it break; } else { @@ -865,7 +865,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) wid = designerWidget( TQT_TQOBJECT(wid) ); if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) newendWidget = wid; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + if ( ::tqt_cast(newendWidget) || ::tqt_cast(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( newendWidget && @@ -891,7 +891,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) newendWidget = wid; else newendWidget = 0; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + if ( ::tqt_cast(newendWidget) || ::tqt_cast(newendWidget) ) newendWidget = (TQWidget*)endWidget; drawRecRect = newendWidget != endWidget; if ( !newendWidget ) @@ -977,12 +977,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) bool emitSelChanged = FALSE; for ( TQMap::Iterator it = moving.begin(); it != moving.end(); ++it ) { TQWidget *i = it.key(); - if ( !emitSelChanged && ::tqqt_cast(i) ) { - if ( ::tqqt_cast(i->parentWidget()) || ::tqqt_cast(wa) ) + if ( !emitSelChanged && ::tqt_cast(i) ) { + if ( ::tqt_cast(i->parentWidget()) || ::tqt_cast(wa) ) emitSelChanged = TRUE; - if ( !::tqqt_cast(wa) ) { + if ( !::tqt_cast(wa) ) { MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); - if ( ::tqqt_cast(i->parentWidget()) ) + if ( ::tqt_cast(i->parentWidget()) ) ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } } @@ -1194,7 +1194,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) return; } - if ( ::tqqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { + if ( ::tqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { TQObject *opw = propertyWidget; propertyWidget = TQT_TQOBJECT(mainContainer()); if ( opw->isWidgetType() ) @@ -1203,7 +1203,7 @@ void FormWindow::selectWidget( TQObject *o, bool select ) return; } - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) return; if ( select ) { @@ -1921,7 +1921,7 @@ void FormWindow::checkAccels() find_accel( w->property( "title" ).toString(), accels, w ); if ( pageTitle ) find_accel( w->property( "pageTitle" ).toString(), accels, w ); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { ((MenuBarEditor *)o)->checkAccels( accels ); } } @@ -2130,7 +2130,7 @@ void FormWindow::breakLayout( TQWidget *w ) Command *cmd = breakLayoutCommand( w ); if ( cmd ) commands.insert( 0, cmd ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + if ( !::tqt_cast(w) && !::tqt_cast(w) ) break; } w = w->parentWidget(); @@ -2393,7 +2393,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } } } - if ( ::tqqt_cast(mainContainer()) && !found ) { + if ( ::tqt_cast(mainContainer()) && !found ) { TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && @@ -2407,7 +2407,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } delete l; } - if ( ::tqqt_cast(mainContainer()) ) { + if ( ::tqt_cast(mainContainer()) ) { if ( !found ) { TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { @@ -2531,8 +2531,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) } for ( ; it.current(); ++it ) { - if ( ::tqqt_cast(it.current()) - || ::tqqt_cast(it.current()) ) + if ( ::tqt_cast(it.current()) + || ::tqt_cast(it.current()) ) continue; if ( !it.current()->isVisibleTo( this ) ) continue; @@ -2689,7 +2689,7 @@ DesignerFormWindow *FormWindow::iFace() bool FormWindow::isCentralWidget( TQObject *w ) const { - if ( !::tqqt_cast(mainContainer()) ) + if ( !::tqt_cast(mainContainer()) ) return FALSE; return w == ((TQMainWindow*)mainContainer())->centralWidget(); } diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 7090a355..11531834 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -258,12 +258,12 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( o->isWidgetType() ) { TQWidget *w = (TQWidget*)o; if ( !formWindow->widgets()->find( w ) ) { - if ( ::tqqt_cast(w->parent()) ) { - if (::tqqt_cast(w->parent()->parent()) ) { + if ( ::tqt_cast(w->parent()) ) { + if (::tqt_cast(w->parent()->parent()) ) { ((TQTabWidget*)w->parent()->parent())->showPage( w ); o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else if ( ::tqqt_cast(w->parent()->parent()) ) { + } else if ( ::tqt_cast(w->parent()->parent()) ) { ((QDesignerWizard*)w->parent()->parent())-> setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); @@ -273,15 +273,15 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); } - } else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) || ::tqt_cast(w) ) { formWindow->setActiveObject( TQT_TQOBJECT(w) ); - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { return 0; // ### we could try to find our menu bar and change the currentMenu to our index } else { return 0; } } - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); deselect = TRUE; } @@ -402,7 +402,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) return; bool fakeMainWindow = FALSE; - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); if ( cw ) { o = cw; @@ -411,7 +411,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) } TQListViewItem *item = 0; TQString className = WidgetFactory::classNameOf( o ); - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; @@ -433,16 +433,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) #endif TQString name = o->name(); - if ( ::tqqt_cast(o->parent()) ) { - if ( ::tqqt_cast(o->parent()->parent()) ) + if ( ::tqt_cast(o->parent()) ) { + if ( ::tqt_cast(o->parent()->parent()) ) name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); - else if ( ::tqqt_cast(o->parent()->parent()) ) + else if ( ::tqt_cast(o->parent()->parent()) ) name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); } TQToolBox *tb; if ( o->parent() && o->parent()->parent() && - (tb = ::tqqt_cast(o->parent()->parent()->parent())) ) + (tb = ::tqt_cast(o->parent()->parent()->parent())) ) name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); if ( fakeMainWindow ) { @@ -457,18 +457,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) item->setOpen( TRUE ); if ( !parent ) item->setPixmap( 0, DesignerFormPix ); - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) item->setPixmap( 0, DesignerLayoutPix ); else item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). pixmap( TQIconSet::Small, TQIconSet::Normal ) ); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); ( (HierarchyItem*)item )->setObject( o ); TQObjectList l = o->childrenListObject(); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) l.clear(); if ( !l.isEmpty() ) { TQObjectListIt it( l ); @@ -478,13 +478,13 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) ( (TQWidget*)it.current() )->isHidden() ) continue; if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { - if ( ::tqqt_cast(it.current()->parent()) || - ::tqqt_cast(it.current()) ) { + if ( ::tqt_cast(it.current()->parent()) || + ::tqt_cast(it.current()) ) { TQObject *obj = it.current(); - QDesignerTabWidget *tw = ::tqqt_cast(it.current()->parent()); - QDesignerWizard *dw = ::tqqt_cast(it.current()->parent()); + QDesignerTabWidget *tw = ::tqt_cast(it.current()->parent()); + QDesignerWizard *dw = ::tqt_cast(it.current()->parent()); TQWidgetStack *stack = 0; - if ( dw || tw || ::tqqt_cast(obj) ) + if ( dw || tw || ::tqt_cast(obj) ) stack = (TQWidgetStack*)obj; else stack = (TQWidgetStack*)obj->parent(); @@ -505,8 +505,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) insertObject( obj, item ); } delete l2; - } else if ( ::tqqt_cast(it.current()->parent()) ) { - if ( !::tqqt_cast(it.current()) ) + } else if ( ::tqt_cast(it.current()->parent()) ) { + if ( !::tqt_cast(it.current()) ) continue; TQToolBox *tb = (TQToolBox*)it.current()->parent(); for ( int i = tb->count() - 1; i >= 0; --i ) @@ -528,9 +528,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) for ( obj = l->first(); obj; obj = l->next() ) insertObject( obj, item ); delete l; - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) || ::tqt_cast(o) ) { TQPtrList actions; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) actions = ( (QDesignerToolBar*)o )->insertedActions(); else ( (PopupMenuEditor*)o )->insertedActions( actions ); @@ -539,31 +539,31 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) it.toLast(); while ( it.current() ) { TQAction *a = it.current(); - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { QDesignerAction *da = (QDesignerAction*)a; if ( da->supportsMenu() ) insertObject( da, item ); else insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(a) ) { + } else if ( ::tqt_cast(a) ) { insertObject( a, item ); } --it; } - } else if ( ::tqqt_cast(o) && !o->childrenListObject().isEmpty() ) { + } else if ( ::tqt_cast(o) && !o->childrenListObject().isEmpty() ) { TQObjectList l = o->childrenListObject(); for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { - if ( ::tqqt_cast(obj) ) { + if ( ::tqt_cast(obj) ) { QDesignerAction *da = (QDesignerAction*)obj; if ( da->supportsMenu() ) insertObject( da, item ); else insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { insertObject( obj, item ); } } - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MenuBarEditor *mb = (MenuBarEditor*)o; for ( int i = mb->count() -1; i >= 0; --i ) { MenuBarEditorItem *md = mb->item( i ); @@ -604,7 +604,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) TQWidget *w = (TQWidget*)o; if ( w->isVisibleTo( formWindow ) ) { - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) { + if ( !::tqt_cast(w) && !::tqt_cast(w) ) { if ( !normalMenu ) normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu->popup( p ); @@ -625,14 +625,14 @@ void HierarchyList::addTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { TQTabWidget *tw = (TQTabWidget*)w; AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). arg( tw->name() ), formWindow, tw, "Tab" ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). arg( wiz->name() ), formWindow, @@ -648,7 +648,7 @@ void HierarchyList::removeTabPage() if ( !o || !o->isWidgetType() ) return; TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( tw->currentPage() ) { QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; @@ -659,7 +659,7 @@ void HierarchyList::removeTabPage() formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); if ( wiz->currentPage() ) { QDesignerWizard *dw = (QDesignerWizard*)wiz; @@ -1445,7 +1445,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & ) void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) { TQWidget *w2 = w; - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w2 = ( (TQMainWindow*)w )->centralWidget(); listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); } diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index f2198a36..4aae7be6 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -167,7 +167,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); needMove = !layoutBase; - needReparent = needMove || ::tqqt_cast(layoutBase) || ::tqqt_cast(layoutBase); + needReparent = needMove || ::tqt_cast(layoutBase) || ::tqt_cast(layoutBase); if ( !layoutBase ) { if ( !useSplitter ) layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ), @@ -216,7 +216,7 @@ void Layout::undoLayout() } formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); WidgetFactory::deleteLayout( layoutBase ); - if ( parent != layoutBase && !::tqqt_cast(layoutBase) ) { + if ( parent != layoutBase && !::tqt_cast(layoutBase) ) { layoutBase->hide(); TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); @@ -321,13 +321,13 @@ void HorizontalLayout::doLayout() layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::tqqt_cast(layoutBase) ) + if ( ::tqt_cast(layoutBase) ) ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal ); finishLayout( needMove, layout ); @@ -385,13 +385,13 @@ void VerticalLayout::doLayout() layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); else layout->addWidget( w ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); } w->show(); } - if ( ::tqqt_cast(layoutBase) ) + if ( ::tqt_cast(layoutBase) ) ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical ); finishLayout( needMove, layout ); @@ -759,11 +759,11 @@ void GridLayout::doLayout() if ( needReparent && w->parent() != layoutBase ) w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( rs * cs == 1 ) { - layout->addWidget( w, r, c, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addWidget( w, r, c, ::tqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); } else { - layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); + layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqt_cast(w) ? ( (Spacer*)w )->alignment() : 0 ); } - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (TQLayoutWidget*)w )->updateSizePolicy(); w->show(); } else { diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 319505b7..8c4f1d73 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -907,7 +907,7 @@ void MainWindow::showProperties( TQObject *o ) } if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::tqqt_cast(qworkspace->activeWindow()) ) ) + ( !qworkspace->activeWindow() || !::tqt_cast(qworkspace->activeWindow()) ) ) fw->setFocus(); } @@ -924,21 +924,21 @@ void MainWindow::updateProperties( TQObject * ) bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) { - if ( ::tqqt_cast(o) || ::tqqt_cast(o) || + if ( ::tqt_cast(o) || ::tqt_cast(o) || ( o && - ( ::tqqt_cast(o->parent()) || - ::tqqt_cast(o->parent()) ) ) ) { + ( ::tqt_cast(o->parent()) || + ::tqt_cast(o->parent()) ) ) ) { - if ( e->type() == TQEvent::Accel && ::tqqt_cast(o) ) { + if ( e->type() == TQEvent::Accel && ::tqt_cast(o) ) { return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::tqqt_cast(o); + MenuBarEditor *m = ::tqt_cast(o); showProperties( o ); if ( m->findItem( pos ) >= m->count() ) m->setFocus(); - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { - PopupMenuEditor *m = ::tqqt_cast(o); + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast(o) ) { + PopupMenuEditor *m = ::tqt_cast(o); PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); if ( m->find( i->action() ) != -1 && !i->isSeparator() ) showProperties( i->action() ); @@ -957,7 +957,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { w = (TQWidget*)o; while ( w ) { - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) break; w = w->parentWidget( TRUE ); } @@ -973,7 +973,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ( (TQKeyEvent*)e )->key() == Key_E ) && ( (TQKeyEvent*)e )->state() & ControlButton ) { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); return TRUE; } @@ -982,44 +982,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::ContextMenu: case TQEvent::MouseButtonPress: if ( o && currentTool() == POINTER_TOOL && - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) && + ( ::tqt_cast(o) || + ::tqt_cast(o) || + ::tqt_cast(o) || + ( ::tqt_cast(o) || + ::tqt_cast(o) || + ::tqt_cast(o) ) && o->parent() - && ( ::tqqt_cast(o->parent()) - || ::tqqt_cast(o->parent())) ) ) { + && ( ::tqt_cast(o->parent()) + || ::tqt_cast(o->parent())) ) ) { TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) ) + if ( ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) || + ::tqt_cast(w) ) w = w->parentWidget(); TQWidget *pw = w->parentWidget(); while ( pw ) { - if ( ::tqqt_cast(pw) ) { + if ( ::tqt_cast(pw) ) { ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); - if ( !::tqqt_cast(o) ) - return ( !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) ); + if ( !::tqt_cast(o) ) + return ( !::tqt_cast(o) && + !::tqt_cast(o) && + !::tqt_cast(o) && + !::tqt_cast(o) ); } pw = pw->parentWidget(); } } - if ( o && ( ::tqqt_cast(o) || o->inherits("TQDockWindowHandle") ) + if ( o && ( ::tqt_cast(o) || o->inherits("TQDockWindowHandle") ) && e->type() == TQEvent::ContextMenu ) break; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; if ( !w->hasFocus() ) w->setFocus(); @@ -1044,11 +1044,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) lastPressWidget = 0; if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) break; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) break; if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1064,15 +1064,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; w = isAFormWindowChild( o ); if ( lastPressWidget != (TQWidget*)o && w && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) ) + !::tqt_cast(o) && !::tqt_cast(o) && + !::tqt_cast(o) && !::tqt_cast(o) && + !::tqt_cast(o) ) return TRUE; - if ( o && ::tqqt_cast(o) ) + if ( o && ::tqt_cast(o) ) break; if ( lastPressWidget != (TQWidget*)o || - ( !w || ::tqqt_cast(o) ) || - ::tqqt_cast(o) ) + ( !w || ::tqt_cast(o) ) || + ::tqt_cast(o) ) break; passiveInteractor = WidgetFactory::isPassiveInteractor( o ); if ( !passiveInteractor ) @@ -1085,14 +1085,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return FALSE; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::tqqt_cast(qWorkspace()->activeWindow()) ) { + if ( ::tqt_cast(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); return TRUE; } } if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1100,10 +1100,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if ( ::tqqt_cast(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::tqqt_cast(o->parent()) && formWindow() ) + ::tqt_cast(o) || + ::tqt_cast(o) ) { + if ( ::tqt_cast(o) && ((TQToolButton*)o)->isOn() && + o->parent() && ::tqt_cast(o->parent()) && formWindow() ) formWindow()->setToolFixed(); break; } @@ -1117,8 +1117,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) @@ -1126,8 +1126,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); @@ -1135,16 +1135,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::Enter: case TQEvent::Leave: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) || + ::tqt_cast(o) ) break; return TRUE; case TQEvent::Resize: case TQEvent::Move: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); @@ -1190,33 +1190,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) return TRUE; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) + ::tqt_cast(o) || + ::tqt_cast(o) ) break; return TRUE; case TQEvent::FocusIn: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast(o) && isAFormWindowChild( o ) ) return TRUE; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::tqqt_cast(o) ) ) + && ( o->inherits( "Editor" ) || ::tqt_cast(o) ) ) TQApplication::sendPostedEvents(); if ( o->inherits( "Editor" ) ) { TQWidget *w = (TQWidget*)o; while ( w ) { - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) break; w = w->parentWidget( TRUE ); } - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { FormWindow *fw = (FormWindow*)o; if ( fw->formFile() && fw->formFile()->editor() ) fw->formFile()->editor()->checkTimeStamp(); } break; case TQEvent::FocusOut: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + if ( !::tqt_cast(o) && isAFormWindowChild( o ) ) return TRUE; break; default: @@ -1228,10 +1228,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const { - if ( ::tqqt_cast(o->parent()) && !::tqqt_cast(o) ) + if ( ::tqt_cast(o->parent()) && !::tqt_cast(o) ) return 0; while ( o ) { - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) return (TQWidget*)o; o = o->parent(); } @@ -1241,9 +1241,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const { while ( o ) { - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) return (TQWidget*)o; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) return 0; o = o->parent(); } @@ -1254,7 +1254,7 @@ FormWindow *MainWindow::formWindow() { if ( qworkspace->activeWindow() ) { FormWindow *fw = 0; - if ( ::tqqt_cast(qworkspace->activeWindow()) ) + if ( ::tqt_cast(qworkspace->activeWindow()) ) fw = (FormWindow*)qworkspace->activeWindow(); else if ( lastActiveFormWindow && qworkspace->windowList().find( lastActiveFormWindow ) != -1) @@ -1366,7 +1366,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) void MainWindow::activeWindowChanged( TQWidget *w ) { TQWidget *old = formWindow(); - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { FormWindow *fw = (FormWindow*)w; FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; @@ -1380,13 +1380,13 @@ void MainWindow::activeWindowChanged( TQWidget *w ) } workspace()->activeFormChanged( fw ); setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::tqqt_cast(lastActiveFormWindow->mainContainer()) ); + ::tqt_cast(lastActiveFormWindow->mainContainer()) ); if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { if ( actionEditor->wantToBeShown() ) actionEditor->parentWidget()->show(); } else { TQWidget *mc = 0; - if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast(mc) ) + if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast(mc) ) actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); actionEditor->parentWidget()->hide(); } @@ -1421,7 +1421,7 @@ void MainWindow::activeWindowChanged( TQWidget *w ) selectionChanged(); - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { SourceEditor *se = (SourceEditor*)w; TQGuardedPtr fw = se->formWindow(); if ( se->formWindow() && @@ -1474,7 +1474,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, const TQString &undoCmd, const TQString &redoCmd ) { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) + ::tqt_cast(qWorkspace()->activeWindow()) ) return; // do not set a formWindow related command actionEditUndo->setEnabled( undoAvailable ); actionEditRedo->setEnabled( redoAvailable ); @@ -1499,7 +1499,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, void MainWindow::updateEditorUndoRedo() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); @@ -1575,7 +1575,7 @@ void MainWindow::setupRMBProperties( TQValueList &ids, TQMapinsertItem( i18n("Choose Pixmap..."), -1, 0) ); props.insert( "pixmap", id ); } - if ( text && text->designable(w) && !::tqqt_cast(w) ) { + if ( text && text->designable(w) && !::tqt_cast(w) ) { ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); props.insert( "text", id ); } @@ -1611,7 +1611,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList &ids, { int id; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (QDesignerTabWidget*)w )->count() > 1) { @@ -1620,7 +1620,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (QDesignerWidgetStack*)w )->count() > 1) { @@ -1634,7 +1634,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList &ids, } ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { if ( ids.isEmpty() ) ids << rmbWidgets->insertSeparator( 0 ); if ( ( (TQToolBox*)w )->count() > 1 ) { @@ -1682,7 +1682,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList &ids, { int id; - if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ::tqt_cast(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); @@ -1700,7 +1700,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList &ids, ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); commands.insert( "edit", id ); - } else if ( ::tqqt_cast(fw->mainContainer()) ) { + } else if ( ::tqt_cast(fw->mainContainer()) ) { if ( ids.isEmpty() ) ids << rmbFormWindow->insertSeparator( 0 ); ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); @@ -1715,7 +1715,7 @@ void MainWindow::handleRMBProperties( int id, TQMap &props, TQWid if ( id == props[ "text" ] ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -1723,8 +1723,8 @@ void MainWindow::handleRMBProperties( int id, TQMap &props, TQWid bool doWrap = oldDoWrap; TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast(w), &doWrap ); + if ( ::tqt_cast(w) || ::tqt_cast(w) || ::tqt_cast(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqt_cast(w), &doWrap ); ok = !text.isNull(); } else { text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), @@ -1793,7 +1793,7 @@ void MainWindow::handleRMBProperties( int id, TQMap &props, TQWid void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { TQTabWidget *tw = (TQTabWidget*)w; if ( id == commands[ "add" ] ) { AddTabPageCommand *cmd = @@ -1812,7 +1812,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap &command cmd->execute(); } } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { TQToolBox *tb = (TQToolBox*)w; if ( id == commands[ "add" ] ) { AddToolBoxPageCommand *cmd = @@ -1832,7 +1832,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap &command cmd->execute(); } } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; if ( id == commands[ "add" ] ) { AddWidgetStackPageCommand *cmd = @@ -1933,7 +1933,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap &command void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *fw ) { - if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ::tqt_cast(fw->mainContainer()) ) { TQWizard *wiz = (TQWizard*)fw->mainContainer(); if ( id == commands[ "add" ] ) { AddWizardPageCommand *cmd = @@ -1971,7 +1971,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap &command cmd->execute(); } } - } else if ( ::tqqt_cast(fw->mainContainer()) ) { + } else if ( ::tqt_cast(fw->mainContainer()) ) { TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); if ( id == commands[ "add_toolbar" ] ) { AddToolBarCommand *cmd = @@ -2484,7 +2484,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( ( (FormWindow*)w )->formFile()->formWindow() ) @@ -2493,7 +2493,7 @@ void MainWindow::closeEvent( TQCloseEvent *e ) e->ignore(); return; } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { if ( !( (SourceEditor*)w )->close() ) { e->ignore(); return; @@ -2617,7 +2617,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) if ( text && text->designable(w) ) { bool ok = FALSE; bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) oldDoWrap = TRUE; @@ -2625,9 +2625,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) bool doWrap = oldDoWrap; TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) || ::tqt_cast(w) || ::tqt_cast(w) ) { text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::tqqt_cast(w), &doWrap ); + !::tqt_cast(w), &doWrap ); ok = !text.isNull(); } else { text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), @@ -2741,7 +2741,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) return TRUE; } @@ -2756,7 +2756,7 @@ void MainWindow::setGrid( const TQPoint &p ) grd = p; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) + if ( !::tqt_cast(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2769,7 +2769,7 @@ void MainWindow::setShowGrid( bool b ) sGrid = b; TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) + if ( !::tqt_cast(w) ) continue; ( (FormWindow*)w )->mainContainer()->update(); } @@ -2855,48 +2855,48 @@ void MainWindow::showDialogHelp() TQString link = documentationPath() + "/designer-manual-13.html#"; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) // own doc for startdialog? + if ( ::tqt_cast(w) || ::tqt_cast(w) ) // own doc for startdialog? link += "dialog-file-new"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-file-create-template"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-functions"; -// else if ( ::tqqt_cast(w) ) +// else if ( ::tqt_cast(w) ) else if ( w->inherits("ConnectionViewerBase") ) link += "dialog-view-connections"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-form-settings"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-preferences"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-image-collection"; -// else if ( ::tqqt_cast(w) ) +// else if ( ::tqt_cast(w) ) else if ( w->inherits( "DatabaseConnectionBase" ) ) link += "dialog-edit-database-connections"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-project-settings"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-find-text"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-replace-text"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-go-to-line"; -// else if ( ::tqqt_cast(w) ) +// else if ( ::tqt_cast(w) ) else if ( w->inherits("ConnectionEditorBase") ) link += "dialog-edit-connections"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-custom-widgets"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-palette"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-listbox"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-listview"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-iconview"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-edit-table"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) link += "dialog-text"; else { @@ -3184,10 +3184,10 @@ void MainWindow::setModified( bool b, TQWidget *window ) { TQWidget *w = window; while ( w ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { ( (FormWindow*)w )->modificationChanged( b ); return; - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { FormWindow *fw = ( (SourceEditor*)w )->formWindow(); if ( fw && !fw->isFake() ) { //fw->commandHistory()->setModified( b ); @@ -3222,7 +3222,7 @@ void MainWindow::doFunctionsChanged() void MainWindow::updateFunctionList() { - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast(qWorkspace()->activeWindow()) ) return; SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); se->save(); @@ -3311,9 +3311,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) FormWindow *fw = 0; SourceEditor *se = 0; SourceFile *sf = 0; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { fw = (FormWindow*)w; - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { se = (SourceEditor*)w; if ( !se->object() ) continue; @@ -3381,7 +3381,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) } } - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { for ( TQPtrListIterator sources = currentProject->sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); @@ -3443,12 +3443,12 @@ TQObject *MainWindow::findRealObject( TQObject *o ) { TQWidgetList windows = qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) + if ( ::tqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->formWindow() && + else if ( ::tqt_cast(w) && ( (SourceEditor*)w )->formWindow() && TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && + else if ( ::tqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && ( (SourceEditor*)w )->sourceFile() == o ) return o; } @@ -3469,7 +3469,7 @@ void MainWindow::breakPointsChanged() { if ( !inDebugMode ) return; - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + if ( !qWorkspace()->activeWindow() || !::tqt_cast(qWorkspace()->activeWindow()) ) return; SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); if ( !e->object() || !e->project() ) @@ -3636,13 +3636,13 @@ void MainWindow::setSingleProject( Project *pro ) while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); ( (FormWindow*)w )->formFile()->close(); } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { ( (SourceEditor*)w )->close(); } } diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 9ea32977..9733097e 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -958,15 +958,15 @@ void MainWindow::setupWindowActions() int j = 0; for ( int i = 0; i < int( windows.count() ); ++i ) { TQWidget *w = windows.at( i ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + if ( !::tqt_cast(w) && !::tqt_cast(w) ) continue; - if ( ::tqqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) + if ( ::tqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) continue; j++; TQString itemText; if ( j < 10 ) itemText = TQString("&%1 ").arg( j ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) itemText += w->name(); else itemText += w->caption(); @@ -1085,9 +1085,9 @@ void MainWindow::fileClose() } else { TQWidget *w = qworkspace->activeWindow(); if ( w ) { - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (FormWindow*)w )->formFile()->close(); - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) ( (SourceEditor*)w )->close(); } } @@ -1132,14 +1132,14 @@ void MainWindow::fileCloseProject() while ( wit.current() ) { TQWidget *w = wit.current(); ++wit; - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->formFile()->editor() ) windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); if ( !( (FormWindow*)w )->formFile()->close() ) return; } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { if ( !( (SourceEditor*)w )->close() ) return; } @@ -1157,7 +1157,7 @@ void MainWindow::fileCloseProject() } if ( !windows.isEmpty() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) + if ( !::tqt_cast(w) ) continue; w->setFocus(); activeWindowChanged( w ); @@ -1354,7 +1354,7 @@ bool MainWindow::fileSaveForm() TQWidget *w = qWorkspace()->activeWindow(); if ( w ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { SourceEditor *se = (SourceEditor*)w; if ( se->formWindow() ) fw = se->formWindow(); @@ -1387,9 +1387,9 @@ bool MainWindow::fileSaveAs() TQWidget *w = qworkspace->activeWindow(); if ( !w ) return TRUE; - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return ( (SourceEditor*)w )->saveAs(); return FALSE; } @@ -1486,7 +1486,7 @@ void MainWindow::createNewTemplate() void MainWindow::editUndo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); return; } @@ -1497,7 +1497,7 @@ void MainWindow::editUndo() void MainWindow::editRedo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); return; } @@ -1508,7 +1508,7 @@ void MainWindow::editRedo() void MainWindow::editCut() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); return; } @@ -1519,7 +1519,7 @@ void MainWindow::editCut() void MainWindow::editCopy() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); return; } @@ -1530,7 +1530,7 @@ void MainWindow::editCopy() void MainWindow::editPaste() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); return; } @@ -1569,7 +1569,7 @@ void MainWindow::editDelete() void MainWindow::editSelectAll() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ::tqt_cast(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); return; } @@ -1948,7 +1948,7 @@ void MainWindow::editPreferences() void MainWindow::searchFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; if ( !findDialog ) @@ -1970,7 +1970,7 @@ void MainWindow::searchIncremetalFindMenu() void MainWindow::searchIncremetalFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -1980,7 +1980,7 @@ void MainWindow::searchIncremetalFind() void MainWindow::searchIncremetalFindNext() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), @@ -1990,7 +1990,7 @@ void MainWindow::searchIncremetalFindNext() void MainWindow::searchReplace() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; if ( !replaceDialog ) @@ -2006,7 +2006,7 @@ void MainWindow::searchReplace() void MainWindow::searchGotoLine() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) + !::tqt_cast(qWorkspace()->activeWindow()) ) return; if ( !gotoLineDialog ) diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp index 4facece2..a3e53973 100644 --- a/kdevdesigner/designer/menubareditor.cpp +++ b/kdevdesigner/designer/menubareditor.cpp @@ -818,7 +818,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) { TQWidget * fw = tqApp->focusWidget(); - if ( e->lostFocus() && !::tqqt_cast(fw) ) + if ( e->lostFocus() && !::tqt_cast(fw) ) hideItem(); update(); } diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 7c77565d..32fdcd62 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -321,7 +321,7 @@ int MetaDataBase::spacing( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -352,9 +352,9 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) bool isInnerLayout = TRUE; TQWidget *widget = (TQWidget*)o; - if ( widget && !::tqqt_cast(widget) && + if ( widget && !::tqt_cast(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) + widget && widget->parentWidget() && ::tqt_cast(widget->parentWidget()) ) ) isInnerLayout = FALSE; @@ -378,7 +378,7 @@ int MetaDataBase::margin( TQObject *o ) if ( !o ) return -1; setupDataBase(); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -409,7 +409,7 @@ TQString MetaDataBase::resizeMode( TQObject *o ) if ( !o ) return TQString(); setupDataBase(); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { @@ -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(o) && receiver ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast(o) && receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; TQString sen = sender->name(); - if ( ::tqqt_cast(o) && sender ==( (FormWindow*)o )->mainContainer() ) + if ( ::tqt_cast(o) && sender ==( (FormWindow*)o )->mainContainer() ) sen = "this"; FormFile *ff = 0; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) ff = (FormFile*)o; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) ff = ( (FormWindow*)o )->formFile(); ff->addConnection( sen, signal, rec, slot ); } @@ -476,7 +476,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr break; } } - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { TQString rec = receiver->name(); if ( receiver ==( (FormWindow*)o )->mainContainer() ) rec = "this"; @@ -494,7 +494,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList(o) ) + if ( !::tqt_cast(o) ) return; FormFile *formfile = (FormFile*)o; @@ -679,14 +679,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( slotList.find( slot ) != -1 ) return TRUE; - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); slotList = o->metaObject()->slotNames( TRUE ); if ( slotList.find( slot ) != -1 ) return TRUE; } - //if ( ::tqqt_cast(o) ) { + //if ( ::tqt_cast(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList::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(o) ) { + if ( ::tqt_cast(o) ) { o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); functionList = o->metaObject()->slotNames( TRUE ); if ( functionList.find( function ) != -1 ) return TRUE; } - //if ( ::tqqt_cast(o) ) { + //if ( ::tqt_cast(o) ) { if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp index ef06f77b..d2b3d158 100644 --- a/kdevdesigner/designer/multilineeditorimpl.cpp +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -227,7 +227,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget textEdit->document()->setUseFormatCollection( FALSE ); textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); - if ( !callStatic && ::tqqt_cast(editWidget) ) { + if ( !callStatic && ::tqt_cast(editWidget) ) { mlined = (TQTextEdit*)editWidget; mlined->setReadOnly( TRUE ); diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index f7d420d6..e33fa239 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -119,7 +119,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m removable( TRUE ) { init(); - if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast(a) ) + if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast(a) ) separator = TRUE; if ( a && !a->childrenListObject().isEmpty() ) a->installEventFilter( this ); @@ -135,7 +135,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE removable( item->removable ) { init(); - if ( ::tqqt_cast(a) ) + if ( ::tqt_cast(a) ) a->installEventFilter( this ); } @@ -175,7 +175,7 @@ void PopupMenuEditorItem::setVisible( bool enable ) bool PopupMenuEditorItem::isVisible() const { - TQActionGroup *g = ::tqqt_cast(a); + TQActionGroup *g = ::tqt_cast(a); if ( g ) return ( g->isVisible() && g->usesDropDown() ); else if ( a ) @@ -212,7 +212,7 @@ int PopupMenuEditorItem::count() const { if ( s ) { return s->count(); - } else if ( ::tqqt_cast(a) ) { + } else if ( ::tqt_cast(a) ) { const TQObjectList l = a->childrenListObject(); if ( !l.isEmpty() ) return l.count(); @@ -222,15 +222,15 @@ int PopupMenuEditorItem::count() const bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) { - if ( ! ::tqqt_cast( o ) ) + if ( ! ::tqt_cast( o ) ) return FALSE; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; TQObject * c = TQT_TQOBJECT(ce->child()); - TQAction * action = ::tqqt_cast( c ); + TQAction * action = ::tqt_cast( c ); if ( s->find( action ) != -1 ) // avoid duplicates return FALSE; - TQActionGroup * actionGroup = ::tqqt_cast( c ); + TQActionGroup * actionGroup = ::tqt_cast( c ); if ( actionGroup ) s->insert( actionGroup ); else if ( action ) @@ -361,7 +361,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { - g = ::tqqt_cast(it.current()); + g = ::tqt_cast(it.current()); if ( g ) { if ( dropdown ) i->s->insert( g ); @@ -857,7 +857,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) PopupMenuEditorItemPtrDrag::decode( e, &i ); } else { if ( e->provides( "application/x-designer-actiongroup" ) ) { - TQActionGroup * g = ::tqqt_cast(ActionDrag::action()); + TQActionGroup * g = ::tqt_cast(ActionDrag::action()); if ( g->usesDropDown() ) { i = new PopupMenuEditorItem( g, this ); TQString n = TQString( g->name() ) + "Item"; @@ -866,7 +866,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { - g = ::tqqt_cast(it.current()); + g = ::tqt_cast(it.current()); if ( g ) i->s->insert( g ); else @@ -877,7 +877,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) dropInPlace( g, e->pos().y() ); } } else if ( e->provides( "application/x-designer-actions" ) ) { - TQAction *a = ::tqqt_cast(ActionDrag::action()); + TQAction *a = ::tqt_cast(ActionDrag::action()); i = new PopupMenuEditorItem( a, this ); } } @@ -1012,12 +1012,12 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) { TQWidget * fw = tqApp->focusWidget(); - if ( !fw || ( !::tqqt_cast(fw) && fw != lineEdit ) ) { + if ( !fw || ( !::tqt_cast(fw) && fw != lineEdit ) ) { hideSubMenu(); - if ( fw && ::tqqt_cast(fw) ) + if ( fw && ::tqt_cast(fw) ) return; TQWidget * w = this; - while ( w && w != fw && ::tqqt_cast(w) ) { // hide all popups + while ( w && w != fw && ::tqt_cast(w) ) { // hide all popups w->hide(); w = ((PopupMenuEditor *)w)->parentEditor(); } @@ -1243,8 +1243,8 @@ void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y ) if (l.isEmpty()) return; for ( int i = 0; i < (int)l.count(); ++i ) { - TQAction *a = ::tqqt_cast(l.at(i)); - TQActionGroup *g = ::tqqt_cast(l.at(i)); + TQAction *a = ::tqt_cast(l.at(i)); + TQActionGroup *g = ::tqt_cast(l.at(i)); if ( g ) dropInPlace( g, y ); else if ( a ) @@ -1449,13 +1449,13 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) TQString s; TQString name = item->action()->menuText(); TQWidget *e = parentEditor(); - PopupMenuEditor *p = ::tqqt_cast(e); + PopupMenuEditor *p = ::tqt_cast(e); if ( p ) { int idx = p->find( item->m ); PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); } else { - MenuBarEditor *b = ::tqqt_cast(e); + MenuBarEditor *b = ::tqt_cast(e); if ( b ) { int idx = b->findItem( item->m ); MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 ); diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index d8a6cf94..f8535a25 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -1514,8 +1514,8 @@ TQString Project::locationOfObject( TQObject *o ) if ( MainWindow::self ) { TQWidgetList windows = MainWindow::self->qWorkspace()->windowList(); for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - FormWindow *fw = ::tqqt_cast(w); - SourceEditor *se = ::tqqt_cast(w); + FormWindow *fw = ::tqt_cast(w); + SourceEditor *se = ::tqt_cast(w); if ( fw ) { if ( fw->isFake() ) return objectForFakeForm( fw )->name() + TQString( " [Source]" ); @@ -1532,7 +1532,7 @@ TQString Project::locationOfObject( TQObject *o ) } } - if ( ::tqqt_cast(o) ) { + if ( ::tqt_cast(o) ) { for ( TQPtrListIterator sources = sourceFiles(); sources.current(); ++sources ) { SourceFile* f = sources.current(); diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 1bb7e680..68fe21f1 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -753,7 +753,7 @@ void PropertyTextItem::setValue() void PropertyTextItem::getText() { - bool richText = !::tqqt_cast(listview->propertyEditor()->widget()) || + bool richText = !::tqt_cast(listview->propertyEditor()->widget()) || ( text( 0 ) == "whatsThis" ); bool doWrap = FALSE; TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); @@ -2307,7 +2307,7 @@ void PropertyPaletteItem::getPalette() return; bool ok = FALSE; TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ( (TQScrollView*)w )->viewport(); TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), w->backgroundMode(), listview, @@ -3019,7 +3019,7 @@ static bool parent_is_data_aware( TQWidget *w ) { TQWidget *p = w ? w->parentWidget() : 0; while ( p && !p->isTopLevel() ) { - if ( ::tqqt_cast(p) || ::tqqt_cast(p) ) + if ( ::tqt_cast(p) || ::tqt_cast(p) ) return TRUE; p = p->parentWidget(); } @@ -3035,7 +3035,7 @@ void PropertyList::setupProperties() { if ( !editor->widget() ) return; - bool allProperties = !::tqqt_cast(editor->widget()); + bool allProperties = !::tqt_cast(editor->widget()); TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); PropertyItem *item = 0; TQMap unique; @@ -3053,8 +3053,8 @@ void PropertyList::setupProperties() continue; if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) continue; - if ( ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { + if ( ::tqt_cast(editor->widget()) || + ::tqt_cast(editor->widget()) ) { if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) @@ -3090,7 +3090,7 @@ void PropertyList::setupProperties() continue; if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) continue; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) || ::tqt_cast(w) ) { if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) continue; if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) @@ -3133,7 +3133,7 @@ void PropertyList::setupProperties() continue; } } - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) continue; if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) @@ -3150,7 +3150,7 @@ void PropertyList::setupProperties() if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) if ( !editor->widget()->isWidgetType() || !editor->widget()->parent() || - !::tqqt_cast(editor->widget()->parent()) ) + !::tqt_cast(editor->widget()->parent()) ) continue; } @@ -3172,7 +3172,7 @@ void PropertyList::setupProperties() setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) item->setChanged( TRUE, FALSE ); - if ( !::tqqt_cast(editor->widget()) ) { + if ( !::tqt_cast(editor->widget()) ) { lst.clear(); lst << p->valueToKey( AlignTop ) << p->valueToKey( AlignVCenter ) @@ -3183,7 +3183,7 @@ void PropertyList::setupProperties() if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) item->setChanged( TRUE, FALSE ); item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) item->setVisible( FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) @@ -3231,7 +3231,7 @@ void PropertyList::setupProperties() } } - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && !::tqqt_cast(w) && + if ( !::tqt_cast(w) && !::tqt_cast(w) && !::tqt_cast(w) && w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); setPropertyValue( item ); @@ -3248,8 +3248,8 @@ void PropertyList::setupProperties() else layoutInitValue( item ); TQWidget *widget = (TQWidget*)w; - if ( ( !::tqqt_cast(widget) && - widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) { + if ( ( !::tqt_cast(widget) && + widget->parentWidget() && ::tqt_cast(widget->parentWidget()) ) ) { item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); TQStringList lst; lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; @@ -3264,8 +3264,8 @@ void PropertyList::setupProperties() } } - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && - !::tqqt_cast(w) && !::tqqt_cast(w) ) { + if ( !::tqt_cast(w) && !::tqt_cast(w) && + !::tqt_cast(w) && !::tqt_cast(w) ) { item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) @@ -3277,16 +3277,16 @@ void PropertyList::setupProperties() } #ifndef TQT_NO_SQL - if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && - !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { + if ( !::tqt_cast(editor->widget()) && !::tqt_cast(editor->widget()) && + !::tqt_cast(editor->widget()) && parent_is_data_aware( ::tqt_cast(editor->widget()) ) ) { item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) item->setChanged( TRUE, FALSE ); } - if ( ::tqqt_cast(editor->widget()) || ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { + if ( ::tqt_cast(editor->widget()) || ::tqt_cast(editor->widget()) || + ::tqt_cast(editor->widget()) ) { item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) @@ -3369,9 +3369,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, switch ( t ) { case TQVariant::String: item = new PropertyTextItem( this, item, 0, name, TRUE, - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ); + ::tqt_cast(editor->widget()) || + ::tqt_cast(editor->widget()) || + ::tqt_cast(editor->widget()) ); break; case TQVariant::CString: item = new PropertyTextItem( this, item, 0, @@ -3549,8 +3549,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); return TRUE; - } else if ( ( !::tqqt_cast(o) || - ( ::tqqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && + } else if ( ( !::tqt_cast(o) || + ( ::tqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && i && i->hasSubItems() ) { if ( !i->isOpen() && ( ke->key() == Key_Plus || @@ -3560,12 +3560,12 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) ( ke->key() == Key_Minus || ke->key() == Key_Left ) ) i->setOpen( FALSE ); - } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast(o) ) { + } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast(o) ) { TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); TQApplication::sendEvent( o, &ke2 ); return TRUE; } - } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { + } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast(o) && editor->formWindow() ) { TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); } else if ( o == viewport() ) { TQMouseEvent *me; @@ -3574,7 +3574,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::MouseButtonPress: me = (TQMouseEvent*)e; i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && ( ::tqqt_cast(i) || ::tqqt_cast(i) ) ) { + if ( i && ( ::tqt_cast(i) || ::tqt_cast(i) ) ) { pressItem = i; pressPos = me->pos(); mousePressed = TRUE; @@ -3588,7 +3588,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) if ( i && i == pressItem ) { if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ - if ( ::tqqt_cast(i) ) { + if ( ::tqt_cast(i) ) { TQColor col = i->value().asColor(); TQColorDrag *drg = new TQColorDrag( col, this ); TQPixmap pix( 25, 25 ); @@ -3600,7 +3600,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) mousePressed = FALSE; drg->dragCopy(); } - else if ( ::tqqt_cast(i) ) { + else if ( ::tqt_cast(i) ) { TQPixmap pix = i->value().asPixmap(); if( !pix.isNull() ) { TQImage img = pix.convertToImage(); @@ -3786,9 +3786,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) return; } - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3802,9 +3802,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) return; } - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + if ( ::tqt_cast(i) && TQColorDrag::canDecode( e ) ) e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + else if ( ::tqt_cast(i) && TQImageDrag::canDecode( e ) ) e->accept(); else e->ignore(); @@ -3818,14 +3818,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e ) return; } - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) { + if ( ::tqt_cast(i) && TQColorDrag::canDecode( e ) ) { TQColor color; TQColorDrag::decode( e, color ); i->setValue( TQVariant( color ) ); valueChanged( i ); e->accept(); } - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) { + else if ( ::tqt_cast(i) && TQImageDrag::canDecode( e ) ) { TQImage img; TQImageDrag::decode( e, img ); TQPixmap pm; diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index 134f6c72..192e4ffc 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -720,13 +720,13 @@ bool Resource::save( TQIODevice* dev ) ts << "" << endl; saveMetaInfoBefore( ts, 0 ); saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) { + if ( ::tqt_cast(formwindow->mainContainer()) ) { saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); } if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) saveCustomWidgets( ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) + if ( ::tqt_cast(formwindow->mainContainer()) ) saveActions( formwindow->actionList(), ts, 0 ); if ( !images.isEmpty() ) saveImageCollection( ts, 0 ); @@ -914,7 +914,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea QDesignerWidgetStack* ws = 0; - if ( ::tqqt_cast(obj) ) { + if ( ::tqt_cast(obj) ) { TQTabWidget* tw = (TQTabWidget*) obj; TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); @@ -946,7 +946,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea ts << makeIndent( indent ) << "" << endl; } delete tmpl; - } else if ( (ws = ::tqqt_cast(obj)) != 0 ) { + } else if ( (ws = ::tqt_cast(obj)) != 0 ) { for ( int i = 0; i < ws->count(); ++i ) { TQWidget *w = ws->page( i ); if ( !w ) @@ -969,7 +969,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea --indent; ts << makeIndent( indent ) << "" << endl; } - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { TQToolBox* tb = (TQToolBox*)obj; for ( int i = 0; i < tb->count(); ++i ) { TQWidget *w = tb->item( i ); @@ -998,7 +998,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea --indent; ts << makeIndent( indent ) << "" << endl; } - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { TQWizard* wiz = (TQWizard*)obj; for ( int i = 0; i < wiz->pageCount(); ++i ) { TQWidget *w = wiz->page( i ); @@ -1023,7 +1023,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea --indent; ts << makeIndent( indent ) << "" << endl; } - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); } else { bool saved = FALSE; @@ -1158,9 +1158,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) { - if ( ::tqqt_cast(obj) || ::tqqt_cast(obj) ) { + if ( ::tqt_cast(obj) || ::tqt_cast(obj) ) { TQListBox *lb = 0; - if ( ::tqqt_cast(obj) ) + if ( ::tqt_cast(obj) ) lb = (TQListBox*)obj; else lb = ( (TQComboBox*)obj )->listBox(); @@ -1178,7 +1178,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "" << endl; } - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { TQIconView *iv = (TQIconView*)obj; TQIconViewItem *i = iv->firstItem(); @@ -1194,7 +1194,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) indent--; ts << makeIndent( indent ) << "" << endl; } - } else if ( ::tqqt_cast(obj) ) { + } else if ( ::tqt_cast(obj) ) { TQListView *lv = (TQListView*)obj; int i; for ( i = 0; i < lv->header()->count(); ++i ) { @@ -1223,12 +1223,12 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) saveItem( lv->firstChild(), ts, indent - 1 ); } #if !defined (TQT_NO_TABLE) - else if ( ::tqqt_cast(obj) ) { + else if ( ::tqt_cast(obj) ) { TQTable *table = (TQTable*)obj; int i; TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); # ifndef TQT_NO_SQL - bool isDataTable = ::tqqt_cast(table); + bool isDataTable = ::tqt_cast(table); # else bool isDataTable = false; # endif @@ -1385,7 +1385,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer TQLayout *layout = 0; QDesignerGridLayout* grid = 0; - if ( !::tqqt_cast(obj) && + if ( !::tqt_cast(obj) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { @@ -1433,18 +1433,18 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) TQStringList changed; changed = MetaDataBase::changedProperties( w ); if ( w->isWidgetType() ) { - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { if ( !changed.contains( "sizeHint" ) ) changed << "sizeHint"; if ( !changed.contains( "geometry" ) ) changed << "geometry"; } else { - TQToolButton *tb = ::tqqt_cast(w); + TQToolButton *tb = ::tqt_cast(w); if ( tb && !tb->iconSet().isNull() ) { changed << "iconSet"; } } - } else if ( ::tqqt_cast(w) ) { + } else if ( ::tqt_cast(w) ) { if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) changed << "spacing"; if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) @@ -1467,7 +1467,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); + TQStrList lst = w->metaObject()->propertyNames( !::tqt_cast(w) ); for ( TQPtrListIterator it( lst ); it.current(); ++it ) { if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) continue; @@ -1478,10 +1478,10 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) continue; - if ( ::tqqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && + if ( ::tqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) continue; - if ( ::tqqt_cast(w) && + if ( ::tqt_cast(w) && ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || qstrcmp( p->name(), "itemText" ) == 0 ) ) continue; @@ -1495,7 +1495,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) ts << " stdset=\"0\""; ts << ">" << endl; indent++; - if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast(w) ) { + if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqt_cast(w) ) { saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); } else if ( p->isSetType() ) { saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); @@ -1582,7 +1582,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; break; case TQVariant::Int: - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { num = -1; if ( name == "spacing" ) num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); @@ -1831,7 +1831,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay mainContainerSet = TRUE; } w = (TQWidget*)obj; - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( layout ) { switch ( WidgetFactory::layoutType( layout ) ) { @@ -1856,20 +1856,20 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( w && formwindow ) { if ( !parent || - ( !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) + ( !::tqt_cast(parent) && + !::tqt_cast(parent) && + !::tqt_cast(parent) && + !::tqt_cast(parent) #ifdef TQT_CONTAINER_CUSTOM_WIDGETS && !isPlugin #endif ) ) formwindow->insertWidget( w, pasting ); else if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) + ( ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) #ifdef TQT_CONTAINER_CUSTOM_WIDGETS || isPlugin #endif @@ -1912,16 +1912,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay } else if ( n.tagName() == "attribute" && w ) { TQString attrib = n.attribute( "name" ); TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( ::tqqt_cast(parent) ) { + if ( ::tqt_cast(parent) ) { if ( attrib == "title" ) ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { + } else if ( ::tqt_cast(parent) ) { if ( attrib == "id" ) ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); - } else if ( ::tqqt_cast(parent) ) { + } else if ( ::tqt_cast(parent) ) { if ( attrib == "label" ) ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { + } else if ( ::tqt_cast(parent) ) { if ( attrib == "title" ) ( (TQWizard*)parent )->addPage( w, v.toString() ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS @@ -1969,7 +1969,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) if ( !widget ) return; - if ( ::tqqt_cast(widget) && e.tagName() == "column" ) { + if ( ::tqt_cast(widget) && e.tagName() == "column" ) { TQListView *lv = (TQListView*)widget; TQDomElement n = e.firstChild().toElement(); TQPixmap pix; @@ -2003,7 +2003,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) lv->header()->setResizeEnabled( resizable, i ); } #ifndef TQT_NO_TABLE - else if ( ::tqqt_cast(widget) ) { + else if ( ::tqt_cast(widget) ) { TQTable *table = (TQTable*)widget; bool isRow; if ( ( isRow = e.tagName() == "row" ) ) @@ -2070,14 +2070,14 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) return; - if ( ::tqqt_cast(widget) || ::tqqt_cast(widget) ) { + if ( ::tqt_cast(widget) || ::tqt_cast(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) lb = (TQListBox*)widget; else lb = ( (TQComboBox*)widget)->listBox(); @@ -2086,7 +2086,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } else { new TQListBoxText( lb, txt ); } - } else if ( ::tqqt_cast(widget) ) { + } else if ( ::tqt_cast(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; bool hasPixmap = FALSE; @@ -2097,7 +2097,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt new TQIconViewItem( iv, txt, pix ); else new TQIconViewItem( iv, txt ); - } else if ( ::tqqt_cast(widget) ) { + } else if ( ::tqt_cast(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQValueList pixmaps; @@ -2164,7 +2164,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay if ( formwindow ) formwindow->insertWidget( spacer, pasting ); if ( layout ) { - if ( ::tqqt_cast(layout) ) + if ( ::tqt_cast(layout) ) ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); else ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, @@ -2180,7 +2180,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD { const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); - if ( !::tqqt_cast(obj) ) {// no layouts in metadatabase... (RS) + if ( !::tqt_cast(obj) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) @@ -2293,7 +2293,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD } } - if ( ::tqqt_cast(obj) ) { + if ( ::tqt_cast(obj) ) { if ( prop == "spacing" ) { MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); return; @@ -2968,10 +2968,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) while ( it.current() ) { TQObject *o = it.current(); ++it; - if ( !::tqqt_cast(o) ) + if ( !::tqt_cast(o) ) continue; TQAction *ac = (TQAction*)o; - bool isGroup = ::tqqt_cast(ac); + bool isGroup = ::tqt_cast(ac); if ( isGroup ) ts << makeIndent( indent ) << "" << endl; else @@ -3000,7 +3000,7 @@ void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts TQPtrListIterator it( actions ); while ( it.current() ) { TQAction *a = it.current(); - bool isGroup = ::tqqt_cast(a); + bool isGroup = ::tqt_cast(a); if ( isGroup ) ts << makeIndent( indent ) << "" << endl; else @@ -3045,7 +3045,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::tqqt_cast(parent) ) + if ( !::tqt_cast(parent) ) formwindow->actionList().append( a ); } else if ( n.tagName() == "actiongroup" ) { a = new QDesignerActionGroup( parent ); @@ -3068,7 +3068,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) } n2 = n2.nextSibling().toElement(); } - if ( !::tqqt_cast(parent) ) + if ( !::tqt_cast(parent) ) formwindow->actionList().append( a ); } } @@ -3104,10 +3104,10 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast(a) ) { + if ( ::tqt_cast(a) ) { ts << makeIndent( indent ) << "" << endl; } else { - if ( ::tqqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { + if ( ::tqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { TQWidget *w = ( (QDesignerAction*)a )->widget(); ts << makeIndent( indent ) << "" << endl; @@ -3166,11 +3166,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea { for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { TQAction *a = i->action(); - if ( ::tqqt_cast(a) ) + if ( ::tqt_cast(a) ) ts << makeIndent( indent ) << "" << endl; - else if ( ::tqqt_cast(a) ) + else if ( ::tqt_cast(a) ) ts << makeIndent( indent ) << "name() << "\"/>" << endl; - else if ( ::tqqt_cast(a) ) + else if ( ::tqt_cast(a) ) ts << makeIndent( indent ) << "name() << "\"/>" << endl; PopupMenuEditor *s = i->subMenu(); if ( s && s->count() ) { diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp index 2850e20e..1efbe164 100644 --- a/kdevdesigner/designer/sourceeditor.cpp +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -77,7 +77,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) formWindow()->formFile()->setCodeEdited( FALSE ); formWindow()->formFile()->setEditor( 0 ); } - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); save(); bool changed = FALSE; @@ -119,9 +119,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, TQString txt; if ( !o ) return txt; - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) txt = ( (SourceFile*)o )->text(); return txt; } @@ -307,14 +307,14 @@ bool SourceEditor::saveAs() SourceFile *SourceEditor::sourceFile() const { - if ( !::tqqt_cast((TQObject *)obj) ) + if ( !::tqt_cast((TQObject *)obj) ) return 0; return (SourceFile*)(TQObject*)obj; } FormWindow *SourceEditor::formWindow() const { - if ( !::tqqt_cast((TQObject *)obj) ) + if ( !::tqt_cast((TQObject *)obj) ) return 0; return (FormWindow*)(TQObject*)obj; } diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp index 060611f6..1bde6758 100644 --- a/kdevdesigner/designer/tableeditorimpl.cpp +++ b/kdevdesigner/designer/tableeditorimpl.cpp @@ -59,7 +59,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f labelRowPixmap->setText( "" ); #ifndef TQT_NO_SQL - if ( !::tqqt_cast(editTable) ) + if ( !::tqt_cast(editTable) ) #endif { labelFields->hide(); @@ -68,7 +68,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f labelTableValue->hide(); } #ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { + if ( ::tqt_cast(editTable) ) { // ## why does this behave weird? // TabWidget->removePage( rows_tab ); // rows_tab->hide(); @@ -76,7 +76,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f TabWidget->setTabEnabled( rows_tab, FALSE ); } - if ( formWindow->project() && ::tqqt_cast(editTable) ) { + if ( formWindow->project() && ::tqt_cast(editTable) ) { TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList(); if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { TQStringList fields; @@ -159,7 +159,7 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) editColumnText->blockSignals( FALSE ); #ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { + if ( ::tqt_cast(editTable) ) { TQString s = *fieldMap.find( listColumns->index( i ) ); if ( s.isEmpty() ) comboFields->setCurrentItem( 0 ); @@ -244,7 +244,7 @@ void TableEditor::newColumnClicked() listColumns->setCurrentItem( item ); listColumns->setSelected( item, TRUE ); #ifndef TQT_NO_SQL - if ( ::tqqt_cast(editTable) ) { + if ( ::tqt_cast(editTable) ) { comboFields->setFocus(); } else #endif diff --git a/kdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp index c2ce0721..1d71f4e0 100644 --- a/kdevdesigner/designer/widgetaction.cpp +++ b/kdevdesigner/designer/widgetaction.cpp @@ -35,7 +35,7 @@ static TQStyle *windowsStyle = 0; void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) { - if ( ::tqqt_cast(w) && ::tqqt_cast(container->parent()->parent()) ) { + if ( ::tqt_cast(w) && ::tqt_cast(container->parent()->parent()) ) { if ( !windowsStyle ) windowsStyle = TQStyleFactory::create( "windows" ); w->setStyle( windowsStyle ); diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 8c58a328..00a4fa07 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -107,7 +107,7 @@ FormWindow *find_formwindow( TQWidget *w ) if ( !w ) return 0; for (;;) { - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return (FormWindow*)w; if ( !w->parentWidget() ) return 0; @@ -537,7 +537,7 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo TQString str = WidgetDatabase::createWidgetName( id ); const char *s = str.latin1(); w = createWidget( n, parent, name ? name : s, init, r, orient ); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) ( (TQScrollView*)w )->disableSizeHintCaching(); if ( !w && WidgetDatabase::isCustomWidget( id ) ) w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); @@ -565,31 +565,31 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); - if ( ::tqqt_cast(widget) && + if ( ::tqt_cast(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast(widget->parentWidget()) ) ) + widget && ::tqt_cast(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); - if ( !layout && ::tqqt_cast(widget) ) + if ( !layout && ::tqt_cast(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && ::tqqt_cast(widget) ) + if ( !layout && ::tqt_cast(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && ::tqqt_cast(widget) ) + if ( !layout && ::tqt_cast(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !layout && ::tqqt_cast(widget) ) + if ( !layout && ::tqt_cast(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && ::tqqt_cast(widget) ) + if ( !layout && ::tqt_cast(widget) ) widget = ((TQToolBox*)widget)->currentItem(); MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); TQLayout *l = 0; int align = 0; - if ( !layout && ::tqqt_cast(widget) ) { + if ( !layout && ::tqt_cast(widget) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, TQt::Vertical ); layout = gb->layout(); @@ -663,15 +663,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) if ( !widget ) return; - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::tqqt_cast(widget) ) + if ( ::tqt_cast(widget) ) widget = ((TQToolBox*)widget)->currentItem(); delete widget->layout(); } @@ -695,12 +695,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare b = new QDesignerPushButton( parent, name ); } TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); + b->setAutoDefault( w && ::tqt_cast(((FormWindow*)w)->mainContainer()) ); return b; } else if ( className == "TQToolButton" ) { if ( init ) { QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); - if ( ::tqqt_cast(widgetOfContainer(parent))) { + if ( ::tqt_cast(widgetOfContainer(parent))) { tb->setUsesTextLabel(TRUE); tb->setTextLabel("..."); tb->setAutoRaise(TRUE); @@ -833,12 +833,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQComboBox( FALSE, parent, name ); } else if ( className == "TQWidget" ) { if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) ) ) { + ( ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) || + ::tqt_cast(parent) ) ) { FormWindow *fw = find_formwindow( parent ); if ( fw ) { QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); @@ -849,7 +849,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQWidget( parent, name ); } else if ( className == "TQDialog" ) { TQDialog *dia = 0; - if ( ::tqqt_cast(parent) ) + if ( ::tqt_cast(parent) ) dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); else dia = new TQDialog( parent, name ); @@ -860,7 +860,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWizard *wiz = new QDesignerWizard( parent, name ); if ( parent ) wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast(parent) ) { + if ( init && ::tqt_cast(parent) ) { QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); wiz->addPage( dw, i18n( "Page" ) ); @@ -1002,25 +1002,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay { layout = 0; - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ((TQMainWindow*)w)->centralWidget(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) w = ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ( (TQSplitter*)w )->orientation() ==TQt::Horizontal ? HBox : VBox; if ( !w || !w->layout() ) return NoLayout; TQLayout *lay = w->layout(); - if ( ::tqqt_cast(w) ) { + if ( ::tqt_cast(w) ) { TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); @@ -1028,11 +1028,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay } layout = lay; - if ( ::tqqt_cast(lay) ) + if ( ::tqt_cast(lay) ) return HBox; - else if ( ::tqqt_cast(lay) ) + else if ( ::tqt_cast(lay) ) return VBox; - else if ( ::tqqt_cast(lay) ) + else if ( ::tqt_cast(lay) ) return Grid; return NoLayout; } @@ -1042,11 +1042,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay */ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( ::tqqt_cast(layout) ) + if ( ::tqt_cast(layout) ) return HBox; - else if ( ::tqqt_cast(layout) ) + else if ( ::tqt_cast(layout) ) return VBox; - else if ( ::tqqt_cast(layout) ) + else if ( ::tqt_cast(layout) ) return Grid; return NoLayout; } @@ -1085,15 +1085,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) { if ( !w ) return w; - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast(w) ) + if ( ::tqt_cast(w) ) return ((TQMainWindow*)w)->centralWidget(); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) @@ -1125,16 +1125,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w && ::tqqt_cast(w->parentWidget()) ) + if ( w && ::tqt_cast(w->parentWidget()) ) w = w->parentWidget(); if ( w->parentWidget() && w->parentWidget()->parentWidget() && w->parentWidget()->parentWidget()->parentWidget() && - ::tqqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) + ::tqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) return w->parentWidget()->parentWidget()->parentWidget(); while ( w ) { int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); if ( WidgetDatabase::isContainer( id ) || - w && ::tqqt_cast(w->parentWidget()) ) + w && ::tqt_cast(w->parentWidget()) ) return w; w = w->parentWidget(); } @@ -1157,21 +1157,21 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things return ( lastWasAPassiveInteractor = TRUE ); - if ( ::tqqt_cast(o) ) + if ( ::tqt_cast(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && - ( ::tqqt_cast(o->parent()) || ::tqqt_cast(o->parent()) ) ) + else if ( ::tqt_cast(o) && + ( ::tqt_cast(o->parent()) || ::tqt_cast(o->parent()) ) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + else if ( ::tqt_cast(o) && ::tqt_cast(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + else if ( ::tqt_cast(o) && ::tqt_cast(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) +// else if ( ::tqt_cast(o) ) else if ( o->inherits( "TQDockWindowHandle" ) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) +// else if ( ::tqt_cast(o) ) else if ( o->inherits( "TQHideDock" ) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) @@ -1181,7 +1181,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) return ( lastWasAPassiveInteractor = FALSE ); WidgetInterface *iface = 0; TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::tqqt_cast(w) ) { + while ( !iface && w && !::tqt_cast(w) ) { widgetManager()->queryInterface( classNameOf( w ), &iface ); w = w->parentWidget(); } @@ -1214,46 +1214,46 @@ const char* WidgetFactory::classNameOf( TQObject* o ) return o->className(); if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) return o->className(); - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQTabWidget"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQWidgetStack"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQDialog"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQWidget"; else if ( o->inherits( "CustomWidget" ) ) return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQLabel"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQWizard"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQPushButton"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQToolButton"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQRadioButton"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQCheckBox"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQMenuBar"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQToolBar"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQAction"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQActionGroup"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQPopupMenu"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQToolBox"; #ifndef TQT_NO_SQL - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQDataBrowser"; - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) return "TQDataView"; #endif return o->className(); @@ -1261,29 +1261,29 @@ const char* WidgetFactory::classNameOf( TQObject* o ) TQString WidgetFactory::defaultSignal( TQObject *w ) { - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + if ( ::tqt_cast(w) || ::tqt_cast(w) ) return "toggled"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) || ::tqt_cast(w) ) return "clicked"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return "linkClicked"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) || ::tqt_cast(w) ) return "textChanged"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) || ::tqt_cast(w) || + ::tqt_cast(w) || ::tqt_cast(w) ) return "selectionChanged"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return "selected"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return "currentChanged"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return "aboutToShow"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) || ::tqt_cast(w) || + ::tqt_cast(w) || ::tqt_cast(w) || + ::tqt_cast(w) || ::tqt_cast(w) || + ::tqt_cast(w) ) return "valueChanged"; - else if ( ::tqqt_cast(w) ) + else if ( ::tqt_cast(w) ) return "activated"; return TQString(); } @@ -1299,14 +1299,14 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MainWindow::self->currProject()->fakeFormFileFor( o ) ) return; MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::tqqt_cast(o) && !::tqqt_cast(o) ) + if ( !::tqt_cast(o) && !::tqt_cast(o) ) MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - if ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { + if ( ::tqt_cast(o) || + ::tqt_cast(o) || + ::tqt_cast(o) || + ::tqt_cast(o) ) { + if (::tqt_cast(o) && ::tqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); @@ -1315,19 +1315,19 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "text", TRUE ); } } - else if ( ::tqqt_cast(o) ) + else if ( ::tqt_cast(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) || ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); @@ -1335,9 +1335,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); #ifndef TQT_NO_TABLE - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { # ifndef TQT_NO_SQL - if (!::tqqt_cast(o) ) + if (!::tqt_cast(o) ) # endif { MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); @@ -1349,11 +1349,11 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } } #endif - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::tqqt_cast(o) ) { + } else if ( ::tqt_cast(o) ) { MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); @@ -1374,7 +1374,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) return TRUE; - if ( ::tqqt_cast(editorWidget) != 0 ) + if ( ::tqt_cast(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1386,7 +1386,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::tqqt_cast(editorWidget) != 0 ) + ::tqt_cast(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1397,7 +1397,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) { - if ( !::tqqt_cast(editWidget) ) + if ( !::tqt_cast(editWidget) ) return; ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); e->exec(); @@ -1406,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ComboBox" ) ) { - if ( !::tqqt_cast(editWidget) ) + if ( !::tqt_cast(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); @@ -1417,7 +1417,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ListView" ) ) { - if ( !::tqqt_cast(editWidget) ) + if ( !::tqt_cast(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; ListViewEditor *e = new ListViewEditor( parent, lv, fw ); @@ -1427,7 +1427,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "IconView" ) ) { - if ( !::tqqt_cast(editWidget) ) + if ( !::tqt_cast(editWidget) ) return; IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); e->exec(); @@ -1442,7 +1442,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } #ifndef TQT_NO_TABLE - if (::tqqt_cast(editWidget) != 0) { + if (::tqt_cast(editWidget) != 0) { TableEditor *e = new TableEditor( parent, editWidget, fw ); e->exec(); delete e; @@ -1625,15 +1625,15 @@ void TQLayoutWidget::updateSizePolicy() if ( parent() && parent()->isWidgetType() ) { parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && - ::tqqt_cast(parentLayout->mainWidget()) ) + ::tqt_cast(parentLayout->mainWidget()) ) parentLayout = 0; } TQObjectListIt it( childrenListObject() ); TQObject *o; - if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) + if ( ::tqt_cast(layout()) ) { + if ( ::tqt_cast(parentLayout) ) vt = TQSizePolicy::Minimum; else vt = TQSizePolicy::Fixed; @@ -1653,8 +1653,8 @@ void TQLayoutWidget::updateSizePolicy() if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) + } else if ( ::tqt_cast(layout()) ) { + if ( ::tqt_cast(parentLayout) ) ht = TQSizePolicy::Minimum; else ht = TQSizePolicy::Fixed; @@ -1674,13 +1674,13 @@ void TQLayoutWidget::updateSizePolicy() if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast(layout()) ) { + } else if ( ::tqt_cast(layout()) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; if ( parentLayout ) { - if ( ::tqqt_cast(parentLayout) ) + if ( ::tqt_cast(parentLayout) ) ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast(parentLayout) ) + else if ( ::tqt_cast(parentLayout) ) vt = TQSizePolicy::Minimum; } @@ -1714,7 +1714,7 @@ void TQLayoutWidget::updateSizePolicy() void CustomWidget::paintEvent( TQPaintEvent *e ) { - if ( ::tqqt_cast(parentWidget()) ) { + if ( ::tqt_cast(parentWidget()) ) { ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); diff --git a/kdevdesigner/interfaces/widgetinterface.h b/kdevdesigner/interfaces/widgetinterface.h index 5f0312f8..6f8e1247 100644 --- a/kdevdesigner/interfaces/widgetinterface.h +++ b/kdevdesigner/interfaces/widgetinterface.h @@ -30,6 +30,6 @@ #include #define WidgetInterface TQWidgetFactoryInterface -#define IID_Widget IID_TQWidgetFactory +#define IID_Widget IID_QWidgetFactory #endif diff --git a/kdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp index 2e4f9f20..99fa5f2f 100644 --- a/kdevdesigner/plugins/languageinterfaceimpl.cpp +++ b/kdevdesigner/plugins/languageinterfaceimpl.cpp @@ -59,7 +59,7 @@ TQRESULT LanguageInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt return parent->queryInterface( uuid, iface ); *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = (TQUnknownInterface*)this; else if ( uuid == IID_Language ) *iface = (LanguageInterface*)this; diff --git a/languages/cpp/app_templates/opieapplet/simpleimpl.cpp b/languages/cpp/app_templates/opieapplet/simpleimpl.cpp index fbb29ae2..db3e71c4 100644 --- a/languages/cpp/app_templates/opieapplet/simpleimpl.cpp +++ b/languages/cpp/app_templates/opieapplet/simpleimpl.cpp @@ -128,7 +128,7 @@ TQRESULT %{APPNAME}Impl::queryInterface( const TQUuid& uuid, TQUnknownInterface* * Now the caller knows that the Interface Pointer * is valid and the interface supported */ - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_TaskbarApplet ) *iface = this; diff --git a/languages/cpp/app_templates/opieinput/simpleimpl.cpp b/languages/cpp/app_templates/opieinput/simpleimpl.cpp index a4c2e177..a77f413b 100644 --- a/languages/cpp/app_templates/opieinput/simpleimpl.cpp +++ b/languages/cpp/app_templates/opieinput/simpleimpl.cpp @@ -137,7 +137,7 @@ void %{APPNAME}Impl::onKeyPress( TQObject *receiver, const char *slot ) TQRESULT %{APPNAME}Impl::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface ) { *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_InputMethod ) *iface = this; diff --git a/languages/cpp/app_templates/opiemenu/simpleimpl.cpp b/languages/cpp/app_templates/opiemenu/simpleimpl.cpp index 9d953663..7b32c534 100644 --- a/languages/cpp/app_templates/opiemenu/simpleimpl.cpp +++ b/languages/cpp/app_templates/opiemenu/simpleimpl.cpp @@ -60,7 +60,7 @@ void %{APPNAME}::activated() TQRESULT %{APPNAME}::queryInterface( const TQUuid &uuid, TQUnknownInterface **iface ) { *iface = 0; - if ( uuid == IID_TQUnknown ) + if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; diff --git a/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp b/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp index a4896308..5b6367d2 100644 --- a/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp +++ b/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp @@ -16,7 +16,7 @@ TodayPluginObject* %{APPNAME}Impl::guiPart() { TQRESULT %{APPNAME}Impl::queryInterface( const TQUuid & uuid, TQUnknownInterface **iface ) { *iface = 0; - if ( ( uuid == IID_TQUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { + if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { *iface = this, (*iface)->addRef(); }else return TQS_FALSE;