diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2010-07-13 14:43:47 +0200 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2010-07-13 14:46:06 +0200 |
commit | 3ed60eaa6caa69d73392966c906cdf407bcc3d82 (patch) | |
tree | d0c396af80c8396ba2efcb5d85aeb23491f1e728 /src/plugins/cppeditor/cpphoverhandler.cpp | |
parent | a4cd93889fcab17868e6858c7903a01cfc731507 (diff) | |
download | qt-creator-3ed60eaa6caa69d73392966c906cdf407bcc3d82.tar.gz |
C++ tooltip: Option to integrate Qt docs into tooltips.
Diffstat (limited to 'src/plugins/cppeditor/cpphoverhandler.cpp')
-rw-r--r-- | src/plugins/cppeditor/cpphoverhandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphoverhandler.cpp b/src/plugins/cppeditor/cpphoverhandler.cpp index 013ffb723b..d47cde0c7b 100644 --- a/src/plugins/cppeditor/cpphoverhandler.cpp +++ b/src/plugins/cppeditor/cpphoverhandler.cpp @@ -38,6 +38,7 @@ #include <extensionsystem/pluginmanager.h> #include <texteditor/itexteditor.h> #include <texteditor/basetexteditor.h> +#include <texteditor/displaysettings.h> #include <debugger/debuggerconstants.h> #include <utils/htmldocextractor.h> @@ -148,7 +149,10 @@ void CppHoverHandler::showToolTip(TextEditor::ITextEditor *editor, const QPoint QToolTip::hideText(); } else { if (m_matchingHelpCandidate != -1) { - const QString &contents = getDocContents(); + QString contents; + TextEditor::BaseTextEditor *baseEditor = baseTextEditor(editor); + if (baseEditor && baseEditor->displaySettings().m_integrateDocsIntoTooltips) + contents = getDocContents(); if (!contents.isEmpty()) { m_toolTip = contents; } else { |