History

Resolving comments in PR

Gabriel Calero committed 8 years ago

Commit 60507371 parent 6d732dd26 files · +58 −297Browse files

Showing the changes to interface/src/Application.cpp (1 of 26 files). Show all

Unified · Split

interface/src/Application.cpp+11−18
@@ -210,7 +210,7 @@ · 209 unmodified lines
210210 #include "commerce/QmlCommerce.h"
211211
212212 #include "webbrowser/WebBrowserSuggestionsEngine.h"
213−#ifdef ANDROID
213+#if defined(Q_OS_ANDROID)
214214 #include <QtAndroidExtras/QAndroidJniObject>
215215 #include <android/log.h>
216216 #endif
@@ -235,7 +235,7 @@ extern "C" { · 18 unmodified lines
235235 }
236236 #endif
237237
238−#ifdef ANDROID
238+#if defined(Q_OS_ANDROID)
239239 extern "C" {
240240
241241 JNIEXPORT void Java_io_highfidelity_hifiinterface_InterfaceActivity_nativeOnCreate(JNIEnv* env, jobject obj, jobject instance, jobject asset_mgr) {
@@ -557,16 +557,9 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt · 315 unmodified lines
557557 if (!logMessage.isEmpty()) {
558558 #ifdef Q_OS_WIN
559559 OutputDebugStringA(logMessage.toLocal8Bit().constData());
560− OutputDebugStringA("\n");i
560+ OutputDebugStringA("\n");
561561 #elif defined Q_OS_ANDROID
562− QString report=message;
563− if (context.file && !QString(context.file).isEmpty()) {
564− report+=" at ";
565− report+=QString(context.file);
566− report+=" : ";
567− report+=QString::number(context.line);
568− }
569− const char*const local=report.toLocal8Bit().constData();
562+ const char * local=logMessage.toStdString().c_str();
570563 switch (type) {
571564 case QtDebugMsg:
572565 __android_log_write(ANDROID_LOG_DEBUG,"Interface",local);
@@ -2252,10 +2245,10 @@ void Application::initializeGL() { · 1679 unmodified lines
22522245 // Set up the render engine
22532246 render::CullFunctor cullFunctor = LODManager::shouldRender;
22542247 static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
2255−#ifndef Q_OS_ANDROID
2256− bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
2257−#else
2248+#ifdef Q_OS_ANDROID
22582249 bool isDeferred = false;
2250+#else
2251+ bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
22592252 #endif
22602253 _renderEngine->addJob<UpdateSceneTask>("UpdateScene");
22612254 #ifndef Q_OS_ANDROID
@@ -2369,10 +2362,10 @@ void Application::initializeUi() { · 107 unmodified lines
23692362 offscreenUi->setProxyWindow(_window->windowHandle());
23702363 // OffscreenUi is a subclass of OffscreenQmlSurface specifically designed to
23712364 // support the window management and scripting proxies for VR use
2372−#ifndef Q_OS_ANDROID
2373− offscreenUi->createDesktop(QString("hifi/Desktop.qml"));
2365+#ifdef Q_OS_ANDROID
2366+ offscreenUi->createDesktop(PathUtils::qmlBasePath() + "hifi/Desktop.qml");
23742367 #else
2375− offscreenUi->createDesktop(QString("qrc:///qml/hifi/Desktop.qml"));
2368+ offscreenUi->createDesktop(QString("hifi/Desktop.qml"));
23762369 #endif
23772370 // FIXME either expose so that dialogs can set this themselves or
23782371 // do better detection in the offscreen UI of what has focus
@@ -5960,7 +5953,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe · 3581 unmodified lines
59605953 scriptEngine->registerGetterSetter("location", LocationScriptingInterface::locationGetter,
59615954 LocationScriptingInterface::locationSetter);
59625955
5963−#ifndef ANDROID
5956+#if !defined(Q_OS_ANDROID)
59645957 scriptEngine->registerFunction("OverlayWebWindow", QmlWebWindowClass::constructor);
59655958 #endif
59665959 scriptEngine->registerFunction("OverlayWindow", QmlWindowClass::constructor);