From 07c9a0e2bb303f1ffafdd9415b0fd36b687de6e3 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 24 Aug 2015 10:48:58 -0700 Subject: [PATCH] Add Developer > Crash Interface menu item --- interface/src/Application.cpp | 6 ++++++ interface/src/Application.h | 2 ++ interface/src/Menu.cpp | 2 ++ interface/src/Menu.h | 1 + 4 files changed, 11 insertions(+) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 0f3282582f..6bb12d4d06 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5137,3 +5137,9 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index) _oldHandLeftClick[index] = false; } } + +void Application::crashApplication() { + QObject* object = nullptr; + bool value = object->isWindowType(); + qCDebug(interfaceapp) << "Intentionally crashed Interface"; +} diff --git a/interface/src/Application.h b/interface/src/Application.h index 6394aa12d0..2297ff157e 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -438,6 +438,8 @@ public slots: void reloadResourceCaches(); + void crashApplication(); + private slots: void clearDomainOctreeDetails(); void checkFPS(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index f99b3ba579..d08970a693 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -575,6 +575,8 @@ Menu::Menu() { addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowOwned); addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowHulls); + addActionToQMenuAndActionHash(developerMenu, MenuOption::CrashInterface, 0, qApp, SLOT(crashApplication())); + MenuWrapper* helpMenu = addMenu("Help"); addActionToQMenuAndActionHash(helpMenu, MenuOption::EditEntitiesHelp, 0, qApp, SLOT(showEditEntitiesHelp())); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 278da363d1..e9ce8bcaba 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -164,6 +164,7 @@ namespace MenuOption { const QString CopyAddress = "Copy Address to Clipboard"; const QString CopyPath = "Copy Path to Clipboard"; const QString CoupleEyelids = "Couple Eyelids"; + const QString CrashInterface = "Crash Interface"; const QString DebugAmbientOcclusion = "Debug Ambient Occlusion"; const QString DecreaseAvatarSize = "Decrease Avatar Size"; const QString DeleteBookmark = "Delete Bookmark...";