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

Fixed handling special chars when searching with locationbar shortcuts

This commit is contained in:
nowrep 2012-05-22 12:11:27 +02:00
parent cf5d399f00
commit 9872f3281f
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ QUrl LocationBar::createUrl()
int firstSpacePos = text().indexOf(" "); int firstSpacePos = text().indexOf(" ");
if (firstSpacePos != -1) { if (firstSpacePos != -1) {
QString shortcut = text().mid(0, firstSpacePos); QString shortcut = text().mid(0, firstSpacePos);
QString searchedString = text().mid(firstSpacePos).trimmed(); QString searchedString = QUrl::toPercentEncoding(text().mid(firstSpacePos).trimmed());
SearchEngine en = mApp->searchEnginesManager()->engineForShortcut(shortcut); SearchEngine en = mApp->searchEnginesManager()->engineForShortcut(shortcut);
if (!en.name.isEmpty()) { if (!en.name.isEmpty()) {

View File

@ -52,7 +52,7 @@ void Menu::mouseReleaseEvent(QMouseEvent* e)
return; return;
} }
if (e->button() == Qt::LeftButton && e->modifiers() == Qt::NoModifier) { if ((e->button() == Qt::LeftButton || e->button() == Qt::RightButton) && e->modifiers() == Qt::NoModifier) {
closeAllMenus(); closeAllMenus();
act->trigger(); act->trigger();
e->accept(); e->accept();