summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-20 21:39:05 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-20 21:39:05 +0300
commit8a9a513ecd352768a7c14d30252394c6973a352e (patch)
treeab433b5c7c552360bb7ed811b44755b39550007d /src
parentRemove sync timer (diff)
downloadnheko-8a9a513ecd352768a7c14d30252394c6973a352e.tar.xz
Move ctrl-k callback to the MainWindow
Diffstat (limited to 'src')
-rw-r--r--src/ChatPage.cc9
-rw-r--r--src/MainWindow.cc9
2 files changed, 9 insertions, 9 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc

index 514494ea..d8280a4a 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc
@@ -577,15 +577,6 @@ ChatPage::loadStateFromCache() } void -ChatPage::keyPressEvent(QKeyEvent *event) -{ - if (event->key() == Qt::Key_K) { - if (event->modifiers() == Qt::ControlModifier) - showQuickSwitcher(); - } -} - -void ChatPage::showQuickSwitcher() { if (quickSwitcher_.isNull()) { diff --git a/src/MainWindow.cc b/src/MainWindow.cc
index 8cb2b562..f6276967 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc
@@ -101,6 +101,15 @@ MainWindow::MainWindow(QWidget *parent) } void +MainWindow::keyPressEvent(QKeyEvent *e) +{ + if ((e->key() == Qt::Key_K) && (e->modifiers().testFlag(Qt::ControlModifier))) + chat_page_->showQuickSwitcher(); + else + QMainWindow::keyPressEvent(e); +} + +void MainWindow::restoreWindowSize() { QSettings settings;