Changeset View
Changeset View
Standalone View
Standalone View
src/main.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
59 | #include "backtracegenerator.h" | 59 | #include "backtracegenerator.h" | ||
60 | 60 | | |||
61 | static const char version[] = PROJECT_VERSION; | 61 | static const char version[] = PROJECT_VERSION; | ||
62 | static const char description[] = I18N_NOOP("The KDE Crash Handler gives the user feedback " | 62 | static const char description[] = I18N_NOOP("The KDE Crash Handler gives the user feedback " | ||
63 | "if a program has crashed."); | 63 | "if a program has crashed."); | ||
64 | 64 | | |||
65 | namespace { | 65 | namespace { | ||
66 | void openDrKonqiDialog () { | 66 | void openDrKonqiDialog () { | ||
67 | DrKonqiDialog *w = new DrKonqiDialog(); | 67 | DrKonqiDialog *w = new DrKonqiDialog(); | ||
68 | QObject::connect(qApp, &QCoreApplication::aboutToQuit, w, &QObject::deleteLater); | ||||
anthonyfieroni: Adding a qApp as a parent here? | |||||
davidedmundson: I can't, qwidgets only take qwidgets as parents.
| |||||
68 | QObject::connect(w, &DrKonqiDialog::rejected, qApp, &QApplication::quit); | 69 | QObject::connect(w, &DrKonqiDialog::rejected, qApp, &QApplication::quit); | ||
69 | w->show(); | 70 | w->show(); | ||
70 | #ifdef Q_OS_MACOS | 71 | #ifdef Q_OS_MACOS | ||
71 | KWindowSystem::forceActiveWindow(w->winId()); | 72 | KWindowSystem::forceActiveWindow(w->winId()); | ||
72 | #endif | 73 | #endif | ||
73 | } | 74 | } | ||
74 | 75 | | |||
75 | void requestDrKonqiDialog(bool restarted, bool interactionAllowed) { | 76 | void requestDrKonqiDialog(bool restarted, bool interactionAllowed) { | ||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |
Adding a qApp as a parent here?