CppHoverHandler: Remove unused function

Change-Id: I76aad25e16424e0d0dad16732b7562a90819c407
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Eike Ziller
2019-01-24 14:17:10 +01:00
parent 4f8022888b
commit 4faefe7343
2 changed files with 0 additions and 30 deletions

View File

@@ -42,33 +42,6 @@ using namespace TextEditor;
namespace CppTools { 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) void CppHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report)
{ {
Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); }); Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });

View File

@@ -33,9 +33,6 @@ namespace CppTools {
class CPPTOOLS_EXPORT CppHoverHandler : public TextEditor::BaseHoverHandler class CPPTOOLS_EXPORT CppHoverHandler : public TextEditor::BaseHoverHandler
{ {
public:
static QString tooltipTextForHelpItem(const Core::HelpItem &help);
private: private:
void identifyMatch(TextEditor::TextEditorWidget *editorWidget, void identifyMatch(TextEditor::TextEditorWidget *editorWidget,
int pos, int pos,