From 170a65dc2a13f0a664d269d3058ffeab129ae83c Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 24 Feb 2011 07:08:32 +0000 Subject: [PATCH] Fix a number of runtime object identification problems which led to an even larger array of minor glitches NOTE: kdevelop and kdewebdev still need to be fully repaired git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1222475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdevdesigner/designer/actiondnd.cpp | 2 +- kdevdesigner/designer/command.cpp | 2 +- kdevdesigner/designer/connectionitems.cpp | 4 +- kdevdesigner/designer/editfunctionsimpl.cpp | 2 +- kdevdesigner/designer/formwindow.cpp | 36 ++-- kdevdesigner/designer/hierarchyview.cpp | 4 +- kdevdesigner/designer/layout.cpp | 10 +- kdevdesigner/designer/listboxeditorimpl.cpp | 2 +- kdevdesigner/designer/listvieweditorimpl.cpp | 4 +- kdevdesigner/designer/mainwindow.cpp | 26 +-- kdevdesigner/designer/popupmenueditor.cpp | 4 +- kdevdesigner/designer/previewwidgetimpl.cpp | 2 +- kdevdesigner/designer/project.cpp | 2 +- kdevdesigner/designer/propertyeditor.cpp | 12 +- kdevdesigner/designer/resource.cpp | 156 +++++++++--------- kdevdesigner/designer/startdialogimpl.cpp | 2 +- kdevdesigner/designer/widgetfactory.cpp | 88 +++++----- kdevdesigner/uilib/qwidgetfactory.cpp | 70 ++++---- .../app_templates/kscons_kmdi/kmdikonsole.cpp | 2 +- languages/sql/sqlconfigwidget.ui.h | 4 +- lib/util/kdevshellwidget.cpp | 2 +- parts/fileselector/kactionselector.cpp | 2 +- parts/konsole/konsoleviewwidget.cpp | 2 +- src/simplemainwindow.cpp | 2 +- 24 files changed, 221 insertions(+), 221 deletions(-) diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index 4c287582..347348bd 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -717,7 +717,7 @@ void QDesignerToolBar::installEventFilters( TQWidget *w ) { if ( !w ) return; - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( this ); delete l; diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index 8e46c2e1..e2e55061 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -371,7 +371,7 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, // Include the children of the selected items when deleting for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQObjectList *children = w->queryList( "TQWidget" ); + TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { widgets.insert(widgets.at() + 1, c); diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp index 9f1c3fa6..895b35ee 100644 --- a/kdevdesigner/designer/connectionitems.cpp +++ b/kdevdesigner/designer/connectionitems.cpp @@ -258,7 +258,7 @@ void SenderItem::setSenderEx( TQObject *sender ) void SenderItem::senderChanged( const TQString &sender ) { - TQObject *o = formWindow->child( sender, "TQObject" ); + TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING ); if ( !o ) o = formWindow->findAction( sender ); if ( !o ) @@ -315,7 +315,7 @@ void ReceiverItem::setReceiverEx( TQObject *receiver ) void ReceiverItem::receiverChanged( const TQString &receiver ) { - TQObject *o = formWindow->child( receiver, "TQObject" ); + TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING ); if ( !o ) o = formWindow->findAction( receiver ); if ( !o ) diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp index fd773bd0..44490811 100644 --- a/kdevdesigner/designer/editfunctionsimpl.cpp +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -116,7 +116,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "functionName" - TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" ); + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index 1c404d91..b34a49e1 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -198,7 +198,7 @@ void FormWindow::init() this, TQT_SLOT( modificationChanged( bool ) ) ); buffer = 0; - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); setMainContainer( w ); propertyWidget = w; targetContainer = 0; @@ -355,7 +355,7 @@ void FormWindow::insertWidget() bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); Orientation orient = Horizontal; TQString n = WidgetDatabase::className( currTool ); - if ( useSizeHint && ( n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar" ) ) { + if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { TQPopupMenu m( mainWindow() ); m.insertItem( i18n( "&Horizontal" ) ); int ver = m.insertItem( i18n( "&Vertical" ) ); @@ -594,7 +594,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } else { // ...widget selected // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); setPropertyShowingBlocked( TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !o->isWidgetType() ) @@ -1160,7 +1160,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) } } if ( !e->isAccepted() ) { - TQObjectList *l = queryList( "TQWidget" ); + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( !l ) return; if ( l->find( w ) != -1 ) @@ -1365,7 +1365,7 @@ void FormWindow::endRectDraw() void FormWindow::selectWidgets() { - TQObjectList *l = mainContainer()->queryList( "TQWidget" ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1420,7 +1420,7 @@ void FormWindow::redo() void FormWindow::raiseChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( !l || !l->first() ) { delete l; return; @@ -1436,7 +1436,7 @@ void FormWindow::raiseChildSelections( TQWidget *w ) void FormWindow::updateChildSelections( TQWidget *w ) { - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o->isWidgetType() && @@ -1451,7 +1451,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) { checkedSelectionsForMove = TRUE; - TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); moving.clear(); if ( l ) { TQPtrDictIterator it( usedSelections ); @@ -1613,7 +1613,7 @@ void FormWindow::resizeEvent( TQResizeEvent *e ) void FormWindow::windowsRepaintWorkaroundTimerTimeout() { #if defined(Q_WS_WIN32) - TQObjectList *l = queryList( "TQWidget" ); + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { flickerfree_update( (TQWidget*)o ); } @@ -1771,7 +1771,7 @@ void FormWindow::showOrderIndicators() { hideOrderIndicators(); orderIndicators.setAutoDelete( TRUE ); - TQObjectList *l = mainContainer()->queryList( "TQWidget" ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); stackedWidgets = MetaDataBase::tabOrder( this ); if ( l ) { int order = 1; @@ -1903,7 +1903,7 @@ void FormWindow::checkAccels() { CHECK_MAINWINDOW; TQMap accels; - TQObjectList *l = mainContainer()->queryList( "TQWidget" ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -1978,7 +1978,7 @@ void FormWindow::selectAll() { checkedSelectionsForMove = FALSE; blockSignals( TRUE ); - TQObjectList *l = mainContainer()->queryList( "TQWidget" ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { if ( ( (TQWidget*)o )->isVisibleTo( this ) && @@ -2181,7 +2181,7 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const w = WidgetFactory::containerOfWidget( w ); if ( !w ) return FALSE; - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); if ( !l || !l->first() ) { delete l; return FALSE; @@ -2376,7 +2376,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) TQPtrList al; TQAction *a = 0; for ( a = actions.first(); a; a = actions.next() ) { - TQObjectList *l = a->queryList( "TQAction" ); + TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); al.append( a ); for ( TQObject *ao = l->first(); ao; ao = l->next() ) al.append( (TQAction*)ao ); @@ -2409,7 +2409,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } if ( ::qt_cast(mainContainer()) ) { if ( !found ) { - TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); + TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && qstrcmp( o->name(), s.latin1() ) == 0 ) { @@ -2447,7 +2447,7 @@ bool FormWindow::isDatabaseWidgetUsed() const { #ifndef QT_NO_SQL TQStringList dbClasses; - dbClasses << "TQDataTable"; // add more here + dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here TQPtrDictIterator it( insertedWidgets ); for ( ; it.current(); ++it ) { TQString c( it.current()->className() ); @@ -2663,7 +2663,7 @@ TQAction *FormWindow::findAction( const TQString &name ) for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { if ( TQString( a->name() ) == name ) return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" ); + TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); if ( ac ) return ac; } @@ -2672,7 +2672,7 @@ TQAction *FormWindow::findAction( const TQString &name ) void FormWindow::killAccels( TQObject *top ) { - TQObjectList *l = top->queryList( "TQAccel" ); + TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); if ( !l ) return; for ( TQObject *o = l->first(); o; o = l->next() ) diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 0b2fc17e..bda24784 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -447,7 +447,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( fakeMainWindow ) { name = o->parent()->name(); - className = "TQMainWindow"; + className = TQMAINWINDOW_OBJECT_NAME_STRING; } if ( !parent ) @@ -491,7 +491,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( widgetStacks->findRef( stack ) != -1 ) continue; widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE ); + TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "QWidgetStackPrivate::Invisible" ) == 0 || diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index 1f37ea64..9757d5d9 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -170,10 +170,10 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) needReparent = needMove || ::qt_cast(layoutBase) || ::qt_cast(layoutBase); if ( !layoutBase ) { if ( !useSplitter ) - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLayoutWidget" ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), WidgetFactory::containerOfWidget( parent ) ); else - layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), WidgetFactory::containerOfWidget( parent ) ); } else { WidgetFactory::deleteLayout( layoutBase ); @@ -239,11 +239,11 @@ void Layout::breakLayout() rects.insert( w, w->geometry() ); } WidgetFactory::deleteLayout( layoutBase ); - bool needReparent = qstrcmp( layoutBase->className(), "QLayoutWidget" ) == 0 || - qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 || + bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || + qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) && layoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 0; + bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; bool add = geometries.isEmpty(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent ) diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp index 40a6439c..2fade00e 100644 --- a/kdevdesigner/designer/listboxeditorimpl.cpp +++ b/kdevdesigner/designer/listboxeditorimpl.cpp @@ -70,7 +70,7 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow ListBoxRename *editorRename = new ListBoxRename( preview ); - TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp index 60e7e155..dfec1860 100644 --- a/kdevdesigner/designer/listvieweditorimpl.cpp +++ b/kdevdesigner/designer/listvieweditorimpl.cpp @@ -86,7 +86,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); // Connect signal-relay to TQLineEdit "itemText" - TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" ); + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" ); TQObject *obj; TQObjectListIt itemsLineEditIt( *l ); while ( (obj = itemsLineEditIt.current()) != 0 ) { @@ -112,7 +112,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw TQT_SLOT( columnTextChanged( const TQString & ) ) ); // Find TQLineEdit "colText" and connect - l = parent->queryList( "TQLineEdit", "colText" ); + l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" ); TQObjectListIt columnsLineEditIt( *l ); while ( (obj = columnsLineEditIt.current()) != 0 ) { ++columnsLineEditIt; diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 874a410d..8ea48706 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -263,15 +263,15 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons set_splash_status( "Loading User Settings..." ); readConfig(); // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); actionEditor->parentWidget()->hide(); @@ -618,7 +618,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) if ( style ) w->setStyle( style ); - TQObjectList *l = w->queryList( "TQWidget" ); + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( style ) ( (TQWidget*)o )->setStyle( style ); @@ -1555,18 +1555,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) { const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - if ( text && qstrcmp( text->type(), "TQString") != 0 ) + if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) text = 0; const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( title && qstrcmp( title->type(), "TQString") != 0 ) + if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) title = 0; const TQMetaProperty* pagetitle = w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 ) + if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); - if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 ) + if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) pixmap = 0; if ( text && text->designable(w) || @@ -2935,11 +2935,11 @@ void MainWindow::setupActionManager() TQPopupMenu *menu = 0; TQToolBar *tb = 0; - if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) { + if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { menu = new TQPopupMenu( this, grp.latin1() ); menuBar()->insertItem( i18n( grp ), menu ); } - if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) { + if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { tb = new TQToolBar( this, grp.latin1() ); tb->setCloseMode( TQDockWindow::Undocked ); addToolBar( tb, grp ); @@ -3298,7 +3298,7 @@ void MainWindow::finishedRun() void MainWindow::enableAll( bool enable ) { menuBar()->setEnabled( enable ); - TQObjectList *l = queryList( "TQDockWindow" ); + TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o == wspace->parentWidget() || o == oWindow->parentWidget() || diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index 40d77fd1..6e208de1 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -357,7 +357,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, TQString( actionGroup->name() ) + "Menu" ); TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { @@ -863,7 +863,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) TQString n = TQString( g->name() ) + "Item"; formWindow()->unify( i, n, FALSE ); i->setName( n ); - TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { g = ::qt_cast(it.current()); diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp index 4f79ae57..a2226ac2 100644 --- a/kdevdesigner/designer/previewwidgetimpl.cpp +++ b/kdevdesigner/designer/previewwidgetimpl.cpp @@ -31,7 +31,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) : PreviewWidgetBase( parent, name ) { // install event filter on child widgets - TQObjectList *l = queryList("TQWidget"); + TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*l); TQObject * obj; while ((obj = it.current()) != 0) { diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index a1ecfd3d..a714bd07 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -1066,7 +1066,7 @@ TQObjectList *Project::formList( bool resolveFakeObjects ) const if ( resolveFakeObjects && f->formWindow()->isFake() ) l->append( objectForFakeForm( f->formWindow() ) ); else - l->append( f->formWindow()->child( 0, "TQWidget" ) ); + l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) ); } else if ( f->isFake() ) { l->append( objectForFakeFormFile( f ) ); } diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index c7a5d3ae..3ef4d687 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -861,7 +861,7 @@ QDateEdit *PropertyDateItem::lined() if ( lin ) return lin; lin = new QDateEdit( listview->viewport() ); - TQObjectList *l = lin->queryList( "TQLineEdit" ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -938,7 +938,7 @@ QTimeEdit *PropertyTimeItem::lined() lin = new QTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( "TQLineEdit" ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -1013,7 +1013,7 @@ QDateTimeEdit *PropertyDateTimeItem::lined() lin = new QDateTimeEdit( listview->viewport() ); connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( "TQLineEdit" ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) o->installEventFilter( listview ); delete l; @@ -1182,7 +1182,7 @@ TQSpinBox *PropertyIntItem::spinBox() spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1278,7 +1278,7 @@ TQSpinBox* PropertyLayoutItem::spinBox() spinBx->setSpecialValueText( i18n( "default" ) ); spinBx->hide(); spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( "TQLineEdit" ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; @@ -1351,7 +1351,7 @@ TQComboBox *PropertyListItem::combo() this, TQT_SLOT( setValue() ) ); comb->installEventFilter( listview ); if ( editable ) { - TQObjectList *ol = comb->queryList( "TQLineEdit" ); + TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); if ( ol && ol->first() ) ol->first()->installEventFilter( listview ); delete ol; diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index 70768b5b..eff7c84c 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -112,87 +112,87 @@ static struct { int key; const char* name; } keyname[] = { - { Qt::Key_Space, QT_TRANSLATE_NOOP( "TQAccel", "Space" ) }, - { Qt::Key_Escape, QT_TRANSLATE_NOOP( "TQAccel", "Esc" ) }, - { Qt::Key_Tab, QT_TRANSLATE_NOOP( "TQAccel", "Tab" ) }, - { Qt::Key_Backtab, QT_TRANSLATE_NOOP( "TQAccel", "Backtab" ) }, - { Qt::Key_Backspace, QT_TRANSLATE_NOOP( "TQAccel", "Backspace" ) }, - { Qt::Key_Return, QT_TRANSLATE_NOOP( "TQAccel", "Return" ) }, - { Qt::Key_Enter, QT_TRANSLATE_NOOP( "TQAccel", "Enter" ) }, - { Qt::Key_Insert, QT_TRANSLATE_NOOP( "TQAccel", "Ins" ) }, - { Qt::Key_Delete, QT_TRANSLATE_NOOP( "TQAccel", "Del" ) }, - { Qt::Key_Pause, QT_TRANSLATE_NOOP( "TQAccel", "Pause" ) }, - { Qt::Key_Print, QT_TRANSLATE_NOOP( "TQAccel", "Print" ) }, - { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "TQAccel", "SysReq" ) }, - { Qt::Key_Home, QT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, - { Qt::Key_End, QT_TRANSLATE_NOOP( "TQAccel", "End" ) }, - { Qt::Key_Left, QT_TRANSLATE_NOOP( "TQAccel", "Left" ) }, - { Qt::Key_Up, QT_TRANSLATE_NOOP( "TQAccel", "Up" ) }, - { Qt::Key_Right, QT_TRANSLATE_NOOP( "TQAccel", "Right" ) }, - { Qt::Key_Down, QT_TRANSLATE_NOOP( "TQAccel", "Down" ) }, - { Qt::Key_Prior, QT_TRANSLATE_NOOP( "TQAccel", "PgUp" ) }, - { Qt::Key_Next, QT_TRANSLATE_NOOP( "TQAccel", "PgDown" ) }, - { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "TQAccel", "CapsLock" ) }, - { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "NumLock" ) }, - { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "TQAccel", "ScrollLock" ) }, - { Qt::Key_Menu, QT_TRANSLATE_NOOP( "TQAccel", "Menu" ) }, - { Qt::Key_Help, QT_TRANSLATE_NOOP( "TQAccel", "Help" ) }, + { Qt::Key_Space, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, + { Qt::Key_Escape, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, + { Qt::Key_Tab, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, + { Qt::Key_Backtab, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, + { Qt::Key_Backspace, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, + { Qt::Key_Return, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, + { Qt::Key_Enter, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, + { Qt::Key_Insert, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, + { Qt::Key_Delete, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, + { Qt::Key_Pause, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, + { Qt::Key_Print, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, + { Qt::Key_SysReq, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, + { Qt::Key_Home, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { Qt::Key_End, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, + { Qt::Key_Left, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, + { Qt::Key_Up, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, + { Qt::Key_Right, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, + { Qt::Key_Down, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, + { Qt::Key_Prior, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, + { Qt::Key_Next, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, + { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, + { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, + { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, + { Qt::Key_Menu, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, + { Qt::Key_Help, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, // Multimedia keys - { Qt::Key_Back, QT_TRANSLATE_NOOP( "TQAccel", "Back" ) }, - { Qt::Key_Forward, QT_TRANSLATE_NOOP( "TQAccel", "Forward" ) }, - { Qt::Key_Stop, QT_TRANSLATE_NOOP( "TQAccel", "Stop" ) }, - { Qt::Key_Refresh, QT_TRANSLATE_NOOP( "TQAccel", "Refresh" ) }, - { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP( "TQAccel", "Volume Down" ) }, - { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP( "TQAccel", "Volume Mute" ) }, - { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP( "TQAccel", "Volume Up" ) }, - { Qt::Key_BassBoost, QT_TRANSLATE_NOOP( "TQAccel", "Bass Boost" ) }, - { Qt::Key_BassUp, QT_TRANSLATE_NOOP( "TQAccel", "Bass Up" ) }, - { Qt::Key_BassDown, QT_TRANSLATE_NOOP( "TQAccel", "Bass Down" ) }, - { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP( "TQAccel", "Treble Up" ) }, - { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP( "TQAccel", "Treble Down" ) }, - { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP( "TQAccel", "Media Play" ) }, - { Qt::Key_MediaStop, QT_TRANSLATE_NOOP( "TQAccel", "Media Stop" ) }, - { Qt::Key_MediaPrev, QT_TRANSLATE_NOOP( "TQAccel", "Media Previous" ) }, - { Qt::Key_MediaNext, QT_TRANSLATE_NOOP( "TQAccel", "Media Next" ) }, - { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP( "TQAccel", "Media Record" ) }, - { Qt::Key_HomePage, QT_TRANSLATE_NOOP( "TQAccel", "Home" ) }, - { Qt::Key_Favorites, QT_TRANSLATE_NOOP( "TQAccel", "Favorites" ) }, - { Qt::Key_Search, QT_TRANSLATE_NOOP( "TQAccel", "Search" ) }, - { Qt::Key_Standby, QT_TRANSLATE_NOOP( "TQAccel", "Standby" ) }, - { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP( "TQAccel", "Open URL" ) }, - { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP( "TQAccel", "Launch Mail" ) }, - { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP( "TQAccel", "Launch Media" ) }, - { Qt::Key_Launch0, QT_TRANSLATE_NOOP( "TQAccel", "Launch (0)" ) }, - { Qt::Key_Launch1, QT_TRANSLATE_NOOP( "TQAccel", "Launch (1)" ) }, - { Qt::Key_Launch2, QT_TRANSLATE_NOOP( "TQAccel", "Launch (2)" ) }, - { Qt::Key_Launch3, QT_TRANSLATE_NOOP( "TQAccel", "Launch (3)" ) }, - { Qt::Key_Launch4, QT_TRANSLATE_NOOP( "TQAccel", "Launch (4)" ) }, - { Qt::Key_Launch5, QT_TRANSLATE_NOOP( "TQAccel", "Launch (5)" ) }, - { Qt::Key_Launch6, QT_TRANSLATE_NOOP( "TQAccel", "Launch (6)" ) }, - { Qt::Key_Launch7, QT_TRANSLATE_NOOP( "TQAccel", "Launch (7)" ) }, - { Qt::Key_Launch8, QT_TRANSLATE_NOOP( "TQAccel", "Launch (8)" ) }, - { Qt::Key_Launch9, QT_TRANSLATE_NOOP( "TQAccel", "Launch (9)" ) }, - { Qt::Key_LaunchA, QT_TRANSLATE_NOOP( "TQAccel", "Launch (A)" ) }, - { Qt::Key_LaunchB, QT_TRANSLATE_NOOP( "TQAccel", "Launch (B)" ) }, - { Qt::Key_LaunchC, QT_TRANSLATE_NOOP( "TQAccel", "Launch (C)" ) }, - { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) }, - { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) }, - { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) }, + { Qt::Key_Back, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, + { Qt::Key_Forward, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, + { Qt::Key_Stop, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, + { Qt::Key_Refresh, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, + { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, + { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, + { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, + { Qt::Key_BassBoost, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, + { Qt::Key_BassUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, + { Qt::Key_BassDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, + { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, + { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, + { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, + { Qt::Key_MediaStop, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, + { Qt::Key_MediaPrev, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, + { Qt::Key_MediaNext, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, + { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, + { Qt::Key_HomePage, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { Qt::Key_Favorites, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, + { Qt::Key_Search, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, + { Qt::Key_Standby, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, + { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, + { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, + { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, + { Qt::Key_Launch0, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, + { Qt::Key_Launch1, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, + { Qt::Key_Launch2, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, + { Qt::Key_Launch3, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, + { Qt::Key_Launch4, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, + { Qt::Key_Launch5, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, + { Qt::Key_Launch6, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, + { Qt::Key_Launch7, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, + { Qt::Key_Launch8, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, + { Qt::Key_Launch9, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, + { Qt::Key_LaunchA, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, + { Qt::Key_LaunchB, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, + { Qt::Key_LaunchC, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, + { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, + { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, + { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, // -------------------------------------------------------------- // More consistent namings - { Qt::Key_Print, QT_TRANSLATE_NOOP( "TQAccel", "Print Screen" ) }, - { Qt::Key_Prior, QT_TRANSLATE_NOOP( "TQAccel", "Page Up" ) }, - { Qt::Key_Next, QT_TRANSLATE_NOOP( "TQAccel", "Page Down" ) }, - { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( "TQAccel", "Caps Lock" ) }, - { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "Num Lock" ) }, - { Qt::Key_NumLock, QT_TRANSLATE_NOOP( "TQAccel", "Number Lock" ) }, - { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( "TQAccel", "Scroll Lock" ) }, - { Qt::Key_Insert, QT_TRANSLATE_NOOP( "TQAccel", "Insert" ) }, - { Qt::Key_Delete, QT_TRANSLATE_NOOP( "TQAccel", "Delete" ) }, - { Qt::Key_Escape, QT_TRANSLATE_NOOP( "TQAccel", "Escape" ) }, - { Qt::Key_SysReq, QT_TRANSLATE_NOOP( "TQAccel", "System Request" ) }, + { Qt::Key_Print, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, + { Qt::Key_Prior, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, + { Qt::Key_Next, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, + { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, + { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, + { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, + { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, + { Qt::Key_Insert, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, + { Qt::Key_Delete, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, + { Qt::Key_Escape, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, + { Qt::Key_SysReq, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, { 0, 0 } }; @@ -881,7 +881,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea if ( ::qt_cast(obj) ) { TQTabWidget* tw = (TQTabWidget*) obj; - TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); + TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); for ( int i = 0; i < tb->count(); ++i ) { @@ -1772,7 +1772,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( colspan < 1 ) colspan = 1; - TQString className = e.attribute( "class", "TQWidget" ); + TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); #ifdef QT_CONTAINER_CUSTOM_WIDGETS TQString parentClassName = WidgetFactory::classNameOf( parent ); bool isPlugin = diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp index cb4bec53..e5bf7752 100644 --- a/kdevdesigner/designer/startdialogimpl.cpp +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -151,7 +151,7 @@ void StartDialog::initFileOpen() TQPoint point( 0, 0 ); fd->reparent( tab, point ); - TQObjectList *l = fd->queryList( "TQPushButton" ); + TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); TQObjectListIt it( *l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 410dab23..a38e75af 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -686,7 +686,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) { - if ( className == "TQPushButton" ) { + if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { TQPushButton *b = 0; if ( init ) { b = new QDesignerPushButton( parent, name ); @@ -697,7 +697,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWidget *w = find_formwindow( b ); b->setAutoDefault( w && ::qt_cast(((FormWindow*)w)->mainContainer()) ); return b; - } else if ( className == "TQToolButton" ) { + } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { if ( init ) { QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); if ( ::qt_cast(widgetOfContainer(parent))) { @@ -711,29 +711,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return tb; } return new QDesignerToolButton( parent, name ); - } else if ( className == "TQCheckBox" ) { + } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { if ( init ) { QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); cb->setText( TQString::fromLatin1( name ) ); return cb; } return new QDesignerCheckBox( parent, name ); - } else if ( className == "TQRadioButton" ) { + } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { if ( init ) { QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); rb->setText( TQString::fromLatin1( name ) ); return rb; } return new QDesignerRadioButton( parent, name ); - } else if ( className == "TQGroupBox" ) { + } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { if ( init ) return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); return new TQGroupBox( parent, name ); - } else if ( className == "TQButtonGroup" ) { + } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { if ( init ) return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); return new TQButtonGroup( parent, name ); - } else if ( className == "TQIconView" ) { + } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { #if !defined(QT_NO_ICONVIEW) TQIconView* iv = new TQIconView( parent, name ); if ( init ) @@ -742,7 +742,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare #else return 0; #endif - } else if ( className == "TQTable" ) { + } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { #if !defined(QT_NO_TABLE) if ( init ) return new TQTable( 3, 3, parent, name ); @@ -751,24 +751,24 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return 0; #endif #ifndef QT_NO_SQL - } else if ( className == "TQDataTable" ) { + } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { return new TQDataTable( parent, name ); #endif //QT_NO_SQL - } else if ( className == "QDateEdit" ) { + } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { return new QDateEdit( parent, name ); - } else if ( className == "QTimeEdit" ) { + } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { return new QTimeEdit( parent, name ); - } else if ( className == "QDateTimeEdit" ) { + } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { return new QDateTimeEdit( parent, name ); } - else if ( className == "TQListBox" ) { + else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { TQListBox* lb = new TQListBox( parent, name ); if ( init ) { lb->insertItem( i18n( "New Item" ) ); lb->setCurrentItem( 0 ); } return lb; - } else if ( className == "TQListView" ) { + } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { TQListView *lv = new TQListView( parent, name ); lv->setSorting( -1 ); if ( init ) { @@ -776,17 +776,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); } return lv; - } else if ( className == "TQLineEdit" ) + } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) return new TQLineEdit( parent, name ); - else if ( className == "TQSpinBox" ) + else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) return new TQSpinBox( parent, name ); - else if ( className == "TQSplitter" ) + else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) return new TQSplitter( parent, name ); - else if ( className == "TQMultiLineEdit" ) + else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) return new TQMultiLineEdit( parent, name ); - else if ( className == "TQTextEdit" ) + else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) return new TQTextEdit( parent, name ); - else if ( className == "TQLabel" || className == "TextLabel" ) { + else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setText( TQString::fromLatin1( name ) ); @@ -804,9 +804,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE ); } return l; - } else if ( className == "QLayoutWidget" ) + } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) return new QLayoutWidget( parent, name ); - else if ( className == "TQTabWidget" ) { + else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { TQTabWidget *tw = new QDesignerTabWidget( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); @@ -819,7 +819,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( w ); } return tw; - } else if ( className == "TQWidgetStack" ) { + } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); if ( init ) { FormWindow *fw = find_formwindow( parent ); @@ -829,9 +829,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( ws ); } return ws; - } else if ( className == "TQComboBox" ) { + } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { return new TQComboBox( FALSE, parent, name ); - } else if ( className == "TQWidget" ) { + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { if ( parent && ( ::qt_cast(parent) || ::qt_cast(parent) || @@ -847,7 +847,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } } return new TQWidget( parent, name ); - } else if ( className == "TQDialog" ) { + } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { TQDialog *dia = 0; if ( ::qt_cast(parent) ) dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); @@ -860,7 +860,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare #endif dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); return dia; - } else if ( className == "TQWizard" ) { + } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { TQWizard *wiz = new QDesignerWizard( parent, name ); #if defined(QT_NON_COMMERCIAL) if ( ::qt_cast(parent) ) @@ -889,17 +889,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else s->setOrientation( Qt::Horizontal ); return s; - } else if ( className == "TQLCDNumber" ) + } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) return new TQLCDNumber( parent, name ); - else if ( className == "TQProgressBar" ) + else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) return new TQProgressBar( parent, name ); - else if ( className == "TQTextView" ) + else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) return new TQTextView( parent, name ); - else if ( className == "TQTextBrowser" ) + else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) return new TQTextBrowser( parent, name ); - else if ( className == "TQDial" ) + else if ( className == TQDIAL_OBJECT_NAME_STRING ) return new TQDial( parent, name ); - else if ( className == "TQSlider" ) { + else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { TQSlider *s = new TQSlider( parent, name ); if ( !r ) return s; @@ -910,7 +910,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( s ); MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; - } else if ( className == "TQScrollBar" ) { + } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { TQScrollBar *s = new TQScrollBar( parent, name ); if ( !r ) return s; @@ -921,7 +921,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare MetaDataBase::addEntry( s ); MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); return s; - } else if ( className == "TQFrame" ) { + } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { if ( !init ) return new TQFrame( parent, name ); TQFrame *f = new TQFrame( parent, name ); @@ -940,7 +940,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else if ( r->width() < r->height() ) l->setOrientation( Qt::Vertical ); return l; - } else if ( className == "TQMainWindow" ) { + } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); mw->setDockEnabled( Qt::DockMinimized, FALSE ); QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); @@ -950,7 +950,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare (void)mw->statusBar(); dw->show(); return mw; - } else if ( className == "TQToolBox" ) { + } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { if ( !init ) return new QDesignerToolBox( parent, name ); TQToolBox *tb = new QDesignerToolBox( parent, name ); @@ -966,12 +966,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return tb; } #ifndef QT_NO_SQL - else if ( className == "TQDataBrowser" ) { + else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { TQWidget *w = new QDesignerDataBrowser( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); return w; - } else if ( className == "TQDataView" ) { + } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { TQWidget *w = new QDesignerDataView( parent, name ); if ( parent ) w->reparent( parent, TQPoint( 0, 0 ), TRUE ); @@ -1029,7 +1029,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay TQLayout *lay = w->layout(); if ( ::qt_cast(w) ) { - TQObjectList *l = lay->queryList( "TQLayout" ); + TQObjectList *l = lay->queryList( TQLAYOUT_OBJECT_NAME_STRING ); if ( l && l->first() ) lay = (TQLayout*)l->first(); delete l; @@ -1325,7 +1325,7 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } else if ( ::qt_cast(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); - else if ( o->isA( "TQFrame" ) ) { + else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); } else if ( ::qt_cast(o) || ::qt_cast(o) ) { @@ -1380,7 +1380,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className.contains( "IconView" ) ) return TRUE; - if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) + if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) return TRUE; if ( ::qt_cast(editorWidget) != 0 ) return TRUE; @@ -1443,7 +1443,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } - if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) { + if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); e->exec(); delete e; @@ -1549,7 +1549,7 @@ void QDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE ); + TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); if ( !l || !l->first() ) { delete l; return; diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index c9513043..562a647b 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -364,7 +364,7 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) { - TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), "TQDataTable" ); + TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key().ascii(), TQDATATABLE_OBJECT_NAME_STRING ); if ( !table ) continue; if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != @@ -391,8 +391,8 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge for ( TQMap::Iterator it = widgetFactory->buddies.begin(); it != widgetFactory->buddies.end(); ++it ) { - TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), "TQLabel" ); - TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), "TQWidget" ); + TQLabel *label = (TQLabel*)widgetFactory->toplevel->child( it.key().ascii(), TQLABEL_OBJECT_NAME_STRING ); + TQWidget *buddy = (TQWidget*)widgetFactory->toplevel->child( (*it).ascii(), TQWIDGET_OBJECT_NAME_STRING ); if ( label && buddy ) label->setBuddy( buddy ); } @@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec if ( !imageCollection.isNull() ) loadImageCollection( imageCollection ); - createWidgetInternal( widget, parent, 0, widget.attribute("class", "TQWidget") ); + createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) ); TQWidget *w = toplevel; if ( !w ) return 0; @@ -703,7 +703,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, spacer = new TQSpacerItem( w, h, sizeType, TQSizePolicy::Minimum ); } - if ( parent->inherits("TQGridLayout") ) { + if ( parent->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { ((TQGridLayout *) parent)->addMultiCell( spacer, row, row + rowspan - 1, column, column + colspan - 1, vertical ? Qt::AlignHCenter : Qt::AlignVCenter ); @@ -763,11 +763,11 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, } if ( parent != 0 ) { - if ( parent->inherits("TQListView") ) { + if ( parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) { createListViewColumn( (TQListView *) parent, text, pixmap, clickable, resizable ); #ifndef QT_NO_TABLE - } else if ( parent->inherits("TQTable") ) { + } else if ( parent->inherits(TQTABLE_OBJECT_NAME_STRING) ) { createTableColumnOrRow( (TQTable *) parent, text, pixmap, field, isRow ); #endif @@ -786,7 +786,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, Q_UINT8 objectTag; TQListView *listView = 0; - if ( parent != 0 && parent->inherits("TQListView") ) + if ( parent != 0 && parent->inherits(TQLISTVIEW_OBJECT_NAME_STRING) ) parent = (TQListView *) parent; TQListViewItem *item = 0; if ( listView != 0 ) { @@ -848,9 +848,9 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, TQPixmap pixmap = pixmaps.last(); if ( parent != 0 ) { - if ( parent->inherits("TQComboBox") || - parent->inherits("TQListBox") ) { - TQListBox *listBox = (TQListBox *) parent->qt_cast( "TQListBox" ); + if ( parent->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || + parent->inherits(TQLISTBOX_OBJECT_NAME_STRING) ) { + TQListBox *listBox = (TQListBox *) parent->qt_cast( TQLISTBOX_OBJECT_NAME_STRING ); if ( listBox == 0 ) listBox = ((TQComboBox *) parent)->listBox(); @@ -860,7 +860,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, (void) new TQListBoxPixmap( listBox, pixmap, text ); } #ifndef QT_NO_ICONVIEW - } else if ( parent->inherits("TQIconView") ) { + } else if ( parent->inherits(TQICONVIEW_OBJECT_NAME_STRING) ) { (void) new TQIconViewItem( (TQIconView *) parent, text, pixmap ); #endif } @@ -915,50 +915,50 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( isQObject ) { if ( parent != 0 ) { if ( parent->isWidgetType() ) { - if ( parent->inherits("TQMainWindow") ) { + if ( parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { parentWidget = ((TQMainWindow *) parent)->centralWidget(); } else { parentWidget = (TQWidget *) parent; } - } else if ( parent->inherits("TQLayout") ) { + } else if ( parent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { parentLayout = (TQLayout *) parent; parentWidget = ancestorWidget; } } - if ( className == "TQAction" ) { + if ( className == TQACTION_OBJECT_NAME_STRING ) { unpackCString( strings, in, className ); - if ( className == "TQActionGroup" ) { + if ( className == TQACTIONGROUP_OBJECT_NAME_STRING ) { obj = new TQActionGroup( parent ); } else { obj = new TQAction( parent ); } - } else if ( className == "TQLayout" ) { + } else if ( className == TQLAYOUT_OBJECT_NAME_STRING ) { unpackCString( strings, in, className ); LayoutType type = Grid; - if ( className == "TQHBoxLayout" ) { + if ( className == TQHBOXLAYOUT_OBJECT_NAME_STRING ) { type = HBox; - } else if ( className == "TQVBoxLayout" ) { + } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { type = VBox; } - if ( parentLayout != 0 && parentLayout->inherits("TQGridLayout") ) { + if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { layout = createLayout( 0, 0, type ); } else { layout = createLayout( parentWidget, parentLayout, type ); } obj = layout; - } else if ( className == "TQMenuBar" ) { + } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { unpackCString( strings, in, className ); widget = ((TQMainWindow *) parent)->menuBar(); obj = widget; - } else if ( className == "TQToolBar" ) { + } else if ( className == TQTOOLBAR_OBJECT_NAME_STRING ) { Q_UINT8 dock; in >> dock; unpackCString( strings, in, className ); widget = new TQToolBar( TQString::null, (TQMainWindow *) parent, (Qt::Dock) dock ); obj = widget; - } else if ( className == "TQWidget" ) { + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { unpackCString( strings, in, className ); widget = createWidget( className, parentWidget, 0 ); obj = widget; @@ -1099,15 +1099,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, break; case Object_SubAction: inputObject( objects, numObjects, strings, in, parentWidget, - obj != 0 ? obj : parent, "TQAction" ); + obj != 0 ? obj : parent, TQACTION_OBJECT_NAME_STRING ); break; case Object_SubLayout: inputObject( objects, numObjects, strings, in, parentWidget, obj, - "TQLayout" ); + TQLAYOUT_OBJECT_NAME_STRING ); break; case Object_SubWidget: inputObject( objects, numObjects, strings, in, parentWidget, obj, - "TQWidget" ); + TQWIDGET_OBJECT_NAME_STRING ); break; case Object_TextProperty: unpackCString( strings, in, name ); @@ -1118,9 +1118,9 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "title" ) { if ( parent != 0 ) { - if ( parent->inherits("TQTabWidget") ) { + if ( parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) ) { ((TQTabWidget *) parent)->insertTab( widget, str ); - } else if ( parent->inherits("TQWizard") ) { + } else if ( parent->inherits(TQWIZARD_OBJECT_NAME_STRING) ) { ((TQWizard *) parent)->addPage( widget, str ); } } @@ -1136,7 +1136,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( metAttribute > 0 ) { if ( name == "id" ) { - if ( parent != 0 && parent->inherits("TQWidgetStack") ) + if ( parent != 0 && parent->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING) ) ((TQWidgetStack *) parent)->addWidget( widget, value.toInt() ); } } else { @@ -1153,7 +1153,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, if ( parentLayout != 0 ) { if ( widget != 0 ) { - if ( parentLayout->inherits("TQGridLayout") ) { + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { ((TQGridLayout *) parentLayout)->addMultiCellWidget( widget, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1161,7 +1161,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, ((TQBoxLayout *) parentLayout)->addWidget( widget ); } } else if ( layout != 0 ) { - if ( parentLayout->inherits("TQGridLayout") ) { + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { ((TQGridLayout *) parentLayout)->addMultiCellLayout( layout, row, row + rowspan - 1, column, column + colspan - 1 ); @@ -1219,7 +1219,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, unpackUInt16( in, labelNo ); unpackUInt16( in, buddyNo ); TQLabel *label = - (TQLabel *) objects[labelNo]->qt_cast( "TQLabel" ); + (TQLabel *) objects[labelNo]->qt_cast( TQLABEL_OBJECT_NAME_STRING ); if ( label != 0 ) label->setBuddy( (TQWidget *) objects[buddyNo] ); } while ( !END_OF_BLOCK() ); @@ -1301,7 +1301,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, break; case Block_Menubar: inputObject( objects, numObjects, strings, in, toplevel, toplevel, - "TQMenuBar" ); + TQMENUBAR_OBJECT_NAME_STRING ); break; case Block_Slots: { @@ -1334,7 +1334,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Toolbars: do { inputObject( objects, numObjects, strings, in, toplevel, - toplevel, "TQToolBar" ); + toplevel, TQTOOLBAR_OBJECT_NAME_STRING ); } while ( !END_OF_BLOCK() ); break; case Block_Variables: @@ -1345,7 +1345,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, case Block_Widget: toplevel = (TQWidget *) inputObject( objects, numObjects, strings, in, toplevel, parent, - "TQWidget" ); + TQWIDGET_OBJECT_NAME_STRING ); if ( toplevel != 0 ) toplevel->setName( name ); break; diff --git a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp index 8171c6b8..5bd6b949 100644 --- a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp +++ b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp @@ -31,7 +31,7 @@ void kmdikonsole::respawn() if (!m_part) return; - if (m_part->widget()->inherits("TQFrame")) + if (m_part->widget()->inherits(TQFRAME_OBJECT_NAME_STRING)) ((TQFrame*)m_part->widget())->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); m_haskonsole=true; diff --git a/languages/sql/sqlconfigwidget.ui.h b/languages/sql/sqlconfigwidget.ui.h index 26a9fb0b..b7725a49 100644 --- a/languages/sql/sqlconfigwidget.ui.h +++ b/languages/sql/sqlconfigwidget.ui.h @@ -38,7 +38,7 @@ public: virtual void setContentFromEditor( TQWidget* w ) { - if ( w->inherits( "TQComboBox" ) ) + if ( w->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) setText( ( (TQComboBox*)w )->currentText() ); else TQTableItem::setContentFromEditor( w ); @@ -62,7 +62,7 @@ public: virtual void setContentFromEditor( TQWidget* w ) { - if ( w->inherits( "TQSpinBox" ) ) + if ( w->inherits( TQSPINBOX_OBJECT_NAME_STRING ) ) setText( ( (TQSpinBox*)w )->text() ); else TQTableItem::setContentFromEditor( w ); diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp index 546360c6..f9f07fd8 100644 --- a/lib/util/kdevshellwidget.cpp +++ b/lib/util/kdevshellwidget.cpp @@ -52,7 +52,7 @@ void KDevShellWidget::activate( ) setFocusProxy( m_konsolePart->widget() ); m_konsolePart->widget()->setFocus(); - if ( m_konsolePart->widget()->inherits("TQFrame") ) + if ( m_konsolePart->widget()->inherits(TQFRAME_OBJECT_NAME_STRING) ) ((TQFrame*)m_konsolePart->widget())->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); m_konsolePart->widget()->show(); diff --git a/parts/fileselector/kactionselector.cpp b/parts/fileselector/kactionselector.cpp index a3c4034d..0534901b 100644 --- a/parts/fileselector/kactionselector.cpp +++ b/parts/fileselector/kactionselector.cpp @@ -391,7 +391,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) } return true; } - else if ( o->inherits( "TQListBox" ) ) + else if ( o->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) { switch ( ((TQKeyEvent*)e)->key() ) { diff --git a/parts/konsole/konsoleviewwidget.cpp b/parts/konsole/konsoleviewwidget.cpp index 1604a321..cced1b88 100644 --- a/parts/konsole/konsoleviewwidget.cpp +++ b/parts/konsole/konsoleviewwidget.cpp @@ -62,7 +62,7 @@ void KonsoleViewWidget::activate() setFocusProxy(part->widget()); part->widget()->setFocus(); - if (part->widget()->inherits("TQFrame")) + if (part->widget()->inherits(TQFRAME_OBJECT_NAME_STRING)) ((TQFrame*)part->widget())->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); vbox->addWidget(part->widget()); diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index df720fa0..73164f86 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -577,7 +577,7 @@ void SimpleMainWindow::documentChangedState(const KURL &url, DocumentState state void SimpleMainWindow::closeTab() { // actionCollection()->action("file_close")->activate(); - if (sender()->isA("TQToolButton") && sender()->parent()->isA("DTabWidget")) + if (sender()->isA(TQTOOLBUTTON_OBJECT_NAME_STRING) && sender()->parent()->isA("DTabWidget")) { DTabWidget *tab = (DTabWidget*)sender()->parent(); if (tab && tab->currentPage())