Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
45bf7a4b
Commit
45bf7a4b
authored
Aug 02, 2010
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not necessary to test pointer before to delete it
svn path=/trunk/KDE/kdepim/kontact/plugins/; revision=1158310
parent
511ff42c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
kontact/plugins/specialdates/sdsummarywidget.cpp
kontact/plugins/specialdates/sdsummarywidget.cpp
+11
-14
No files found.
kontact/plugins/specialdates/sdsummarywidget.cpp
View file @
45bf7a4b
...
...
@@ -44,7 +44,8 @@
#include <Akonadi/Contact/ContactSearchJob>
#include <Akonadi/Contact/ContactViewerDialog>
#include <kcalcore/calendar.h>
#include <KCal/Calendar>
#include <KCal/CalHelper>
#include <KMenu>
#include <KLocale>
...
...
@@ -198,7 +199,7 @@ void SDSummaryWidget::configUpdated()
group
=
config
.
group
(
"Groupware"
);
mShowMineOnly
=
group
.
readEntry
(
"ShowMineOnly"
,
false
);
updateView
();
}
...
...
@@ -208,9 +209,7 @@ bool SDSummaryWidget::initHolidays()
KConfigGroup
hconfig
(
&
_hconfig
,
"Time & Date"
);
QString
location
=
hconfig
.
readEntry
(
"Holidays"
);
if
(
!
location
.
isEmpty
()
)
{
if
(
mHolidays
)
{
delete
mHolidays
;
}
delete
mHolidays
;
mHolidays
=
new
HolidayRegion
(
location
);
return
true
;
}
...
...
@@ -218,7 +217,7 @@ bool SDSummaryWidget::initHolidays()
}
// number of days remaining in an Event
int
SDSummaryWidget
::
span
(
const
KCalCore
::
Event
::
Ptr
&
event
)
const
int
SDSummaryWidget
::
span
(
KCal
::
Event
::
Ptr
event
)
const
{
int
span
=
1
;
if
(
event
->
isMultiDay
()
&&
event
->
allDay
()
)
{
...
...
@@ -235,7 +234,7 @@ int SDSummaryWidget::span( const KCalCore::Event::Ptr &event ) const
}
// day of a multiday Event
int
SDSummaryWidget
::
dayof
(
const
KCalCore
::
Event
::
Ptr
&
event
,
const
QDate
&
date
)
const
int
SDSummaryWidget
::
dayof
(
KCal
::
Event
::
Ptr
event
,
const
QDate
&
date
)
const
{
int
dayof
=
1
;
QDate
d
=
event
->
dtStart
().
date
();
...
...
@@ -305,20 +304,18 @@ void SDSummaryWidget::createLabels()
EventSortStartDate
,
SortDirectionAscending
);
foreach
(
const
Item
&
item
,
items
)
{
KCal
Core
::
Event
::
Ptr
ev
=
Akonadi
::
event
(
item
);
KCal
::
Event
::
Ptr
ev
=
Akonadi
::
event
(
item
);
// Optionally, show only my Events
/*
if ( mShowMineOnly && !KCal
Core
::CalHelper::isMyCalendarIncidence( mCalendarAdaptor, ev. ) ) {
if
(
mShowMineOnly
&&
!
KCal
::
CalHelper
::
isMyCalendarIncidence
(
mCalendarAdaptor
,
ev
.
get
()
)
)
{
// FIXME; does isMyCalendarIncidence work !? It's deprecated too.
continue
;
}
// TODO: CalHelper is deprecated, remove this?
*/
}
if
(
ev
->
customProperty
(
"KABC"
,
"BIRTHDAY"
)
==
"YES"
)
{
// Skipping, because these are got by the BirthdaySearchJob
// See comments in updateView()
continue
;
continue
;
}
if
(
!
ev
->
categoriesStr
().
isEmpty
()
)
{
...
...
@@ -632,7 +629,7 @@ void SDSummaryWidget::updateView()
*
* We could remove thomas' BirthdaySearchJob and use the ETM for that
* but it has the advantage that we don't need a Birthday agent running.
*
*
**/
// Search for Birthdays
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment