mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
Merge branch 'Applications/18.04'
This commit is contained in:
commit
615838083d
|
@ -231,10 +231,14 @@ bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event)
|
||||||
// #379135: we get the FocusIn event when we close a tab but we don't want to emit
|
// #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.
|
// the activated() signal before the removeTab() call in DolphinTabWidget::closeTab() returns.
|
||||||
// To avoid this issue, we delay the activation of the search box.
|
// To avoid this issue, we delay the activation of the search box.
|
||||||
|
// We also don't want to schedule the activation process if we are already active,
|
||||||
|
// otherwise we can enter in a loop of FocusIn/FocusOut events with the searchbox of another tab.
|
||||||
|
if (!isActive()) {
|
||||||
QTimer::singleShot(0, this, [this] {
|
QTimer::singleShot(0, this, [this] {
|
||||||
setActive(true);
|
setActive(true);
|
||||||
setFocus();
|
setFocus();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue