Running astyle.
This commit is contained in:
@@ -34,10 +34,10 @@
|
||||
#include <QtCore>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifndef ANDROID_TEST
|
||||
#include "QtGui/5.1.1/QtGui/qpa/qplatformnativeinterface.h"
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#ifndef ANDROID_TEST
|
||||
#include "QtGui/5.1.1/QtGui/qpa/qplatformnativeinterface.h"
|
||||
#include <jni.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
@@ -71,19 +71,19 @@ aboutPokerthImpl::aboutPokerthImpl(QWidget *parent, ConfigFile *c)
|
||||
|
||||
#ifdef ANDROID
|
||||
int api = -2;
|
||||
#ifndef ANDROID_TEST
|
||||
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForIntegration("JavaVM");
|
||||
JNIEnv* env;
|
||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||
qCritical()<<"AttachCurrentThread failed";
|
||||
} else {
|
||||
jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
|
||||
if (jclassApplicationClass) {
|
||||
api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
|
||||
}
|
||||
currVM->DetachCurrentThread();
|
||||
#ifndef ANDROID_TEST
|
||||
JavaVM *currVM = (JavaVM *)QApplication::platformNativeInterface()->nativeResourceForIntegration("JavaVM");
|
||||
JNIEnv* env;
|
||||
if (currVM->AttachCurrentThread(&env, NULL)<0) {
|
||||
qCritical()<<"AttachCurrentThread failed";
|
||||
} else {
|
||||
jclass jclassApplicationClass = env->FindClass("android/os/Build$VERSION");
|
||||
if (jclassApplicationClass) {
|
||||
api = env->GetStaticIntField(jclassApplicationClass, env->GetStaticFieldID(jclassApplicationClass,"SDK_INT", "I"));
|
||||
}
|
||||
#endif
|
||||
currVM->DetachCurrentThread();
|
||||
}
|
||||
#endif
|
||||
label_pokerthVersion->setText(QString(tr("PokerTH %1 for Android (API%2)").arg(POKERTH_BETA_RELEASE_STRING).arg(api)));
|
||||
#else
|
||||
label_pokerthVersion->setText(QString(tr("PokerTH %1").arg(POKERTH_BETA_RELEASE_STRING)));
|
||||
|
||||
Reference in New Issue
Block a user