]> cloud.milkyroute.net Git - dolphin.git/commitdiff
DolphinViewContainer: make sure searchbox is initialized before setSearchPath
authorAkseli Lahtinen <akselmo@akselmo.dev>
Mon, 16 Dec 2024 12:25:43 +0000 (12:25 +0000)
committerAkseli Lahtinen <akselmo@akselmo.dev>
Mon, 16 Dec 2024 12:25:43 +0000 (12:25 +0000)
If searchBox is not initialized, it can't be updated properly
with setSearchPath due to some buttons not existing.
There is also just no need to update it if it's not initialized.

Make sure we check for it's initialized during setting the search path.

BUG:497021

src/search/dolphinsearchbox.cpp

index 56e6543e79ddb5cad7adf6ba728197cea08b9dbd..ee425501d876628c044895933b1cecfdf5f9114b 100644 (file)
@@ -74,7 +74,7 @@ QString DolphinSearchBox::text() const
 
 void DolphinSearchBox::setSearchPath(const QUrl &url)
 {
-    if (url == m_searchPath) {
+    if (url == m_searchPath || !m_initialized) {
         return;
     }