1 |
dilfridge 12/08/01 22:49:11 |
2 |
|
3 |
Added: |
4 |
0006-Bug-296383-during-startup-check-that-resources-calen.patch |
5 |
0003-Bug-271580-Fix-crash-displaying-New-Alarm-dialog-fro.patch |
6 |
0001-Bug-266082-highlight-alarm-when-message-window-KAlar.patch |
7 |
Log: |
8 |
Add upstream bugfixes |
9 |
|
10 |
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 kde-base/kalarm/files/4.4/0006-Bug-296383-during-startup-check-that-resources-calen.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0006-Bug-296383-during-startup-check-that-resources-calen.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0006-Bug-296383-during-startup-check-that-resources-calen.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: 0006-Bug-296383-during-startup-check-that-resources-calen.patch |
19 |
=================================================================== |
20 |
From f73e082654a88617439043454b45bf950d168dfc Mon Sep 17 00:00:00 2001 |
21 |
From: David Jarvie <djarvie@×××.org> |
22 |
Date: Thu, 29 Mar 2012 00:29:03 +0100 |
23 |
Subject: [PATCH 6/6] Bug 296383: during startup, check that resources |
24 |
calendar opens ok |
25 |
|
26 |
Prevent crash in program initialisation by checking that the |
27 |
resources calendar has opened successfully. |
28 |
|
29 |
BUG:296383 |
30 |
|
31 |
Backport of 4a3204b75464406ab3b3505e2fe222937aac6750 (master) |
32 |
--- |
33 |
kalarm/Changelog | 3 ++- |
34 |
kalarm/alarmcalendar.cpp | 19 ++++++++++++++++--- |
35 |
kalarm/alarmcalendar.h | 4 ++-- |
36 |
kalarm/kalarmapp.cpp | 3 ++- |
37 |
4 files changed, 22 insertions(+), 7 deletions(-) |
38 |
|
39 |
diff --git a/kalarm/Changelog b/kalarm/Changelog |
40 |
index 7caf1dd..e2aee86 100644 |
41 |
--- a/kalarm/Changelog |
42 |
+++ b/kalarm/Changelog |
43 |
@@ -1,10 +1,11 @@ |
44 |
KAlarm Change Log |
45 |
|
46 |
-=== Version 2.4.12 --- 26 April 2011 === |
47 |
+=== Version 2.4.12 --- 29 March 2012 === |
48 |
- Fix crash on some systems when New Alarm dialogue is displayed from system tray |
49 |
icon menu. |
50 |
- Fix KAlarm button in alarm window not always showing main window and not |
51 |
highlighting the alarm in the main window. |
52 |
+- Fail cleanly if calendar resources fail to open. |
53 |
|
54 |
=== Version 2.4.11 (KDEPIM 4.4.11) --- 16 April 2011 === |
55 |
- Fix bad borders round left hand buttons of time spinboxes in Oxygen style. |
56 |
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp |
57 |
index 0b6eed8..281b58c 100644 |
58 |
--- a/kalarm/alarmcalendar.cpp |
59 |
+++ b/kalarm/alarmcalendar.cpp |
60 |
@@ -1,7 +1,7 @@ |
61 |
/* |
62 |
* alarmcalendar.cpp - KAlarm calendar file access |
63 |
* Program: kalarm |
64 |
- * Copyright © 2001-2009 by David Jarvie <djarvie@×××.org> |
65 |
+ * Copyright © 2001-2012 by David Jarvie <djarvie@×××.org> |
66 |
* |
67 |
* This program is free software; you can redistribute it and/or modify |
68 |
* it under the terms of the GNU General Public License as published by |
69 |
@@ -187,11 +187,24 @@ AlarmCalendar::~AlarmCalendar() |
70 |
} |
71 |
|
72 |
/****************************************************************************** |
73 |
+* Check whether the calendar is open. |
74 |
+*/ |
75 |
+bool AlarmCalendar::isOpen() |
76 |
+{ |
77 |
+ if (mOpen && mCalType == RESOURCES && !AlarmResources::instance()) |
78 |
+ { |
79 |
+ mCalendar = 0; |
80 |
+ mOpen = false; |
81 |
+ } |
82 |
+ return mOpen; |
83 |
+} |
84 |
+ |
85 |
+/****************************************************************************** |
86 |
* Open the calendar if not already open, and load it into memory. |
87 |
*/ |
88 |
bool AlarmCalendar::open() |
89 |
{ |
90 |
- if (mOpen) |
91 |
+ if (isOpen()) |
92 |
return true; |
93 |
if (mCalType == RESOURCES) |
94 |
{ |
95 |
@@ -233,7 +246,7 @@ bool AlarmCalendar::open() |
96 |
delete mCalendar; |
97 |
mCalendar = 0; |
98 |
} |
99 |
- return mOpen; |
100 |
+ return isOpen(); |
101 |
} |
102 |
|
103 |
/****************************************************************************** |
104 |
diff --git a/kalarm/alarmcalendar.h b/kalarm/alarmcalendar.h |
105 |
index be4537d..1535dd0 100644 |
106 |
--- a/kalarm/alarmcalendar.h |
107 |
+++ b/kalarm/alarmcalendar.h |
108 |
@@ -1,7 +1,7 @@ |
109 |
/* |
110 |
* alarmcalendar.h - KAlarm calendar file access |
111 |
* Program: kalarm |
112 |
- * Copyright © 2001-2009 by David Jarvie <djarvie@×××.org> |
113 |
+ * Copyright © 2001-2012 by David Jarvie <djarvie@×××.org> |
114 |
* |
115 |
* This program is free software; you can redistribute it and/or modify |
116 |
* it under the terms of the GNU General Public License as published by |
117 |
@@ -78,7 +78,7 @@ class AlarmCalendar : public QObject |
118 |
KAEvent* updateEvent(const KAEvent*); |
119 |
bool deleteEvent(const QString& eventID, bool save = false); |
120 |
void purgeEvents(const KAEvent::List&); |
121 |
- bool isOpen() const { return mOpen; } |
122 |
+ bool isOpen(); |
123 |
QString path() const { return (mCalType == RESOURCES) ? QString() : mUrl.prettyUrl(); } |
124 |
QString urlString() const { return (mCalType == RESOURCES) ? QString() : mUrl.url(); } |
125 |
void adjustStartOfDay(); |
126 |
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp |
127 |
index e472bac..f432860 100644 |
128 |
--- a/kalarm/kalarmapp.cpp |
129 |
+++ b/kalarm/kalarmapp.cpp |
130 |
@@ -1953,7 +1953,8 @@ bool KAlarmApp::initCheck(bool calendarOnly) |
131 |
*/ |
132 |
AlarmCalendar::displayCalendar()->open(); |
133 |
|
134 |
- AlarmCalendar::resources()->open(); |
135 |
+ if (!AlarmCalendar::resources()->open()) |
136 |
+ return false; |
137 |
setArchivePurgeDays(); |
138 |
|
139 |
firstTime = false; |
140 |
-- |
141 |
1.7.9.2 |
142 |
|
143 |
|
144 |
|
145 |
|
146 |
1.1 kde-base/kalarm/files/4.4/0003-Bug-271580-Fix-crash-displaying-New-Alarm-dialog-fro.patch |
147 |
|
148 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0003-Bug-271580-Fix-crash-displaying-New-Alarm-dialog-fro.patch?rev=1.1&view=markup |
149 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0003-Bug-271580-Fix-crash-displaying-New-Alarm-dialog-fro.patch?rev=1.1&content-type=text/plain |
150 |
|
151 |
Index: 0003-Bug-271580-Fix-crash-displaying-New-Alarm-dialog-fro.patch |
152 |
=================================================================== |
153 |
From 4b504e760e0c994e676b55bfaca731d74841f1f4 Mon Sep 17 00:00:00 2001 |
154 |
From: David Jarvie <djarvie@×××.org> |
155 |
Date: Tue, 26 Apr 2011 23:29:19 +0100 |
156 |
Subject: [PATCH 3/6] Bug 271580: Fix crash displaying New Alarm dialog from |
157 |
system tray |
158 |
|
159 |
Fixes a crash on some systems when the New Alarm dialog is displayed |
160 |
from the system tray icon menu. |
161 |
--- |
162 |
kalarm/Changelog | 4 +++- |
163 |
kalarm/lib/spinbox2.cpp | 9 +++++---- |
164 |
2 files changed, 8 insertions(+), 5 deletions(-) |
165 |
|
166 |
diff --git a/kalarm/Changelog b/kalarm/Changelog |
167 |
index fab5edf..7caf1dd 100644 |
168 |
--- a/kalarm/Changelog |
169 |
+++ b/kalarm/Changelog |
170 |
@@ -1,6 +1,8 @@ |
171 |
KAlarm Change Log |
172 |
|
173 |
-=== Version 2.4.12 --- 22 April 2011 === |
174 |
+=== Version 2.4.12 --- 26 April 2011 === |
175 |
+- Fix crash on some systems when New Alarm dialogue is displayed from system tray |
176 |
+ icon menu. |
177 |
- Fix KAlarm button in alarm window not always showing main window and not |
178 |
highlighting the alarm in the main window. |
179 |
|
180 |
diff --git a/kalarm/lib/spinbox2.cpp b/kalarm/lib/spinbox2.cpp |
181 |
index cc10882..f1e8ab9 100644 |
182 |
--- a/kalarm/lib/spinbox2.cpp |
183 |
+++ b/kalarm/lib/spinbox2.cpp |
184 |
@@ -1,7 +1,7 @@ |
185 |
/* |
186 |
* spinbox2.cpp - spin box with extra pair of spin buttons (for Qt 3) |
187 |
* Program: kalarm |
188 |
- * Copyright © 2001-2009 by David Jarvie <djarvie@×××.org> |
189 |
+ * Copyright © 2001-2009,2011 by David Jarvie <djarvie@×××.org> |
190 |
* |
191 |
* This program is free software; you can redistribute it and/or modify |
192 |
* it under the terms of the GNU General Public License as published by |
193 |
@@ -28,7 +28,7 @@ |
194 |
#include <QMouseEvent> |
195 |
#include <QStyleOptionSpinBox> |
196 |
#include <QGraphicsPixmapItem> |
197 |
-#include <QPaintEngine> |
198 |
+#include <QPainter> |
199 |
#include <QTimer> |
200 |
#include <QFrame> |
201 |
#include <QBrush> |
202 |
@@ -588,8 +588,9 @@ void SpinMirror::setFrame() |
203 |
p = grabWidget(mMainSpinbox, QRect(x, 0, 1, height())); |
204 |
// Blot out edit field stuff from the middle of the slice |
205 |
QPixmap dot = grabWidget(mMainSpinbox, QRect(x, editOffsetY, 1, 1)); |
206 |
- QPaintEngine* pe = p.paintEngine(); |
207 |
- pe->drawTiledPixmap(QRectF(0, editOffsetY, 1, height() - 2*editOffsetY), dot, QPointF(0, 0)); |
208 |
+ QPainter painter(&p); |
209 |
+ painter.drawTiledPixmap(0, editOffsetY, 1, height() - 2*editOffsetY, dot, 0, 0); |
210 |
+ painter.end(); |
211 |
// Horizontally fill the mirror widget with the vertical slice |
212 |
p = p.scaled(size()); |
213 |
// Grab the left hand border of the main spinbox, and draw it into the mirror widget. |
214 |
-- |
215 |
1.7.9.2 |
216 |
|
217 |
|
218 |
|
219 |
|
220 |
1.1 kde-base/kalarm/files/4.4/0001-Bug-266082-highlight-alarm-when-message-window-KAlar.patch |
221 |
|
222 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0001-Bug-266082-highlight-alarm-when-message-window-KAlar.patch?rev=1.1&view=markup |
223 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/kde-base/kalarm/files/4.4/0001-Bug-266082-highlight-alarm-when-message-window-KAlar.patch?rev=1.1&content-type=text/plain |
224 |
|
225 |
Index: 0001-Bug-266082-highlight-alarm-when-message-window-KAlar.patch |
226 |
=================================================================== |
227 |
From 712e45630ccd4ec128a087cb3de396b2df9e4ffc Mon Sep 17 00:00:00 2001 |
228 |
From: David Jarvie <djarvie@×××.org> |
229 |
Date: Fri, 22 Apr 2011 00:36:20 +0100 |
230 |
Subject: [PATCH 1/6] Bug 266082: highlight alarm when message window KAlarm |
231 |
button clicked |
232 |
|
233 |
Fix the KAlarm button in the alarm window not always showing the main |
234 |
window, and not highlighting the alarm in the main window. |
235 |
--- |
236 |
kalarm/Changelog | 4 ++++ |
237 |
kalarm/eventlistview.cpp | 11 +++++++---- |
238 |
kalarm/eventlistview.h | 6 +++--- |
239 |
kalarm/functions.cpp | 11 +++-------- |
240 |
kalarm/kalarm.h | 2 +- |
241 |
kalarm/mainwindow.cpp | 7 +------ |
242 |
6 files changed, 19 insertions(+), 22 deletions(-) |
243 |
|
244 |
diff --git a/kalarm/Changelog b/kalarm/Changelog |
245 |
index 25569f4..fab5edf 100644 |
246 |
--- a/kalarm/Changelog |
247 |
+++ b/kalarm/Changelog |
248 |
@@ -1,5 +1,9 @@ |
249 |
KAlarm Change Log |
250 |
|
251 |
+=== Version 2.4.12 --- 22 April 2011 === |
252 |
+- Fix KAlarm button in alarm window not always showing main window and not |
253 |
+ highlighting the alarm in the main window. |
254 |
+ |
255 |
=== Version 2.4.11 (KDEPIM 4.4.11) --- 16 April 2011 === |
256 |
- Fix bad borders round left hand buttons of time spinboxes in Oxygen style. |
257 |
- Fix initialisation of library global statics. |
258 |
diff --git a/kalarm/eventlistview.cpp b/kalarm/eventlistview.cpp |
259 |
index 75e8be8..0880c7f 100644 |
260 |
--- a/kalarm/eventlistview.cpp |
261 |
+++ b/kalarm/eventlistview.cpp |
262 |
@@ -1,7 +1,7 @@ |
263 |
/* |
264 |
* eventlistview.cpp - base class for widget showing list of alarms |
265 |
* Program: kalarm |
266 |
- * Copyright © 2007-2009 by David Jarvie <djarvie@×××.org> |
267 |
+ * Copyright © 2007-2009,2011 by David Jarvie <djarvie@×××.org> |
268 |
* |
269 |
* This program is free software; you can redistribute it and/or modify |
270 |
* it under the terms of the GNU General Public License as published by |
271 |
@@ -62,15 +62,18 @@ KAEvent* EventListView::event(int row) const |
272 |
|
273 |
/****************************************************************************** |
274 |
* Select one event and make it the current item. |
275 |
+* Optionally scroll to ensure that the event is visible. |
276 |
*/ |
277 |
-void EventListView::select(const QString& eventId) |
278 |
+void EventListView::select(const QString& eventId, bool scrollToEvent) |
279 |
{ |
280 |
- select(eventModel()->eventIndex(eventId)); |
281 |
+ select(eventModel()->eventIndex(eventId), scrollToEvent); |
282 |
} |
283 |
|
284 |
-void EventListView::select(const QModelIndex& index) |
285 |
+void EventListView::select(const QModelIndex& index, bool scrollToIndex) |
286 |
{ |
287 |
selectionModel()->select(index, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); |
288 |
+ if (scrollToIndex) |
289 |
+ scrollTo(index); |
290 |
} |
291 |
|
292 |
/****************************************************************************** |
293 |
diff --git a/kalarm/eventlistview.h b/kalarm/eventlistview.h |
294 |
index 23b97b1..f0dc7ca 100644 |
295 |
--- a/kalarm/eventlistview.h |
296 |
+++ b/kalarm/eventlistview.h |
297 |
@@ -1,7 +1,7 @@ |
298 |
/* |
299 |
* eventlistview.h - base class for widget showing list of alarms |
300 |
* Program: kalarm |
301 |
- * Copyright © 2007,2008 by David Jarvie <djarvie@×××.org> |
302 |
+ * Copyright © 2007,2008,2011 by David Jarvie <djarvie@×××.org> |
303 |
* |
304 |
* This program is free software; you can redistribute it and/or modify |
305 |
* it under the terms of the GNU General Public License as published by |
306 |
@@ -42,8 +42,8 @@ class EventListView : public QTreeView |
307 |
EventListModel* eventModel() const { return static_cast<EventListModel*>(static_cast<QAbstractProxyModel*>(model())->sourceModel()); } |
308 |
KAEvent* event(int row) const; |
309 |
KAEvent* event(const QModelIndex&) const; |
310 |
- void select(const QString& eventId); |
311 |
- void select(const QModelIndex&); |
312 |
+ void select(const QString& eventId, bool scrollToEvent = false); |
313 |
+ void select(const QModelIndex&, bool scrollToIndex = false); |
314 |
QModelIndex selectedIndex() const; |
315 |
KAEvent* selectedEvent() const; |
316 |
KAEvent::List selectedEvents() const; |
317 |
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp |
318 |
index ab1b6f1..307539a 100644 |
319 |
--- a/kalarm/functions.cpp |
320 |
+++ b/kalarm/functions.cpp |
321 |
@@ -132,14 +132,9 @@ MainWindow* displayMainWindowSelected(const QString& eventID) |
322 |
else |
323 |
{ |
324 |
// There is already a main window, so make it the active window |
325 |
- bool visible = win->isVisible(); |
326 |
- if (visible) |
327 |
- win->hide(); // in case it's on a different desktop |
328 |
- if (!visible || win->isMinimized()) |
329 |
- { |
330 |
- win->setWindowState(win->windowState() & ~Qt::WindowMinimized); |
331 |
- win->show(); |
332 |
- } |
333 |
+ win->hide(); // in case it's on a different desktop |
334 |
+ win->setWindowState(win->windowState() & ~Qt::WindowMinimized); |
335 |
+ win->show(); |
336 |
win->raise(); |
337 |
win->activateWindow(); |
338 |
} |
339 |
diff --git a/kalarm/kalarm.h b/kalarm/kalarm.h |
340 |
index 63333b2..e887eb3 100644 |
341 |
--- a/kalarm/kalarm.h |
342 |
+++ b/kalarm/kalarm.h |
343 |
@@ -23,7 +23,7 @@ |
344 |
|
345 |
#undef QT3_SUPPORT |
346 |
|
347 |
-#define KALARM_VERSION "2.4.11" |
348 |
+#define KALARM_VERSION "2.4.12" |
349 |
#define KALARM_NAME "KAlarm" |
350 |
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application |
351 |
|
352 |
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp |
353 |
index 95ce321..dd3b915 100644 |
354 |
--- a/kalarm/mainwindow.cpp |
355 |
+++ b/kalarm/mainwindow.cpp |
356 |
@@ -657,12 +657,7 @@ void MainWindow::updateKeepArchived(int days) |
357 |
void MainWindow::selectEvent(const QString& eventID) |
358 |
{ |
359 |
mListView->clearSelection(); |
360 |
- QModelIndex index = EventListModel::alarms()->eventIndex(eventID); |
361 |
- if (index.isValid()) |
362 |
- { |
363 |
- mListView->select(index); |
364 |
- mListView->scrollTo(index); |
365 |
- } |
366 |
+ mListView->select(eventID, true); |
367 |
} |
368 |
|
369 |
/****************************************************************************** |
370 |
-- |
371 |
1.7.9.2 |