aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-28 16:15:01 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-28 16:15:01 +0200
commite3c605a796b6f09c6b38a206fd110992ff5d1e4c (patch)
tree5de62ffd772d0010944d19c67c8e92d1d98a59fb /src/mainwindow
parentbreakpad: Use system breakpad by default (diff)
downloadsmolbote-e3c605a796b6f09c6b38a206fd110992ff5d1e4c.tar.xz
breakpad: try to write session on crash
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/mainwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 77b8ad3..cc67b3d 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -89,6 +89,16 @@ MainWindow::MainWindow(const std::unique_ptr<Configuration> &config, QWidget *pa
}
show();
+#ifdef QT_DEBUG
+ {
+ auto *debugMenu = ui->menubar->addMenu(tr("Debug"));
+
+ debugMenu->addAction(tr("Crash"), []() {
+ delete reinterpret_cast<QString*>(0xFEE1DEAD);
+ });
+ };
+#endif
+
// connect smolbote menu
{
connect(ui->actionNewSubwindow, &QAction::triggered, this, [this, &config]() {