]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/search/dolphinsearchbox.cpp
Merge branch 'Applications/17.04'
[dolphin.git] / src / search / dolphinsearchbox.cpp
index 5d5906b789579d033153187101c291bc681e82c2..c6943c60881c6dcfe8fc6c5bf2b3729e318d3742 100644 (file)
@@ -230,8 +230,13 @@ bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event)
 {
     switch (event->type()) {
     case QEvent::FocusIn:
-        setActive(true);
-        setFocus();
+        // #379135: we get the FocusIn event when we close a tab but we don't want to emit
+        // the activated() signal before the removeTab() call in DolphinTabWidget::closeTab() returns.
+        // To avoid this issue, we delay the activation of the search box.
+        QTimer::singleShot(0, this, [this] {
+            setActive(true);
+            setFocus();
+        });
         break;
 
     default: