forked from qt-creator/qt-creator
TextEditor: Privatize BaseHoverHandler::decorateToolTip()
Never overridden, and does not look safe to invoke more than once. Change-Id: If5f3830f3fbf26badb6335443defd628c05cf65a Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -62,7 +62,7 @@ void CppHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, Rep
|
|||||||
const QSharedPointer<CppElement> &cppElement = evaluator.cppElement();
|
const QSharedPointer<CppElement> &cppElement = evaluator.cppElement();
|
||||||
const QStringList candidates = cppElement->helpIdCandidates;
|
const QStringList candidates = cppElement->helpIdCandidates;
|
||||||
const HelpItem helpItem(candidates + fallback, cppElement->helpMark, cppElement->helpCategory);
|
const HelpItem helpItem(candidates + fallback, cppElement->helpMark, cppElement->helpCategory);
|
||||||
setLastHelpItemIdentified(helpItem); // tool tip appended by decorateToolTip
|
setLastHelpItemIdentified(helpItem); // tool tip appended by BaseHoverHandler::decorateToolTip
|
||||||
if (!helpItem.isValid())
|
if (!helpItem.isValid())
|
||||||
tip += cppElement->tooltip;
|
tip += cppElement->tooltip;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ protected:
|
|||||||
// Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
// Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
||||||
// at the beginning of an implementation to ensure this in any case.
|
// at the beginning of an implementation to ensure this in any case.
|
||||||
virtual void identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report);
|
virtual void identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report);
|
||||||
virtual void decorateToolTip();
|
|
||||||
virtual void operateTooltip(TextEditorWidget *editorWidget, const QPoint &point);
|
virtual void operateTooltip(TextEditorWidget *editorWidget, const QPoint &point);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void process(TextEditorWidget *widget, int pos, ReportPriority report);
|
void process(TextEditorWidget *widget, int pos, ReportPriority report);
|
||||||
|
void decorateToolTip();
|
||||||
|
|
||||||
QString m_toolTip;
|
QString m_toolTip;
|
||||||
Core::HelpItem m_lastHelpItemIdentified;
|
Core::HelpItem m_lastHelpItemIdentified;
|
||||||
|
|||||||
Reference in New Issue
Block a user