[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-runtime] resources/google/calendar: QPointer wrap the Calendar and Task Editor dialogs for c
From: Allen Winter <allen.winter () kdab ! com>
Date: 2012-04-30 23:28:39
Message-ID: 20120430232839.DC5FDA60D2 () git ! kde ! org
[Download RAW message or body]
Git commit 53ae237970ceffb8b089861c4aa08d92c1723bfb by Allen Winter.
Committed on 01/05/2012 at 01:02.
Pushed by winterz into branch 'master'.
QPointer wrap the Calendar and Task Editor dialogs for crash safety.
M +8 -7 resources/google/calendar/settingsdialog.cpp
http://commits.kde.org/kdepim-runtime/53ae237970ceffb8b089861c4aa08d92c1723bfb
diff --git a/resources/google/calendar/settingsdialog.cpp b/resources/google/calendar/settingsdialog.cpp
index a0826e6..1671e6a 100644
--- a/resources/google/calendar/settingsdialog.cpp
+++ b/resources/google/calendar/settingsdialog.cpp
@@ -21,14 +21,15 @@
#include "tasklisteditor.h"
#include "ui_settingsdialog.h"
-#include <QtGui/QPixmap>
-#include <QtGui/QIcon>
-#include <QtGui/QListWidget>
-
#include <KWindowSystem>
#include <KLocalizedString>
#include <KMessageBox>
+#include <QPixmap>
+#include <QIcon>
+#include <QListWidget>
+#include <QPointer>
+
#include <libkgoogle/accessmanager.h>
#include <libkgoogle/request.h>
#include <libkgoogle/reply.h>
@@ -257,7 +258,7 @@ void SettingsDialog::accountChanged()
void SettingsDialog::addCalendarClicked()
{
- CalendarEditor *editor = new CalendarEditor;
+ QPointer<CalendarEditor> editor = new CalendarEditor;
connect( editor, SIGNAL(accepted(KGoogle::Objects::Calendar*)),
this, SLOT(addCalendar(KGoogle::Objects::Calendar*)) );
@@ -318,7 +319,7 @@ void SettingsDialog::editCalendarClicked()
return;
}
- CalendarEditor *editor = new CalendarEditor( calendar );
+ QPointer<CalendarEditor> editor = new CalendarEditor( calendar );
connect( editor, SIGNAL(accepted(KGoogle::Objects::Calendar*)),
this, SLOT(editCalendar(KGoogle::Objects::Calendar*)) );
@@ -505,7 +506,7 @@ void SettingsDialog::editTaskListClicked()
return;
}
- TasklistEditor *editor = new TasklistEditor( taskList );
+ QPointer<TasklistEditor> editor = new TasklistEditor( taskList );
connect( editor, SIGNAL(accepted(KGoogle::Objects::TaskList*)),
this, SLOT(editTaskList(KGoogle::Objects::TaskList*)) );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic