1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fixed issue with completer when writing "ch" into location bar.

- ?? for some reason, it selected random items when typing "ch" ??
This commit is contained in:
nowrep 2012-04-24 15:58:36 +02:00
parent c9517460a2
commit 23613ab310
2 changed files with 7 additions and 6 deletions

View File

@ -45,6 +45,7 @@ QPersistentModelIndex LocationCompleterView::hoveredIndex() const
bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
{
Q_UNUSED(object)
// Event filter based on QCompleter::eventFilter from qcompleter.cpp
switch (event->type()) {
@ -121,12 +122,12 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
} // switch (keyEvent->key())
(static_cast<QObject*>(focusProxy()))->event(keyEvent);
break;
return true;
}
case QEvent::Show:
m_ignoreNextMouseMove = true;
return false;
break;
case QEvent::MouseButtonPress:
if (!underMouse()) {
@ -135,16 +136,16 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event)
}
break;
case QEvent::InputMethod:
case QEvent::ShortcutOverride:
case QEvent::InputMethod:
QApplication::sendEvent(focusProxy(), event);
break;
default:
return QListView::eventFilter(object, event);
break;
} // switch (event->type())
return QListView::eventFilter(object, event);
return false;
}
void LocationCompleterView::close()

View File

@ -490,7 +490,7 @@ QString WebPage::userAgentForUrl(const QUrl &url) const
// Let Google services (and Facebook) play nice with us
if (host.contains("google") || host.contains("facebook")) {
if (s_fakeUserAgent.isEmpty()) {
s_fakeUserAgent = "Mozilla/5.0 (" + qz_buildSystem() + ") AppleWebKit/" + QupZilla::WEBKITVERSION + " (KHTML, like Gecko) Chrome/10.0 Safari/" + QupZilla::WEBKITVERSION;
s_fakeUserAgent = QString("Mozilla/5.0 (%1) AppleWebKit/%2 (KHTML, like Gecko) Chrome/10.0 Safari/%2").arg(qz_buildSystem(), QupZilla::WEBKITVERSION);
}
return s_fakeUserAgent;