aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/textutils.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2019-02-12 13:08:46 +0100
committerEike Ziller <eike.ziller@qt.io>2019-02-15 14:06:50 +0000
commit2bebfe9985e1da4a6227e82ef2b596b26ec964ea (patch)
tree349c07630206a7a1413ac3ed329e68f0401474c1 /src/libs/utils/textutils.h
parentb1e1c91e04c850918eb64cc6b4a3e4d343c0d73a (diff)
Help: Add fallback word lookup for context help to base text editor
If we do not have a hover handler, or that did not produce any result, use the word under cursor and try with that. This adds at least some help fallback mechanism to all text editors, e.g. we get some context help (though a bit crude) for Pyside "for free". Change-Id: I1b6d91ad6f46bfd12e242b1aec9f4fcadae23403 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/libs/utils/textutils.h')
-rw-r--r--src/libs/utils/textutils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/utils/textutils.h b/src/libs/utils/textutils.h
index 1d4e8f7ffb..895023903e 100644
--- a/src/libs/utils/textutils.h
+++ b/src/libs/utils/textutils.h
@@ -53,6 +53,7 @@ QTCREATOR_UTILS_EXPORT QTextCursor selectAt(QTextCursor textCursor, uint line, u
QTCREATOR_UTILS_EXPORT QTextCursor flippedCursor(const QTextCursor &cursor);
QTCREATOR_UTILS_EXPORT QTextCursor wordStartCursor(const QTextCursor &cursor);
+QTCREATOR_UTILS_EXPORT QString wordUnderCursor(const QTextCursor &cursor);
QTCREATOR_UTILS_EXPORT int utf8NthLineOffset(const QTextDocument *textDocument,
const QByteArray &buffer,