Changeset View
Changeset View
Standalone View
Standalone View
src/views/tooltips/tooltipmanager.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 98 | connect(m_fileMetaDataWidget.data(), &DolphinFileMetaDataWidget::urlActivated, | |||
---|---|---|---|---|---|
99 | this, &ToolTipManager::urlActivated); | 99 | this, &ToolTipManager::urlActivated); | ||
100 | 100 | | |||
101 | m_contentRetrievalTimer->start(); | 101 | m_contentRetrievalTimer->start(); | ||
102 | m_showToolTipTimer->start(); | 102 | m_showToolTipTimer->start(); | ||
103 | m_toolTipRequested = true; | 103 | m_toolTipRequested = true; | ||
104 | Q_ASSERT(!m_metaDataRequested); | 104 | Q_ASSERT(!m_metaDataRequested); | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | void ToolTipManager::hideToolTip() | 107 | void ToolTipManager::hideToolTip(const HideBehavior behavior) | ||
108 | { | 108 | { | ||
109 | if (m_appliedWaitCursor) { | 109 | if (m_appliedWaitCursor) { | ||
110 | QApplication::restoreOverrideCursor(); | 110 | QApplication::restoreOverrideCursor(); | ||
111 | m_appliedWaitCursor = false; | 111 | m_appliedWaitCursor = false; | ||
112 | } | 112 | } | ||
113 | 113 | | |||
114 | m_toolTipRequested = false; | 114 | m_toolTipRequested = false; | ||
115 | m_metaDataRequested = false; | 115 | m_metaDataRequested = false; | ||
116 | m_showToolTipTimer->stop(); | 116 | m_showToolTipTimer->stop(); | ||
117 | m_contentRetrievalTimer->stop(); | 117 | m_contentRetrievalTimer->stop(); | ||
118 | if (m_tooltipWidget) { | 118 | if (m_tooltipWidget) { | ||
119 | switch (behavior) { | ||||
120 | case HideBehavior::Instantly: | ||||
121 | m_tooltipWidget->hide(); | ||||
122 | break; | ||||
123 | case HideBehavior::Later: | ||||
elvisangelaccio: Coding style: `case` should not be more indented than `switch` | |||||
119 | m_tooltipWidget->hideLater(); | 124 | m_tooltipWidget->hideLater(); | ||
125 | break; | ||||
126 | } | ||||
120 | } | 127 | } | ||
121 | } | 128 | } | ||
122 | 129 | | |||
123 | void ToolTipManager::startContentRetrieval() | 130 | void ToolTipManager::startContentRetrieval() | ||
124 | { | 131 | { | ||
125 | if (!m_toolTipRequested) { | 132 | if (!m_toolTipRequested) { | ||
126 | return; | 133 | return; | ||
127 | } | 134 | } | ||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |
Coding style: case should not be more indented than switch