From a2bae01d006ea8053e85bc16d09a8cf40a4b0b75 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 03:03:11 +0000 Subject: Fix kdewebdev FTBFS under Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kommander/editor/mainwindow.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'kommander/editor/mainwindow.cpp') diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp index f87b7c2c..7a47b852 100644 --- a/kommander/editor/mainwindow.cpp +++ b/kommander/editor/mainwindow.cpp @@ -626,27 +626,27 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) return true; } case TQEvent::ContextMenu: - if (o->inherits("TQDesignerPopupMenu")) + if (o->inherits("QDesignerPopupMenu")) break; - if (o && currentTool() == POINTER_TOOL && (o->inherits("TQDesignerMenuBar") || - o->inherits("TQDesignerToolBar") || - (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("TQDesignerToolBarSeparator")) && - o->tqparent() && o->tqparent()->inherits("TQDesignerToolBar"))) { + if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") || + o->inherits("QDesignerToolBar") || + (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) && + o->tqparent() && o->tqparent()->inherits("QDesignerToolBar"))) { TQWidget *w = (TQWidget*)o; - if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("TQDesignerToolBarSeparator")) + if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator")) w = w->tqparentWidget(); TQWidget *pw = w->tqparentWidget(); while (pw) { if (pw->inherits("FormWindow")) { ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w)); - if (!o->inherits("TQDesignerToolBar")) + if (!o->inherits("QDesignerToolBar")) return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) && - !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("TQDesignerToolBarSeparator"); + !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator"); } pw = pw->tqparentWidget(); } } - if (o && (o->inherits("TQDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) + if (o && (o->inherits("QDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING)) && e->type() == TQEvent::ContextMenu) break; if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL) @@ -745,7 +745,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e) break; case TQEvent::Enter: case TQEvent::Leave: - if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("TQDesignerMenuBar")) + if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar")) break; return true; case TQEvent::Resize: @@ -821,7 +821,7 @@ TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const TQWidget *MainWindow::isAToolBarChild(TQObject *o) const { while (o) { - if (o->inherits("TQDesignerToolBar")) + if (o->inherits("QDesignerToolBar")) return (TQWidget*)o; if (o->inherits("FormWindow")) return 0; @@ -1071,7 +1071,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMapinherits(TQTABWIDGET_OBJECT_NAME_STRING)) { if (ids.isEmpty()) ids << rmbWidgets->insertSeparator(0); - if (((TQDesignerTabWidget*)w)->count() > 1) { + if (((QDesignerTabWidget*)w)->count() > 1) { ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0)); commands.insert("remove", id); } @@ -1220,7 +1220,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (tw->currentPage()) { - TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2"). tqarg(dtw->pageTitle()).tqarg(tw->name()), formWindow(), tw, tw->currentPage()); @@ -1273,7 +1273,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands cmd->execute(); } else if (id == commands[ "remove" ]) { if (wiz->currentPage()) { - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2"). tqarg(dw->pageTitle()).tqarg(wiz->name()), formWindow(), wiz, wiz->indexOf(wiz->currentPage())); @@ -1287,7 +1287,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands } else if (id == commands[ "rename" ]) { bool ok = false; - TQDesignerWizard *dw = (TQDesignerWizard*)wiz; + QDesignerWizard *dw = (QDesignerWizard*)wiz; TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this); if (ok) { TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name())); -- cgit v1.2.1