diff --git a/src/plugins/cpptools/cpphoverhandler.cpp b/src/plugins/cpptools/cpphoverhandler.cpp index 752f50725b5..341899b5d51 100644 --- a/src/plugins/cpptools/cpphoverhandler.cpp +++ b/src/plugins/cpptools/cpphoverhandler.cpp @@ -42,33 +42,6 @@ using namespace TextEditor; namespace CppTools { -QString CppHoverHandler::tooltipTextForHelpItem(const HelpItem &helpItem) -{ - // If Qt is built with a namespace, we still show the tip without it, as - // it is in the docs and for consistency with the doc extraction mechanism. - const HelpItem::Category category = helpItem.category(); - const QString &contents = helpItem.extractContent(false); - if (!contents.isEmpty()) { - if (category == HelpItem::ClassOrNamespace) - return helpItem.helpId() + contents; - else - return contents; - } else if (category == HelpItem::Typedef || - category == HelpItem::Enum || - category == HelpItem::ClassOrNamespace) { - // This approach is a bit limited since it cannot be used for functions - // because the help id doesn't really help in that case. - QString prefix; - if (category == HelpItem::Typedef) - prefix = QLatin1String("typedef "); - else if (category == HelpItem::Enum) - prefix = QLatin1String("enum "); - return prefix + helpItem.helpId(); - } - - return QString(); -} - void CppHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report) { Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); }); diff --git a/src/plugins/cpptools/cpphoverhandler.h b/src/plugins/cpptools/cpphoverhandler.h index c80c36d0c23..38dcb01b745 100644 --- a/src/plugins/cpptools/cpphoverhandler.h +++ b/src/plugins/cpptools/cpphoverhandler.h @@ -33,9 +33,6 @@ namespace CppTools { class CPPTOOLS_EXPORT CppHoverHandler : public TextEditor::BaseHoverHandler { -public: - static QString tooltipTextForHelpItem(const Core::HelpItem &help); - private: void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos,