[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/kontact/plugins/planner
From: Tobias Koenig <tokoe () kde ! org>
Date: 2009-11-20 14:55:38
Message-ID: 1258728938.873496.28564.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1052012 by tokoe:
Port from KABC::StdAddressBook to Akonadi based classes
M +1 -1 CMakeLists.txt
M +6 -6 planner.cpp
--- trunk/KDE/kdepim/kontact/plugins/planner/CMakeLists.txt #1052011:1052012
@@ -10,7 +10,7 @@
kde4_add_plugin(kontact_plannerplugin ${kontact_plannerplugin_PART_SRCS})
-target_link_libraries(kontact_plannerplugin ${KDE4_KDECORE_LIBS} \
${KDEPIMLIBS_KCAL_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS} \
${KDEPIMLIBS_KONTACTINTERFACE_LIBS} korganizer_calendar kaddressbookprivate) \
+target_link_libraries(kontact_plannerplugin ${KDE4_KDECORE_LIBS} \
${KDEPIMLIBS_KCAL_LIBS} ${KDEPIMLIBS_KHOLIDAYS_LIBS} \
${KDEPIMLIBS_KONTACTINTERFACE_LIBS} korganizer_calendar ${KDE4_AKONADI_CONTACT_LIBS}) \
########### next target ###############
--- trunk/KDE/kdepim/kontact/plugins/planner/planner.cpp #1052011:1052012
@@ -29,7 +29,7 @@
#include "korganizer/korganizerinterface.h"
#include "korganizer/stdcalendar.h"
-#include <KABC/StdAddressBook>
+#include <akonadi/contact/contactsearchjob.h>
#include <KCal/CalendarResources>
#include <KCal/CalHelper>
@@ -95,9 +95,6 @@
mCalendar = KOrg::StdCalendar::self();
mCalendar->load();
- mAddressBook = StdAddressBook::self();
- mAddressBook->load();
-
connect( mCalendar, SIGNAL(calendarChanged()), SLOT(updateView()) );
connect( mPlugin->core(), SIGNAL(dayChanged(const QDate&)), SLOT(updateView()) );
@@ -624,8 +621,11 @@
{
mDates.clear();
- Q_FOREACH ( const Addressee &addressee, mAddressBook->allAddressees() ) {
- QDate birthday = addressee.birthday().date();
+ Akonadi::ContactSearchJob *job = new Akonadi::ContactSearchJob( this );
+ job->exec();
+
+ Q_FOREACH ( const Addressee &addressee, job->contacts() ) {
+ const QDate birthday = addressee.birthday().date();
if ( birthday.isValid() && mBirthdayConList &&
birthday.day() == date.day() && birthday.month() == date.month() ) {
SDEntry entry;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic