summaryrefslogtreecommitdiffstats
path: root/core/android.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/android.cpp')
-rw-r--r--core/android.cpp9
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;
}