mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
[dolphin/search] Avoid unnecesary reloads on setSearchPath
Summary: Check in `setSearchPath()` if the `url` passed is already the `searchPath` This was causing an effect where reloading the same search URL results on buttons `From Here/Everywhere` toggling. See D24422 Test Plan: On your home folder press `Ctrl-F` several times Buttons `From Here/Everywhere` should now not toggle each time Reviewers: #dolphin, elvisangelaccio, meven, ngraham Reviewed By: #dolphin, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24449
This commit is contained in:
parent
304ab14e08
commit
e30357343b
|
@ -81,6 +81,10 @@ QString DolphinSearchBox::text() const
|
|||
|
||||
void DolphinSearchBox::setSearchPath(const QUrl& url)
|
||||
{
|
||||
if (url == m_searchPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_searchPath = url;
|
||||
|
||||
QFontMetrics metrics(m_fromHereButton->font());
|
||||
|
|
Loading…
Reference in a new issue