mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
aed7528443
commit
2ca8b98091
1 changed files with 6 additions and 3 deletions
|
@ -14,11 +14,16 @@
|
||||||
#include <QtAndroidExtras/QtAndroidExtras>
|
#include <QtAndroidExtras/QtAndroidExtras>
|
||||||
#include <QtAndroidExtras/QAndroidJniObject>
|
#include <QtAndroidExtras/QAndroidJniObject>
|
||||||
#include <QtAndroid>
|
#include <QtAndroid>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
#if defined(SUBSURFACE_MOBILE)
|
#if defined(SUBSURFACE_MOBILE)
|
||||||
#include "mobile-widgets/qmlmanager.h"
|
#include "mobile-widgets/qmlmanager.h"
|
||||||
|
#define LOG(x) QMLManager::instance()->appendTextToLog(x);
|
||||||
|
#else
|
||||||
|
#define LOG(x) qDebug() << x;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define USB_SERVICE "usb"
|
#define USB_SERVICE "usb"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -163,9 +168,7 @@ Java_org_subsurfacedivelog_mobile_SubsurfaceMobileActivity_setDeviceString(JNIEn
|
||||||
{
|
{
|
||||||
const char *deviceString = env->GetStringUTFChars(javaDeviceString, NULL);
|
const char *deviceString = env->GetStringUTFChars(javaDeviceString, NULL);
|
||||||
Q_UNUSED (obj)
|
Q_UNUSED (obj)
|
||||||
#if defined(SUBSURFACE_MOBILE)
|
LOG(deviceString);
|
||||||
QMLManager::instance()->appendTextToLog(deviceString);
|
|
||||||
#endif
|
|
||||||
env->ReleaseStringUTFChars(javaDeviceString, deviceString);
|
env->ReleaseStringUTFChars(javaDeviceString, deviceString);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue