summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-01 18:23:15 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-02-01 18:23:15 +0100
commit11fb734a7335570f46bbfa8b956e9cc85d1ef828 (patch)
tree92de074a05df68ca1f389ebbb591f4e34ad3b163
parentJust check access keys on CTRL release (diff)
downloadrekonq-11fb734a7335570f46bbfa8b956e9cc85d1ef828.tar.xz
Revert "Just check access keys on CTRL release"
This reverts commit 78ad9ec7f2501bbfe6cf5113351a408929cb78ff. oops... I did it again...:)
-rw-r--r--src/webview.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 115df2a1..1c2a4028 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -778,29 +778,25 @@ void WebView::keyPressEvent(QKeyEvent *event)
void WebView::keyReleaseEvent(QKeyEvent *event)
{
// access keys management
- if (ReKonfig::accessKeysEnabled() && m_accessKeysPressed)
+ if (ReKonfig::accessKeysEnabled())
{
- if (event->key() != Qt::Key_Control)
- {
+ if (m_accessKeysPressed && event->key() != Qt::Key_Control)
m_accessKeysPressed = false;
+
+ if (m_accessKeysPressed && !(event->modifiers() & Qt::ControlModifier))
+ {
+ kDebug() << "Shotting access keys";
+ QTimer::singleShot(200, this, SLOT(accessKeyShortcut()));
+ event->accept();
+ return;
}
else
{
- if ((event->modifiers() & Qt::ControlModifier))
- {
- checkForAccessKey(event);
- kDebug() << "Hiding access keys";
- hideAccessKeys();
- event->accept();
- return;
- }
- else
- {
- kDebug() << "Shotting access keys";
- QTimer::singleShot(200, this, SLOT(accessKeyShortcut()));
- event->accept();
- return;
- }
+ checkForAccessKey(event);
+ kDebug() << "Hiding access keys";
+ hideAccessKeys();
+ event->accept();
+ return;
}
}