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

[SearchEngines] Fixed issue with default engine when more engines have same name

This commit is contained in:
nowrep 2014-02-04 00:25:09 +01:00
parent ffa1e0561f
commit b2b6d198f7
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
Version 1.7.0
* development version
* added support for window.onload event
* added support for external.AddSearchProvider js function
Version 1.6.1
* released 26 January 2014

View File

@ -215,12 +215,12 @@ void SearchEnginesDialog::moveDown()
void SearchEnginesDialog::reloadEngines()
{
ui->treeWidget->clear();
const QString defaultEngineName = mApp->searchEnginesManager()->defaultEngine().name;
const SearchEngine defaultEngine = mApp->searchEnginesManager()->defaultEngine();
foreach (const SearchEngine &en, m_manager->allEngines()) {
QTreeWidgetItem* item = new QTreeWidgetItem();
setEngine(item, en);
changeItemToDefault(item, en.name == defaultEngineName);
changeItemToDefault(item, en == defaultEngine);
item->setIcon(0, en.icon);
item->setText(1, en.shortcut);

View File

@ -50,7 +50,8 @@ public:
bool operator==(const Engine &other) const {
return (this->name == other.name &&
this->url == other.url &&
this->suggestionsUrl == other.suggestionsUrl);
this->suggestionsUrl == other.suggestionsUrl &&
this->shortcut == other.shortcut);
}
};