The websearchbar when suggesting to add search engine didnt check if the search engine already exists
Details
Diff Detail
- Repository
- R875 Falkon
- Branch
- patch-1
- Lint
No Linters Available - Unit
No Unit Test Coverage
It doesn't necessarily mean that two search engines are identical if they have same name.
Can you check how this is handled in other browsers?
I only found websearch bar in Otter and Firefox, of which Otter doesn't checks but firefox. Also for the same search engine, the url in search engine manager can be different based on "post data" but not name. But I am not sure whether search engine are identical if they have same name
Apologies, I miss that otter also supports this, but it uses url to check for duplicates
if (!SearchEnginesManager::hasSearchEngine(searchEngines.at(i).url)) { menu.addAction(tr("Add %1").arg(searchEngines.at(i).title.isEmpty() ? tr("(untitled)") : searchEngines.at(i).title))->setData(searchEngines.at(i).url); }
But one thing I found here is that for otter the url itself contains the query parameters (POST DATA), which is seperated from url in fakon
Either we should compare the contents of OpenSearch xml file to check if two search engines are the same (but those xml files are not stored in Falkon), or check the URL from which the OpenSearch file was downloaded (not stored either, but is easier to do).
Currently, there is no automatic checking of available search engines from loaded webpage, user must manually click websearch button, so I don't really see it as an issue to show already configured search engines. Besides, nowadays more users prefer to hide the websearch bar completely, so they won't have access to this feature.