1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Fixed hiding access keys when scrolling page with scrollbars

This commit is contained in:
nowrep 2012-08-23 11:03:33 +02:00
parent 38456333a3
commit bae437edeb
2 changed files with 4 additions and 3 deletions

View File

@ -134,6 +134,7 @@ bool AKN_Handler::eventFilter(QObject* obj, QEvent* event)
} }
switch (event->type()) { switch (event->type()) {
case QEvent::MouseButtonPress:
case QEvent::Resize: case QEvent::Resize:
case QEvent::FocusOut: case QEvent::FocusOut:
case QEvent::Wheel: case QEvent::Wheel:
@ -309,7 +310,7 @@ void AKN_Handler::showAccessKeys()
m_view.data()->installEventFilter(this); m_view.data()->installEventFilter(this);
connect(m_view.data(), SIGNAL(loadStarted()), this, SLOT(hideAccessKeys())); connect(m_view.data(), SIGNAL(loadStarted()), this, SLOT(hideAccessKeys()));
connect(m_view.data()->page(), SIGNAL(scrollRequested(int,int,QRect)), this, SLOT(hideAccessKeys())); connect(m_view.data()->page(), SIGNAL(scrollRequested(int,int,QRect)), this, SLOT(hideAccessKeys()));
#if QT_VERSION > 0x040800 #if QT_VERSION >= 0x040800
connect(m_view.data()->page(), SIGNAL(viewportChangeRequested()), this, SLOT(hideAccessKeys())); connect(m_view.data()->page(), SIGNAL(viewportChangeRequested()), this, SLOT(hideAccessKeys()));
#endif #endif
} }
@ -331,7 +332,7 @@ void AKN_Handler::hideAccessKeys()
m_view.data()->removeEventFilter(this); m_view.data()->removeEventFilter(this);
disconnect(m_view.data(), SIGNAL(loadStarted()), this, SLOT(hideAccessKeys())); disconnect(m_view.data(), SIGNAL(loadStarted()), this, SLOT(hideAccessKeys()));
disconnect(m_view.data()->page(), SIGNAL(scrollRequested(int,int,QRect)), this, SLOT(hideAccessKeys())); disconnect(m_view.data()->page(), SIGNAL(scrollRequested(int,int,QRect)), this, SLOT(hideAccessKeys()));
#if QT_VERSION > 0x040800 #if QT_VERSION >= 0x040800
disconnect(m_view.data()->page(), SIGNAL(viewportChangeRequested()), this, SLOT(hideAccessKeys())); disconnect(m_view.data()->page(), SIGNAL(viewportChangeRequested()), this, SLOT(hideAccessKeys()));
#endif #endif
} }

View File

@ -36,7 +36,7 @@ PluginSpec AKN_Plugin::pluginSpec()
spec.name = "Access Keys Navigation"; spec.name = "Access Keys Navigation";
spec.info = "Access keys navigation for QupZilla"; spec.info = "Access keys navigation for QupZilla";
spec.description = "Provides support for navigating in webpages by keyboard shortcuts"; spec.description = "Provides support for navigating in webpages by keyboard shortcuts";
spec.version = "0.3.2"; spec.version = "0.4.1";
spec.author = "David Rosca <nowrep@gmail.com>"; spec.author = "David Rosca <nowrep@gmail.com>";
spec.icon = QPixmap(":/accesskeysnavigation/data/icon.png"); spec.icon = QPixmap(":/accesskeysnavigation/data/icon.png");
spec.hasSettings = true; spec.hasSettings = true;