diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-11-12 13:18:02 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-11-26 12:55:11 +0000 |
commit | a2e7b8412f56841e12ed20a39f4a38e32d3c1e30 (patch) | |
tree | 586dabdaf301070f3428cb7582dce13cff81cfb7 /src/virtualkeyboard/inputcontext.cpp | |
parent | c0ac7a4c684e2fed60a72ceee53da89eea3f95a7 (diff) |
Restrict more sensitive debugging output
There are more places where sensitive information could accidentally be
disclosed.
Also, move SENSITIVE_DEBUG to config.pri so that plugins can use it.
Change-Id: Ifa4ccbd6bf4bf79412f29984c662c9e58ea01992
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Yuntaek Rim <yuntaek.rim@myscript.com>
(cherry picked from commit 5d2d0564a36f99224dc53ad477416097516c6b77)
Diffstat (limited to 'src/virtualkeyboard/inputcontext.cpp')
-rw-r--r-- | src/virtualkeyboard/inputcontext.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/virtualkeyboard/inputcontext.cpp b/src/virtualkeyboard/inputcontext.cpp index ccc29bb8..ff4cb3ce 100644 --- a/src/virtualkeyboard/inputcontext.cpp +++ b/src/virtualkeyboard/inputcontext.cpp @@ -505,7 +505,11 @@ void InputContext::commit() void InputContext::commit(const QString &text, int replaceFrom, int replaceLength) { Q_D(InputContext); - VIRTUALKEYBOARD_DEBUG() << "InputContext::commit():" << text << replaceFrom << replaceLength; + VIRTUALKEYBOARD_DEBUG() << "InputContext::commit()" +#ifdef SENSITIVE_DEBUG + << text << replaceFrom << replaceLength +#endif + ; bool preeditChanged = !d->preeditText.isEmpty(); d->preeditText.clear(); d->preeditTextAttributes.clear(); @@ -674,7 +678,11 @@ void InputContext::setFocus(bool enable) void InputContext::sendPreedit(const QString &text, const QList<QInputMethodEvent::Attribute> &attributes, int replaceFrom, int replaceLength) { Q_D(InputContext); - VIRTUALKEYBOARD_DEBUG() << "InputContext::sendPreedit():" << text << replaceFrom << replaceLength; + VIRTUALKEYBOARD_DEBUG() << "InputContext::sendPreedit()" +#ifdef SENSITIVE_DEBUG + << text << replaceFrom << replaceLength +#endif + ; bool textChanged = d->preeditText != text; bool attributesChanged = d->preeditTextAttributes != attributes; @@ -697,7 +705,11 @@ void InputContext::sendPreedit(const QString &text, const QList<QInputMethodEven // input may be out of sync. if (d->shadow.inputItem() && !replace && !text.isEmpty() && !textChanged && attributesChanged) { - VIRTUALKEYBOARD_DEBUG() << "InputContext::sendPreedit(shadow):" << text << replaceFrom << replaceLength; + VIRTUALKEYBOARD_DEBUG() << "InputContext::sendPreedit(shadow)" +#ifdef SENSITIVE_DEBUG + << text << replaceFrom << replaceLength +#endif + ; event.setAccepted(true); QGuiApplication::sendEvent(d->shadow.inputItem(), &event); } |