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

Fixed selecting search engine when using shortcuts in locationbar

It is now returning invalid engine when shortcut is empty
This commit is contained in:
nowrep 2011-11-14 16:00:54 +01:00
parent 2ef2553167
commit 06b73291f3

View File

@ -71,13 +71,18 @@ void SearchEnginesManager::loadSettings()
SearchEngine SearchEnginesManager::engineForShortcut(const QString &shortcut)
{
Engine returnEngine;
if (shortcut.isEmpty())
return returnEngine;
foreach(Engine en, m_allEngines) {
if (en.shortcut == shortcut) {
return en;
returnEngine = en;
break;
}
}
return Engine();
return returnEngine;
}
QUrl SearchEnginesManager::searchUrl(const Engine &engine, const QString &string)