mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
[SearchShortcuts] Fixed using search shortcuts longer than one character
This commit is contained in:
parent
0758ba39ab
commit
d61b72bd87
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -166,7 +166,7 @@ QUrl LocationBar::createUrl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_inlineCompletionVisible) {
|
if (isInlineCompletionVisible()) {
|
||||||
urlToLoad = WebView::guessUrlFromString(text() + m_completer.domainCompletion());
|
urlToLoad = WebView::guessUrlFromString(text() + m_completer.domainCompletion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +194,11 @@ QString LocationBar::convertUrlToText(const QUrl &url) const
|
||||||
return stringUrl;
|
return stringUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocationBar::isInlineCompletionVisible() const
|
||||||
|
{
|
||||||
|
return m_inlineCompletionVisible && !m_completer.domainCompletion().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
void LocationBar::urlEnter()
|
void LocationBar::urlEnter()
|
||||||
{
|
{
|
||||||
const QUrl url = createUrl();
|
const QUrl url = createUrl();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -96,6 +96,7 @@ private:
|
||||||
|
|
||||||
QUrl createUrl();
|
QUrl createUrl();
|
||||||
QString convertUrlToText(const QUrl &url) const;
|
QString convertUrlToText(const QUrl &url) const;
|
||||||
|
bool isInlineCompletionVisible() const;
|
||||||
|
|
||||||
void showGoButton();
|
void showGoButton();
|
||||||
void hideGoButton();
|
void hideGoButton();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -97,6 +97,7 @@ void SearchEnginesManager::loadSettings()
|
||||||
SearchEngine SearchEnginesManager::engineForShortcut(const QString &shortcut)
|
SearchEngine SearchEnginesManager::engineForShortcut(const QString &shortcut)
|
||||||
{
|
{
|
||||||
Engine returnEngine;
|
Engine returnEngine;
|
||||||
|
|
||||||
if (shortcut.isEmpty()) {
|
if (shortcut.isEmpty()) {
|
||||||
return returnEngine;
|
return returnEngine;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user