From 2ca8b9809130ea6822a37f73835abbdc93faf3c3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 30 Jun 2018 17:32:26 -0700 Subject: 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 --- core/android.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'core/android.cpp') 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 #include #include +#include #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; } -- cgit v1.2.3-70-g09d2