mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 04:17:34 +02:00
added environment variable check for crash menu
This commit is contained in:
parent
51ef37fd27
commit
5ec8b0d589
1 changed files with 36 additions and 30 deletions
|
@ -725,6 +725,10 @@ Menu::Menu() {
|
||||||
DependencyManager::get<PickManager>().data(), SLOT(setForceCoarsePicking(bool)));
|
DependencyManager::get<PickManager>().data(), SLOT(setForceCoarsePicking(bool)));
|
||||||
|
|
||||||
// Developer > Crash >>>
|
// 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");
|
MenuWrapper* crashMenu = developerMenu->addMenu("Crash");
|
||||||
|
|
||||||
// Developer > Crash > Display Crash Options
|
// Developer > Crash > Display Crash Options
|
||||||
|
@ -764,6 +768,8 @@ Menu::Menu() {
|
||||||
connect(action, &QAction::triggered, qApp, []() { std::thread(crash::newFault).join(); });
|
connect(action, &QAction::triggered, qApp, []() { std::thread(crash::newFault).join(); });
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
|
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Developer > Show Statistics
|
// Developer > Show Statistics
|
||||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);
|
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);
|
||||||
|
|
Loading…
Reference in a new issue