History

Merge remote-tracking branch 'hifi/master' into android_places_goto

Cristian Luis Duarte committed 8 years ago

Commit 744fa802 parents b26bf30 3ac4a1d256 files · +5354 −1753Browse files

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

Unified · Split

interface/src/Application.cpp+14−18
@@ -225,8 +225,8 @@ · 224 unmodified lines
225225 #ifdef DEBUG_EVENT_QUEUE
226226 // This is a HACK that uses private headers included with the qt source distrubution.
227227 // To use this feature you need to add these directores to your include path:
228−// E:/Qt/5.9.1/Src/qtbase/include/QtCore/5.9.1/QtCore
229−// E:/Qt/5.9.1/Src/qtbase/include/QtCore/5.9.1
228+// E:/Qt/5.10.1/Src/qtbase/include/QtCore/5.10.1/QtCore
229+// E:/Qt/5.10.1/Src/qtbase/include/QtCore/5.10.1
230230 #define QT_BOOTSTRAPPED
231231 #include <private/qthread_p.h>
232232 #include <private/qobject_p.h>
@@ -491,7 +491,7 @@ public: · 258 unmodified lines
491491 // Don't actually crash in debug builds, in case this apparent deadlock is simply from
492492 // the developer actively debugging code
493493 #ifdef NDEBUG
494− deadlockDetectionCrash();
494+ deadlockDetectionCrash();
495495 #endif
496496 }
497497 }
@@ -774,7 +774,6 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 276 unmodified lines
774774 steamClient->init();
775775 }
776776
777− DependencyManager::set<tracing::Tracer>();
778777 PROFILE_SET_THREAD_NAME("Main Thread");
779778
780779 #if defined(Q_OS_WIN)
@@ -959,10 +958,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 178 unmodified lines
959958 auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
960959 setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
961960 setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
962−
963961 {
964962 const QString TEST_SCRIPT = "--testScript";
965− const QString TRACE_FILE = "--traceFile";
966963 const QStringList args = arguments();
967964 for (int i = 0; i < args.size() - 1; ++i) {
968965 if (args.at(i) == TEST_SCRIPT) {
@@ -970,10 +967,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1 unmodified line
970967 if (QFileInfo(testScriptPath).exists()) {
971968 setProperty(hifi::properties::TEST, QUrl::fromLocalFile(testScriptPath));
972969 }
973− } else if (args.at(i) == TRACE_FILE) {
974− QString traceFilePath = args.at(i + 1);
975− setProperty(hifi::properties::TRACING, traceFilePath);
976− DependencyManager::get<tracing::Tracer>()->startTracing();
977970 }
978971 }
979972 }
@@ -1019,6 +1012,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 39 unmodified lines
10191012 auto nodeList = DependencyManager::get<NodeList>();
10201013 nodeList->startThread();
10211014
1015+ const char** constArgv = const_cast<const char**>(argv);
1016+ if (cmdOptionExists(argc, constArgv, "--disableWatchdog")) {
1017+ DISABLE_WATCHDOG = true;
1018+ }
10221019 // Set up a watchdog thread to intentionally crash the application on deadlocks
10231020 if (!DISABLE_WATCHDOG) {
10241021 (new DeadlockWatchdogThread())->start();
@@ -1228,7 +1225,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 203 unmodified lines
12281225 connect(&_entityEditSender, &EntityEditPacketSender::packetSent, this, &Application::packetSent);
12291226 connect(&_entityEditSender, &EntityEditPacketSender::addingEntityWithCertificate, this, &Application::addingEntityWithCertificate);
12301227
1231− const char** constArgv = const_cast<const char**>(argv);
12321228 QString concurrentDownloadsStr = getCmdOption(argc, constArgv, "--concurrent-downloads");
12331229 bool success;
12341230 int concurrentDownloads = concurrentDownloadsStr.toInt(&success);
@@ -2039,7 +2035,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 804 unmodified lines
20392035 });
20402036
20412037 _snapshotSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/snap.wav"));
2042−
2038+
20432039 QVariant testProperty = property(hifi::properties::TEST);
20442040 qDebug() << testProperty;
20452041 if (testProperty.isValid()) {
@@ -6584,7 +6580,7 @@ void Application::addAssetToWorldFromURL(QString url) { · 4538 unmodified lines
65846580 } else {
65856581 filename.remove(".zip");
65866582 }
6587−
6583+
65886584 }
65896585
65906586 if (!DependencyManager::get<NodeList>()->getThisNodeCanWriteAssets()) {
@@ -6758,7 +6754,7 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q · 167 unmodified lines
67586754 addAssetToWorldError(filenameFromPath(filePath), errorInfo);
67596755 } else {
67606756 // to prevent files that aren't models or texture files from being loaded into world automatically
6761− if ((filePath.toLower().endsWith(OBJ_EXTENSION) || filePath.toLower().endsWith(FBX_EXTENSION)) ||
6757+ if ((filePath.toLower().endsWith(OBJ_EXTENSION) || filePath.toLower().endsWith(FBX_EXTENSION)) ||
67626758 ((filePath.toLower().endsWith(JPG_EXTENSION) || filePath.toLower().endsWith(PNG_EXTENSION)) &&
67636759 ((!isBlocks) && (!isZip)))) {
67646760 addAssetToWorldAddEntity(filePath, mapping);
@@ -7407,8 +7403,8 @@ bool Application::isThrottleRendering() const { · 642 unmodified lines
74077403 bool Application::hasFocus() const {
74087404 bool result = (QApplication::activeWindow() != nullptr);
74097405 #if defined(Q_OS_WIN)
7410− // On Windows, QWidget::activateWindow() - as called in setFocus() - makes the application's taskbar icon flash but doesn't
7411− // take user focus away from their current window. So also check whether the application is the user's current foreground
7406+ // On Windows, QWidget::activateWindow() - as called in setFocus() - makes the application's taskbar icon flash but doesn't
7407+ // take user focus away from their current window. So also check whether the application is the user's current foreground
74127408 // window.
74137409 result = result && (HWND)QApplication::activeWindow()->winId() == GetForegroundWindow();
74147410 #endif
@@ -7416,7 +7412,7 @@ bool Application::hasFocus() const { · 1 unmodified line
74167412 }
74177413
74187414 void Application::setFocus() {
7419− // Note: Windows doesn't allow a user focus to be taken away from another application. Instead, it changes the color of and
7415+ // Note: Windows doesn't allow a user focus to be taken away from another application. Instead, it changes the color of and
74207416 // flashes the taskbar icon.
74217417 auto window = qApp->getWindow();
74227418 window->activateWindow();
@@ -7657,7 +7653,7 @@ void Application::updateDisplayMode() { · 234 unmodified lines
76577653 menu->setIsOptionChecked(MenuOption::FirstPerson, true);
76587654 cameraMenuChanged();
76597655 }
7660−
7656+
76617657 // Remove the mirror camera option from menu if in HMD mode
76627658 auto mirrorAction = menu->getActionForOption(MenuOption::FullscreenMirror);
76637659 mirrorAction->setVisible(!isHmd);