diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-10-16 14:42:50 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2014-10-28 13:05:00 +0100 |
commit | 5a4fad14797d7cb0f7a65d5c546a0006475757e1 (patch) | |
tree | cbbc93e3ffab6992e1d53c17042cd3e5a26dd03a | |
parent | 50bba2fbfb7e80d9aa8d6da2575e8617e9b7471c (diff) |
iOS: Add logging category for input method debugging
Change-Id: If1505b3b5f6ceb18fc8972192d637fc42530f993
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
-rw-r--r-- | src/plugins/platforms/ios/qiosglobal.h | 10 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qiosglobal.mm | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosglobal.h b/src/plugins/platforms/ios/qiosglobal.h index c09987f9dc..fccb051645 100644 --- a/src/plugins/platforms/ios/qiosglobal.h +++ b/src/plugins/platforms/ios/qiosglobal.h @@ -41,6 +41,16 @@ QT_BEGIN_NAMESPACE +Q_DECLARE_LOGGING_CATEGORY(lcQpaInputMethods); + +#if !defined(QT_NO_DEBUG) +#define qImDebug(...) \ + for (bool qt_category_enabled = lcQpaInputMethods().isDebugEnabled(); qt_category_enabled; qt_category_enabled = false) \ + QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC, lcQpaInputMethods().categoryName()).debug(__VA_ARGS__) +#else +#define qImDebug() QT_NO_QDEBUG_MACRO() +#endif + class QPlatformScreen; bool isQtApplication(); diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm index 7ff4950599..e6d52f1850 100644 --- a/src/plugins/platforms/ios/qiosglobal.mm +++ b/src/plugins/platforms/ios/qiosglobal.mm @@ -46,6 +46,8 @@ QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcQpaInputMethods, "qt.qpa.input.methods"); + bool isQtApplication() { // Returns \c true if the plugin is in full control of the whole application. This means |