[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kalarm/Applications/16.12] /: Bug 372223: Fix crash on exit
From: David Jarvie <djarvie () kde ! org>
Date: 2016-11-16 9:14:07
Message-ID: E1c6wIB-00065y-1O () code ! kde ! org
[Download RAW message or body]
Git commit 2a5b20e0d6713889a59b7cf55d9d293d97a8a4c2 by David Jarvie, on behalf of Palo Kisa.
Committed on 16/11/2016 at 09:09.
Pushed by djarvie into branch 'Applications/16.12'.
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.
M +3 -0 Changelog
M +1 -1 src/kalarm.h
M +5 -1 src/main.cpp
http://commits.kde.org/kalarm/2a5b20e0d6713889a59b7cf55d9d293d97a8a4c2
diff --git a/Changelog b/Changelog
index 9b204d2..975d1ac 100644
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,8 @@
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]
diff --git a/src/kalarm.h b/src/kalarm.h
index de85165..ea8cef7 100644
--- a/src/kalarm.h
+++ b/src/kalarm.h
@@ -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
diff --git a/src/main.cpp b/src/main.cpp
index 15627ff..db00e03 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic