mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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/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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue