aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/basehoverhandler.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2017-06-29 16:35:48 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2017-06-30 08:58:07 +0000
commit7a09bb441853667de80f911a36c75d8b49a38c18 (patch)
treee8429636d0249826eb52acbb08c95f8b7d0381ff /src/plugins/texteditor/basehoverhandler.cpp
parent0f7e69034e0b800b559d777085d58f6fb2006036 (diff)
TextEditor: Reduce BaseHoverHandler::identifyMatch() calls
...because they are potentially expensive. Change-Id: Iaa235ea1fa864a0a67f3ed10b7f89d23179c642b Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/basehoverhandler.cpp')
-rw-r--r--src/plugins/texteditor/basehoverhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp
index abbf2154abf..56ad0c0ddb8 100644
--- a/src/plugins/texteditor/basehoverhandler.cpp
+++ b/src/plugins/texteditor/basehoverhandler.cpp
@@ -33,9 +33,10 @@ namespace TextEditor {
BaseHoverHandler::~BaseHoverHandler()
{}
-void BaseHoverHandler::showToolTip(TextEditorWidget *widget, const QPoint &point)
+void BaseHoverHandler::showToolTip(TextEditorWidget *widget, const QPoint &point, bool decorate)
{
- decorateToolTip();
+ if (decorate)
+ decorateToolTip();
operateTooltip(widget, point);
}