Commit c9bcccb3 authored by Palo Kisa's avatar Palo Kisa Committed by David Jarvie

Bug 372223: Fix crash on exit

The QCoreApplication instance wasn't deleted before libraries
were unloaded, which resulted in a crash during clean-up. See
https://github.com/lxde/lxqt/issues/1193#issuecomment-260337417.
parent df9273d0
KAlarm Change Log
=== Version 2.11.11 (KDE Applications 16.12.0) --- 16 November 2016 ===
+ Fix crash on exit [KDE Bug 372223]
=== Version 2.11.10 (KDE Applications 16.08.3) --- 31 October 2016 ===
+ Fix default calendar files not being created on first run [KDE Bug 362962]
+ Fix crash when a second instance of KAlarm is started [KDE Bug 371628]
......
......@@ -24,7 +24,7 @@
#undef QT3_SUPPORT
#define VERSION_SUFFIX "-5"
#define KALARM_VERSION "2.11.10" VERSION_SUFFIX
#define KALARM_VERSION "2.11.11" VERSION_SUFFIX
#define KALARM_NAME "KAlarm"
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application
......
......@@ -29,6 +29,7 @@
#include <KLocalizedString>
#include <QDir>
#include <QScopedPointer>
#include <stdlib.h>
......@@ -36,7 +37,10 @@
int main(int argc, char* argv[])
{
KAlarmApp* app = KAlarmApp::create(argc, argv);
// Use QScopedPointer to ensure the QCoreApplication instance is deleted
// before libraries unload, to avoid crashes during clean-up.
QScopedPointer<KAlarmApp> app(KAlarmApp::create(argc, argv));
QStringList args = app->arguments();
app->setAttribute(Qt::AA_UseHighDpiPixmaps, true);
app->setAttribute(Qt::AA_EnableHighDpiScaling);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment