1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Fixed focus handling when dropping urls in locationbar.

This commit is contained in:
nowrep 2012-03-01 18:32:53 +01:00
parent c2cf6f8ad2
commit 8b9934b236
6 changed files with 12 additions and 8 deletions

View File

@ -168,7 +168,8 @@ void LocationBar::showMostVisited()
// Workaround: If we show popup when text in locationbar is empty and then
// move up and down in completer and then we leave completer -> completer will
// set text in locationbar back to last "real" completion
keyPressEvent(new QKeyEvent(QEvent::KeyPress, Qt::Key_unknown, Qt::NoModifier, QString(" ")));
QKeyEvent event(QEvent::KeyPress, Qt::Key_unknown, Qt::NoModifier, QString(" "));
keyPressEvent(&event);
}
m_locationCompleter->showMostVisited();
}
@ -326,6 +327,8 @@ void LocationBar::dropEvent(QDropEvent* event)
m_webView->setFocus();
emit loadUrl(dropUrl);
QFocusEvent event(QFocusEvent::FocusOut);
QLineEdit::focusOutEvent(&event);
return;
}
}
@ -337,6 +340,8 @@ void LocationBar::dropEvent(QDropEvent* event)
m_webView->setFocus();
emit loadUrl(dropUrl);
QFocusEvent event(QFocusEvent::FocusOut);
QLineEdit::focusOutEvent(&event);
return;
}

View File

@ -293,7 +293,9 @@ void WebSearchBar::dropEvent(QDropEvent* event)
QString dropText = event->mimeData()->text();
setText(dropText);
search();
QLineEdit::focusOutEvent(new QFocusEvent(QFocusEvent::FocusOut));
QFocusEvent event(QFocusEvent::FocusOut);
QLineEdit::focusOutEvent(&event);
return;
}
QLineEdit::dropEvent(event);

View File

@ -289,7 +289,7 @@ int TabWidget::addView(QUrl url, const QString &title, const Qz::NewTabPositionF
if (position == -1 && m_newTabAfterActive && !(openFlags & Qz::NT_TabAtTheEnd)) {
// If we are opening newBgTab from pinned tab, make sure it won't be
// opened between other pinned tabs
if (openFlags & Qz::NT_NotSelectedTab && m_lastBackgroundTabIndex != -1) {
if (openFlags &Qz::NT_NotSelectedTab && m_lastBackgroundTabIndex != -1) {
position = m_lastBackgroundTabIndex + 1;
}
else {

View File

@ -40,10 +40,6 @@ void sigpipe_handler(int s)
int main(int argc, char* argv[])
{
Q_INIT_RESOURCE(data);
Q_INIT_RESOURCE(icons);
Q_INIT_RESOURCE(html);
#ifdef Q_WS_X11
QApplication::setGraphicsSystem("raster"); // Better overall performance on X11

View File

@ -1,4 +1,4 @@
<?php
<?php
// Header + Footer
$site_title = "QupZilla - მარტივი მრავალპლატფორმული ბრაუზერი";
$qupzilla = "QupZilla";

View File

@ -16,6 +16,7 @@ TRANSLATIONS += $$PWD/cs_CZ.ts\
$$PWD/sr_RS.ts\
$$PWD/sv_SE.ts\
$$PWD/id_ID.ts\
$$PWD/ka_GE.ts\
include(../src/defines.pri)