Skip to content

Commit 01a0c00

Browse files
committed
Add test crash shortcut for debugging
1 parent 9164565 commit 01a0c00

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/core/management_layer/application_manager.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,8 +1972,6 @@ bool ApplicationManager::Implementation::openProject(const QString& _path)
19721972
return false;
19731973
}
19741974

1975-
*(volatile int*)0 = 0;
1976-
19771975
if (projectsManager->project(_path) != nullptr && projectsManager->project(_path)->isLocal()
19781976
&& !QFileInfo::exists(_path)) {
19791977
projectsManager->hideProject(_path);
@@ -2918,6 +2916,16 @@ void ApplicationManager::initConnections()
29182916
QShortcut* fullScreenShortcut = new QShortcut(QKeySequence::FullScreen, d->applicationView);
29192917
fullScreenShortcut->setContext(Qt::ApplicationShortcut);
29202918
connect(fullScreenShortcut, &QShortcut::activated, this, [this] { d->toggleFullScreen(); });
2919+
//
2920+
// Тестовый краш
2921+
//
2922+
#ifdef Q_OS_MACOS
2923+
QShortcut* testCrashShortcut = new QShortcut(QKeySequence("Meta+Shift+C"), d->applicationView);
2924+
#else
2925+
QShortcut* testCrashShortcut = new QShortcut(QKeySequence("Ctrl+Shift+C"), d->applicationView);
2926+
#endif
2927+
testCrashShortcut->setContext(Qt::ApplicationShortcut);
2928+
connect(testCrashShortcut, &QShortcut::activated, this, [] { *(volatile int*)0 = 0; });
29212929

29222930
//
29232931
// Представление приложения

0 commit comments

Comments
 (0)