Index: src/views/dolphinview.h =================================================================== --- src/views/dolphinview.h +++ src/views/dolphinview.h @@ -23,6 +23,7 @@ #include "dolphintabwidget.h" #include "dolphin_export.h" +#include "views/tooltips/tooltipmanager.h" #include #include @@ -698,6 +699,7 @@ void updateViewState(); void hideToolTip(); + void hideToolTipInstantly(); /** * Calculates the number of currently shown files into Index: src/views/dolphinview.cpp =================================================================== --- src/views/dolphinview.cpp +++ src/views/dolphinview.cpp @@ -744,6 +744,7 @@ break; case QEvent::KeyPress: + hideToolTipInstantly(); if (GeneralSettings::useTabForSwitchingSplitView()) { QKeyEvent* keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) { @@ -1423,6 +1424,15 @@ #endif } +void DolphinView::hideToolTipInstantly() +{ +#ifdef HAVE_BALOO + if (GeneralSettings::showToolTips()) { + m_toolTipManager->hideToolTip(ToolTipManager::HideToolTipFlag::Instantly); + } +#endif +} + void DolphinView::calculateItemCount(int& fileCount, int& folderCount, KIO::filesize_t& totalFileSize) const Index: src/views/tooltips/tooltipmanager.h =================================================================== --- src/views/tooltips/tooltipmanager.h +++ src/views/tooltips/tooltipmanager.h @@ -42,6 +42,11 @@ Q_OBJECT public: + enum class HideToolTipFlag { + Instantly, + Later, + }; + explicit ToolTipManager(QWidget* parent); ~ToolTipManager() override; @@ -56,7 +61,7 @@ /** * Hides the currently shown tooltip. */ - void hideToolTip(); + void hideToolTip(HideToolTipFlag flag = HideToolTipFlag::Later); signals: /** Index: src/views/tooltips/tooltipmanager.cpp =================================================================== --- src/views/tooltips/tooltipmanager.cpp +++ src/views/tooltips/tooltipmanager.cpp @@ -104,7 +104,7 @@ Q_ASSERT(!m_metaDataRequested); } -void ToolTipManager::hideToolTip() +void ToolTipManager::hideToolTip(HideToolTipFlag flag) { if (m_appliedWaitCursor) { QApplication::restoreOverrideCursor(); @@ -116,7 +116,14 @@ m_showToolTipTimer->stop(); m_contentRetrievalTimer->stop(); if (m_tooltipWidget) { - m_tooltipWidget->hideLater(); + switch (flag) { + case HideToolTipFlag::Instantly: + m_tooltipWidget->hide(); + break; + case HideToolTipFlag::Later: + m_tooltipWidget->hideLater(); + break; + } } }