aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-06-01 13:04:05 +0200
committerhjk <qtc-committer@nokia.com>2010-06-01 14:36:57 +0200
commited190d45031c6bc98ccec1f86651bd8ae6de06cb (patch)
tree85d3e7daef8c4f15d2475b38f26338fad100a9df
parente922616fdcbd65ee5f9636a57b1adf38d3566c25 (diff)
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 (cherry picked from commit c15a2bcd226ae675d60375ef7e1dabb62a88e9ee)
-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;