added environment variable check for crash menu

This commit is contained in:
milad 2019-09-11 11:39:19 -07:00
parent 51ef37fd27
commit 5ec8b0d589

View file

@ -725,6 +725,10 @@ Menu::Menu() {
DependencyManager::get<PickManager>().data(), SLOT(setForceCoarsePicking(bool)));
// Developer > Crash >>>
bool result = false;
const QString HIFI_SHOW_SOURCE_DEVELOPER_CRASH_MENU("HIFI_SHOW_SOURCE_DEVELOPER_CRASH_MENU");
result = QProcessEnvironment::systemEnvironment().contains(HIFI_SHOW_SOURCE_DEVELOPER_CRASH_MENU);
if (result) {
MenuWrapper* crashMenu = developerMenu->addMenu("Crash");
// Developer > Crash > Display Crash Options
@ -764,6 +768,8 @@ Menu::Menu() {
connect(action, &QAction::triggered, qApp, []() { std::thread(crash::newFault).join(); });
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
}
// Developer > Show Statistics
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);