From 239b7e5542c8f501dafd6e45872b0c4a0aa97d49 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 16 Feb 2010 10:02:44 +0100 Subject: QKeySequenceList --> KShortcut --- src/mainwindow.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f1999d4f..8e8ecdb4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -267,23 +267,26 @@ void MainWindow::setupActions() KStandardAction::quit(this , SLOT(close()), actionCollection()); a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection()); - QList shortcutFindList; - shortcutFindList << KStandardShortcut::find() << QKeySequence( Qt::Key_Slash ); - a->setShortcuts( shortcutFindList ); + KShortcut findShortcut = KStandardShortcut::find(); + findShortcut.setAlternate( Qt::Key_Slash ); + a->setShortcut( findShortcut ); KStandardAction::findNext(this, SLOT(findNext()) , actionCollection()); KStandardAction::findPrev(this, SLOT(findPrevious()) , actionCollection()); a = KStandardAction::fullScreen(this, SLOT(viewFullScreen(bool)), this, actionCollection()); - QList shortcutFullScreenList; - shortcutFullScreenList << KStandardShortcut::fullScreen() << QKeySequence( Qt::Key_F11 ); - a->setShortcuts( shortcutFullScreenList ); + KShortcut fullScreenShortcut = KStandardShortcut::fullScreen(); + fullScreenShortcut.setAlternate( Qt::Key_F11 ); + a->setShortcut( fullScreenShortcut ); KStandardAction::home(this, SLOT(homePage()), actionCollection()); KStandardAction::preferences(this, SLOT(preferences()), actionCollection()); a = KStandardAction::redisplay(m_view, SLOT(webReload()), actionCollection()); a->setText(i18n("Reload")); + KShortcut reloadShortcut = KStandardShortcut::reload(); + reloadShortcut.setAlternate( Qt::CTRL + Qt::Key_R ); + a->setShortcut( reloadShortcut ); a = new KAction(KIcon("process-stop"), i18n("&Stop"), this); a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Period)); -- cgit v1.2.1