From 5183376f1ef53f4d1e49b6cb89718414f3f7b9cd Mon Sep 17 00:00:00 2001 From: Hamish Rodda Date: Mon, 29 Oct 2007 10:46:55 +0000 Subject: [PATCH] Remove associateWidget that was too effective (obviously not working before, the patched version prevented the actions from being invoked) Commit results of setShortcut() audit svn path=/trunk/KDE/kdebase/apps/konsole/; revision=730686 --- src/MainWindow.cpp | 11 +++++------ src/SessionController.cpp | 2 +- src/SessionController.h | 4 ++-- src/ViewManager.cpp | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 40dc877d..eb712b79 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -62,7 +62,6 @@ MainWindow::MainWindow() setXMLFile("konsole/konsoleui.rc"); setupActions(); - actionCollection()->associateWidget(this); // create view manager _viewManager = new ViewManager(this,actionCollection()); @@ -168,19 +167,19 @@ void MainWindow::setupActions() KActionCollection* collection = actionCollection(); // File Menu - QAction* newTabAction = collection->addAction("new-tab"); + KAction* newTabAction = collection->addAction("new-tab"); newTabAction->setIcon( KIcon("openterm") ); newTabAction->setText( i18n("New &Tab") ); newTabAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_N) ); connect( newTabAction , SIGNAL(triggered()) , this , SLOT(newTab()) ); - QAction* newWindowAction = collection->addAction("new-window"); + KAction* newWindowAction = collection->addAction("new-window"); newWindowAction->setIcon( KIcon("window-new") ); newWindowAction->setText( i18n("New &Window") ); newWindowAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_M) ); connect( newWindowAction , SIGNAL(triggered()) , this , SLOT(newWindow()) ); - QAction* remoteConnectionAction = collection->addAction("remote-connection"); + KAction* remoteConnectionAction = collection->addAction("remote-connection"); remoteConnectionAction->setText( i18n("Remote Connection...") ); remoteConnectionAction->setIcon( KIcon("network") ); remoteConnectionAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_R) ); @@ -188,7 +187,7 @@ void MainWindow::setupActions() #ifndef KONSOLE_PART - QAction* quitAction = KStandardAction::quit( this , SLOT(close()) , collection ); + KAction* quitAction = KStandardAction::quit( this , SLOT(close()) , collection ); // the default shortcut for quit is typically Ctrl+[Some Letter, usually Q] but that is reserved for // use by terminal applications quitAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_Q); @@ -226,7 +225,7 @@ void MainWindow::setupActions() KStandardAction::configureNotifications( this , SLOT(configureNotifications()) , collection ); KStandardAction::keyBindings( this , SLOT(showShortcutsDialog()) , collection ); - QAction* manageProfilesAction = collection->addAction("manage-profiles"); + KAction* manageProfilesAction = collection->addAction("manage-profiles"); manageProfilesAction->setText( i18n("Manage Profiles...") ); manageProfilesAction->setIcon( KIcon("configure") ); connect( manageProfilesAction , SIGNAL(triggered()) , this , SLOT(showManageProfilesDialog()) ); diff --git a/src/SessionController.cpp b/src/SessionController.cpp index addbf229..83965884 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -392,7 +392,7 @@ void SessionController::setShowMenuAction(QAction* action) void SessionController::setupActions() { - QAction* action = 0; + KAction* action = 0; KToggleAction* toggleAction = 0; KActionCollection* collection = actionCollection(); diff --git a/src/SessionController.h b/src/SessionController.h index e069907d..a73bfa00 100644 --- a/src/SessionController.h +++ b/src/SessionController.h @@ -226,8 +226,8 @@ private: RegExpFilter* _searchFilter; KAction* _searchToggleAction; - QAction* _findNextAction; - QAction* _findPreviousAction; + KAction* _findNextAction; + KAction* _findPreviousAction; static KIcon _activityIcon; static KIcon _silenceIcon; diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index 41ad14db..9f44e8d5 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -150,7 +150,7 @@ void ViewManager::setupActions() multiViewOnlyActions << closeOtherAction; - QAction* detachViewAction = collection->addAction("detach-view"); + KAction* detachViewAction = collection->addAction("detach-view"); detachViewAction->setIcon( KIcon("tab-detach") ); detachViewAction->setText( i18n("&Detach View") ); // Ctrl+Shift+D is not used as a shortcut by default because it is too close -- GitLab