Showing the changes to interface/src/Application.cpp (1 of 256 files). Show all
Unified · Split
| @@ -225,8 +225,8 @@ · 224 unmodified lines | ||
| 225 | 225 | #ifdef DEBUG_EVENT_QUEUE |
| 226 | 226 | // This is a HACK that uses private headers included with the qt source distrubution. |
| 227 | 227 | // 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 | |
| 230 | 230 | #define QT_BOOTSTRAPPED |
| 231 | 231 | #include <private/qthread_p.h> |
| 232 | 232 | #include <private/qobject_p.h> |
| @@ -491,7 +491,7 @@ public: · 258 unmodified lines | ||
| 491 | 491 | // Don't actually crash in debug builds, in case this apparent deadlock is simply from |
| 492 | 492 | // the developer actively debugging code |
| 493 | 493 | #ifdef NDEBUG |
| 494 | − deadlockDetectionCrash(); | |
| 494 | + deadlockDetectionCrash(); | |
| 495 | 495 | #endif |
| 496 | 496 | } |
| 497 | 497 | } |
| @@ -774,7 +774,6 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) { · 276 unmodified lines | ||
| 774 | 774 | steamClient->init(); |
| 775 | 775 | } |
| 776 | 776 | |
| 777 | − DependencyManager::set<tracing::Tracer>(); | |
| 778 | 777 | PROFILE_SET_THREAD_NAME("Main Thread"); |
| 779 | 778 | |
| 780 | 779 | #if defined(Q_OS_WIN) |
| @@ -959,10 +958,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 178 unmodified lines | ||
| 959 | 958 | auto steamClient = PluginManager::getInstance()->getSteamClientPlugin(); |
| 960 | 959 | setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning())); |
| 961 | 960 | setProperty(hifi::properties::CRASHED, _previousSessionCrashed); |
| 962 | − | |
| 963 | 961 | { |
| 964 | 962 | const QString TEST_SCRIPT = "--testScript"; |
| 965 | − const QString TRACE_FILE = "--traceFile"; | |
| 966 | 963 | const QStringList args = arguments(); |
| 967 | 964 | for (int i = 0; i < args.size() - 1; ++i) { |
| 968 | 965 | if (args.at(i) == TEST_SCRIPT) { |
| @@ -970,10 +967,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1 unmodified line | ||
| 970 | 967 | if (QFileInfo(testScriptPath).exists()) { |
| 971 | 968 | setProperty(hifi::properties::TEST, QUrl::fromLocalFile(testScriptPath)); |
| 972 | 969 | } |
| 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(); | |
| 977 | 970 | } |
| 978 | 971 | } |
| 979 | 972 | } |
| @@ -1019,6 +1012,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 39 unmodified lines | ||
| 1019 | 1012 | auto nodeList = DependencyManager::get<NodeList>(); |
| 1020 | 1013 | nodeList->startThread(); |
| 1021 | 1014 | |
| 1015 | + const char** constArgv = const_cast<const char**>(argv); | |
| 1016 | + if (cmdOptionExists(argc, constArgv, "--disableWatchdog")) { | |
| 1017 | + DISABLE_WATCHDOG = true; | |
| 1018 | + } | |
| 1022 | 1019 | // Set up a watchdog thread to intentionally crash the application on deadlocks |
| 1023 | 1020 | if (!DISABLE_WATCHDOG) { |
| 1024 | 1021 | (new DeadlockWatchdogThread())->start(); |
| @@ -1228,7 +1225,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 203 unmodified lines | ||
| 1228 | 1225 | connect(&_entityEditSender, &EntityEditPacketSender::packetSent, this, &Application::packetSent); |
| 1229 | 1226 | connect(&_entityEditSender, &EntityEditPacketSender::addingEntityWithCertificate, this, &Application::addingEntityWithCertificate); |
| 1230 | 1227 | |
| 1231 | − const char** constArgv = const_cast<const char**>(argv); | |
| 1232 | 1228 | QString concurrentDownloadsStr = getCmdOption(argc, constArgv, "--concurrent-downloads"); |
| 1233 | 1229 | bool success; |
| 1234 | 1230 | int concurrentDownloads = concurrentDownloadsStr.toInt(&success); |
| @@ -2039,7 +2035,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 804 unmodified lines | ||
| 2039 | 2035 | }); |
| 2040 | 2036 | |
| 2041 | 2037 | _snapshotSound = DependencyManager::get<SoundCache>()->getSound(PathUtils::resourcesUrl("sounds/snap.wav")); |
| 2042 | − | |
| 2038 | + | |
| 2043 | 2039 | QVariant testProperty = property(hifi::properties::TEST); |
| 2044 | 2040 | qDebug() << testProperty; |
| 2045 | 2041 | if (testProperty.isValid()) { |
| @@ -6584,7 +6580,7 @@ void Application::addAssetToWorldFromURL(QString url) { · 4538 unmodified lines | ||
| 6584 | 6580 | } else { |
| 6585 | 6581 | filename.remove(".zip"); |
| 6586 | 6582 | } |
| 6587 | − | |
| 6583 | + | |
| 6588 | 6584 | } |
| 6589 | 6585 | |
| 6590 | 6586 | if (!DependencyManager::get<NodeList>()->getThisNodeCanWriteAssets()) { |
| @@ -6758,7 +6754,7 @@ void Application::addAssetToWorldSetMapping(QString filePath, QString mapping, Q · 167 unmodified lines | ||
| 6758 | 6754 | addAssetToWorldError(filenameFromPath(filePath), errorInfo); |
| 6759 | 6755 | } else { |
| 6760 | 6756 | // 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)) || | |
| 6762 | 6758 | ((filePath.toLower().endsWith(JPG_EXTENSION) || filePath.toLower().endsWith(PNG_EXTENSION)) && |
| 6763 | 6759 | ((!isBlocks) && (!isZip)))) { |
| 6764 | 6760 | addAssetToWorldAddEntity(filePath, mapping); |
| @@ -7407,8 +7403,8 @@ bool Application::isThrottleRendering() const { · 642 unmodified lines | ||
| 7407 | 7403 | bool Application::hasFocus() const { |
| 7408 | 7404 | bool result = (QApplication::activeWindow() != nullptr); |
| 7409 | 7405 | #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 | |
| 7412 | 7408 | // window. |
| 7413 | 7409 | result = result && (HWND)QApplication::activeWindow()->winId() == GetForegroundWindow(); |
| 7414 | 7410 | #endif |
| @@ -7416,7 +7412,7 @@ bool Application::hasFocus() const { · 1 unmodified line | ||
| 7416 | 7412 | } |
| 7417 | 7413 | |
| 7418 | 7414 | 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 | |
| 7420 | 7416 | // flashes the taskbar icon. |
| 7421 | 7417 | auto window = qApp->getWindow(); |
| 7422 | 7418 | window->activateWindow(); |
| @@ -7657,7 +7653,7 @@ void Application::updateDisplayMode() { · 234 unmodified lines | ||
| 7657 | 7653 | menu->setIsOptionChecked(MenuOption::FirstPerson, true); |
| 7658 | 7654 | cameraMenuChanged(); |
| 7659 | 7655 | } |
| 7660 | − | |
| 7656 | + | |
| 7661 | 7657 | // Remove the mirror camera option from menu if in HMD mode |
| 7662 | 7658 | auto mirrorAction = menu->getActionForOption(MenuOption::FullscreenMirror); |
| 7663 | 7659 | mirrorAction->setVisible(!isHmd); |