diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-06-30 17:32:26 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-11 11:14:22 -0700 |
commit | 2ca8b9809130ea6822a37f73835abbdc93faf3c3 (patch) | |
tree | d7c6fd46d1300c108b2a8147cb7f29d543e93f13 | |
parent | aed7528443b68ce8aced14130fc3622ddf8ec866 (diff) | |
download | subsurface-2ca8b9809130ea6822a37f73835abbdc93faf3c3.tar.gz |
Android: log both for mobile and full app
We don't usually build the full app on Android, but it's still possible.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | core/android.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/android.cpp b/core/android.cpp index 7d8c89b9c..d9dbf27e2 100644 --- a/core/android.cpp +++ b/core/android.cpp @@ -14,11 +14,16 @@ #include <QtAndroidExtras/QtAndroidExtras> #include <QtAndroidExtras/QAndroidJniObject> #include <QtAndroid> +#include <QDebug> #if defined(SUBSURFACE_MOBILE) #include "mobile-widgets/qmlmanager.h" +#define LOG(x) QMLManager::instance()->appendTextToLog(x); +#else +#define LOG(x) qDebug() << x; #endif + #define USB_SERVICE "usb" extern "C" { @@ -163,9 +168,7 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setDeviceString(JNIEn { const char *deviceString = env->GetStringUTFChars(javaDeviceString, NULL); Q_UNUSED (obj) -#if defined(SUBSURFACE_MOBILE) - QMLManager::instance()->appendTextToLog(deviceString); -#endif + LOG(deviceString); env->ReleaseStringUTFChars(javaDeviceString, deviceString); return; } |