summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpphoverhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-06-01 13:04:05 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-06-01 13:33:35 +0200
commitc15a2bcd226ae675d60375ef7e1dabb62a88e9ee (patch)
treedcf19d9980e978a243e47feecf0474c220a1062b /src/plugins/cppeditor/cpphoverhandler.cpp
parent2641496a997ca3ab22cf29bd6ac0ef36f12a046e (diff)
downloadqt-creator-c15a2bcd226ae675d60375ef7e1dabb62a88e9ee.tar.gz
Fixed context help for Qt includes
Was broken in 915a07bdbbd5dc65332369a117acde58793a165d, which caused help links only to be resolved for expressions under the cursor. Task-number: QTCREATORBUG-159 Reviewed-by: ckamm
Diffstat (limited to 'src/plugins/cppeditor/cpphoverhandler.cpp')
-rw-r--r--src/plugins/cppeditor/cpphoverhandler.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp
index 2c91f5cba4..dabf25c791 100644
--- a/src/plugins/cppeditor/cpphoverhandler.cpp
+++ b/src/plugins/cppeditor/cpphoverhandler.cpp
@@ -297,23 +297,24 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
}
}
+ if (m_helpEngineNeedsSetup
+ && m_helpEngine->registeredDocumentations().count() > 0) {
+ m_helpEngine->setupData();
+ m_helpEngineNeedsSetup = false;
+ }
+ QMap<QString, QUrl> helpLinks;
+
if (m_toolTip.isEmpty()) {
foreach (const Document::Include &incl, doc->includes()) {
if (incl.line() == lineNumber) {
m_toolTip = QDir::toNativeSeparators(incl.fileName());
m_helpId = QFileInfo(incl.fileName()).fileName();
+ helpLinks = m_helpEngine->linksForIdentifier(m_helpId);
break;
}
}
}
- if (m_helpEngineNeedsSetup
- && m_helpEngine->registeredDocumentations().count() > 0) {
- m_helpEngine->setupData();
- m_helpEngineNeedsSetup = false;
- }
-
- QMap<QString, QUrl> helpLinks;
if (m_helpId.isEmpty()) {
// Move to the end of a qualified name
bool stop = false;