From 62ba147d56dfc18eeb9656874723e31ca1d7a5c8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 6 Dec 2008 11:58:44 +0100 Subject: Removed unuseful actions.. --- src/tabwidget.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/tabwidget.cpp') diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 7f39bd8a..51a404d0 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -28,6 +28,9 @@ #include "urlbar.h" #include "webview.h" +// KDE Includes +#include + // Qt Includes #include #include @@ -183,7 +186,8 @@ void TabBar::dropEvent(QDropEvent *event) void TabBar::reloadTab() { - if (KAction *action = qobject_cast(sender())) { + if (KAction *action = qobject_cast(sender())) + { int index = action->data().toInt(); emit reloadTab(index); } @@ -218,29 +222,21 @@ TabWidget::TabWidget(QWidget *parent) // Actions m_newTabAction = new KAction(KIcon("tab-new"), i18n("New &Tab"), this); - m_newTabAction->setShortcuts(KShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_N, Qt::CTRL+Qt::Key_T)); + m_newTabAction->setShortcut( KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_N, Qt::CTRL + Qt::Key_T) ); m_newTabAction->setIconVisibleInMenu(false); connect(m_newTabAction, SIGNAL(triggered()), this, SLOT(newTab())); m_closeTabAction = new KAction(KIcon("tab-close"), i18n("&Close Tab"), this); - m_closeTabAction->setShortcut(Qt::CTRL+Qt::Key_W); + m_closeTabAction->setShortcut( KShortcut( Qt::CTRL + Qt::Key_W ) ); m_closeTabAction->setIconVisibleInMenu(false); connect(m_closeTabAction, SIGNAL(triggered()), this, SLOT(closeTab())); m_nextTabAction = new KAction(i18n("Show Next Tab"), this); - QList shortcuts; - shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BraceRight)); - shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_PageDown)); - shortcuts.append(QKeySequence(Qt::CTRL + Qt::Key_Tab)); - m_nextTabAction->setShortcuts(shortcuts); + m_nextTabAction->setShortcut( KShortcut( Qt::CTRL | Qt::Key_Tab ) ); connect(m_nextTabAction, SIGNAL(triggered()), this, SLOT(nextTab())); m_previousTabAction = new KAction(i18n("Show Previous Tab"), this); - shortcuts.clear(); - shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_BraceLeft)); - shortcuts.append(QKeySequence(Qt::CTRL | Qt::Key_PageUp)); - shortcuts.append( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Tab) );; - m_previousTabAction->setShortcuts(shortcuts); + m_previousTabAction->setShortcut( KShortcut( Qt::CTRL | Qt::SHIFT | Qt::Key_Tab ) ); connect(m_previousTabAction, SIGNAL(triggered()), this, SLOT(previousTab())); m_recentlyClosedTabsMenu = new KMenu(this); -- cgit v1.2.1