TextEditor: Fix wrong tooltip when split mode is used

It was possible to get a tooltip with cached text from other editor area

Fixes: QTCREATORBUG-28571
Change-Id: I4250856e6c165eed70ddb4a6c888e16b4a6b045d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Mikhail Khachayants
2022-12-06 15:28:39 +03:00
parent 763c76b477
commit 81075b813c
3 changed files with 15 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ public:
virtual void abort() {} // Implement for asynchronous priority reporter
void showToolTip(TextEditorWidget *widget, const QPoint &point);
bool lastHelpItemAppliesTo(const TextEditorWidget *widget) const;
protected:
enum {
@@ -68,6 +69,7 @@ private:
Core::HelpItem m_lastHelpItemIdentified;
int m_priority = -1;
bool m_isContextHelpRequest = false;
TextEditorWidget *m_lastWidget = nullptr;
};
} // namespace TextEditor