Commit c00e69ac authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Christian Stenger

Fix compilation with Qt 5.3

Functor override for QTimer::singleShow was introduced in 5.4

Change-Id: I8970c73a1d4b97c6cc588cddca8d617fdaa8bfa2
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent c7252719
......@@ -1060,7 +1060,7 @@ void DebuggerToolTipManager::registerEngine(DebuggerEngine *)
loadSessionData();
}
void slotUpdateVisibleToolTips()
void DebuggerToolTipManager::slotUpdateVisibleToolTips()
{
purgeClosedToolTips();
if (m_tooltips.isEmpty())
......@@ -1239,7 +1239,7 @@ static void slotEditorOpened(IEditor *e)
if (BaseTextEditor *textEditor = qobject_cast<BaseTextEditor *>(e)) {
TextEditorWidget *widget = textEditor->editorWidget();
QObject::connect(widget->verticalScrollBar(), &QScrollBar::valueChanged,
slotUpdateVisibleToolTips);
&DebuggerToolTipManager::slotUpdateVisibleToolTips);
QObject::connect(widget, &TextEditorWidget::tooltipOverrideRequested,
slotTooltipOverrideRequested);
}
......@@ -1253,14 +1253,15 @@ void DebuggerToolTipManager::debugModeEntered()
QWidget *topLevel = ICore::mainWindow()->topLevelWidget();
topLevel->installEventFilter(this);
EditorManager *em = EditorManager::instance();
connect(em, &EditorManager::currentEditorChanged, slotUpdateVisibleToolTips);
connect(em, &EditorManager::currentEditorChanged,
&DebuggerToolTipManager::slotUpdateVisibleToolTips);
connect(em, &EditorManager::editorOpened, slotEditorOpened);
foreach (IEditor *e, DocumentModel::editorsForOpenedDocuments())
slotEditorOpened(e);
// Position tooltips delayed once all the editor placeholder layouting is done.
if (!m_tooltips.isEmpty())
QTimer::singleShot(0, slotUpdateVisibleToolTips);
QTimer::singleShot(0, this, SLOT(slotUpdateVisibleToolTips()));
}
}
......
......@@ -72,7 +72,7 @@ typedef QList<DebuggerToolTipContext> DebuggerToolTipContexts;
class DebuggerToolTipManager : public QObject
{
Q_DECLARE_TR_FUNCTIONS(Debugger::DebuggerToolTipManager)
Q_OBJECT
public:
DebuggerToolTipManager();
......@@ -100,6 +100,9 @@ public:
static void loadSessionData();
static void saveSessionData();
static void closeAllToolTips();
public slots:
static void slotUpdateVisibleToolTips();
};
} // namespace Internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment