I have made the following changes intended for :
  CE:MW:Shared / contactsd

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/8159

Thank You,
Robin Burchell

[This message was auto-generated]

---

Request # 8159:

Messages from BOSS:

State: review at 2013-02-20T18:56:53 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:w00t:branches:CE:MW:Shared / contactsd -> CE:MW:Shared / 
contactsd
  
changes files:
--------------
--- contactsd.changes
+++ contactsd.changes
@@ -0,0 +1,5 @@
+* Wed Feb 20 2013 Robin Burchell <[email protected]> - 1.2.0
+- Fork from upstream, merge existing patches back in
+- Fixes NEMO#517: contactsd goes nuts on upgrade
+- Removes dependency on qmsystem2
+

old:
----
  0001-Fix-header-path-for-new-versions-of-telepathy-qt4.patch
  0001-Move-tests-according-to-Mer-packaging-guidelines.patch
  0001-Replace-meegotouch-with-mlite-and-mlocale-in-unit-te.patch
  0001-Use-mlocale-instead-of-meegotouch-for-birthday-plugi.patch
  0001-compile-against-tracker-0-14.patch
  contactsd-1.1.1.tar.gz

new:
----
  contactsd-1.2.0.tar.bz2

spec files:
-----------
--- contactsd.spec
+++ contactsd.spec
@@ -1,20 +1,13 @@
 Name: contactsd
-# using pr1.3 branch
-Version: 1.1.1
+Version: 1.2.0
 Release: 1
 Summary: Telepathy <> tracker bridge for contacts
 Group: System/Libraries
-URL: https://gitorious.org/qtcontacts-tracker/contactsd
+URL: https://github.com/nemomobile/contactsd
 License: LGPLv2
-Source0: %{name}-%{version}.tar.gz
+Source0: %{name}-%{version}.tar.bz2
 Source1: contactsd.desktop
 Source2: contactsd.service
-Patch0: 0001-Move-tests-according-to-Mer-packaging-guidelines.patch
-Patch1: 0001-Fix-header-path-for-new-versions-of-telepathy-qt4.patch
-Patch2: 0001-Use-mlocale-instead-of-meegotouch-for-birthday-plugi.patch
-Patch3: 0001-compile-against-tracker-0-14.patch
-Patch4: 0001-Replace-meegotouch-with-mlite-and-mlocale-in-unit-te.patch
-BuildRequires: pkgconfig(qmsystem2)
 BuildRequires: pkgconfig(QtCore)
 BuildRequires: pkgconfig(QtSparql)
 BuildRequires: pkgconfig(QtSparqlTrackerExtensions)
@@ -74,12 +67,7 @@
 
 
 %prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%setup -q -n %{name}
 
 %build
 ./configure --bindir %{_bindir} --libdir %{_libdir} --includedir %{_includedir}

other changes:
--------------

++++++ contactsd-1.1.1.tar.gz -> contactsd-1.2.0.tar.bz2
--- DEBUG_INFO
+++ DEBUG_INFO
@@ -0,0 +1,2 @@
+For additional logging run contactsd --log-console.
+The --log-file and the --plugins option also might be useful.
--- README
+++ README
@@ -1,4 +1,3 @@
-=========
 contactsd
 =========
 
@@ -6,14 +5,14 @@
 and add them to tracker.
 
 The data on tracker can either be retrieved using QtMobility Contacts API or
-using tracker directly (e.g. using QtTracker).
+using tracker directly (e.g. using QtSparql).
 
 Requirements
 ============
 
 Building contactsd requires:
   telepathy-qt4 >= 0.3.9 and its dependencies 
<http://telepathy.freedesktop.org>
-  QtTracker
+  QtSparql
   QtMobility Contacts module
 
 Running the tests requires:
--- plugins/birthday/birthday.pro
+++ plugins/birthday/birthday.pro
@@ -23,7 +23,12 @@
 TEMPLATE = lib
 QT -= gui
 
-CONFIG += plugin qtsparql qtsparql-tracker-extensions 
qtcontacts_extensions_tracker cubi-0.1-tracker-0.10-ontologies meegotouch mkcal
+# Hack: mkcal adds /usr/include/meegotouch to include path, and alphabetic 
CONFIG
+# always puts that before mlocale, resulting in link errors. Force mlocale to 
be
+# first.
+INCLUDEPATH += /usr/include/mlocale
+
+CONFIG += plugin qtsparql qtsparql-tracker-extensions 
qtcontacts_extensions_tracker cubi-0.1-tracker-0.10-ontologies mlocale mkcal
 
 CONFIG(coverage):{
 QMAKE_CXXFLAGS += -c -g  --coverage -ftest-coverage -fprofile-arcs
--- plugins/birthday/cdbirthdaycalendar.cpp
+++ plugins/birthday/cdbirthdaycalendar.cpp
@@ -34,10 +34,13 @@
 #include "debug.h"
 
 using namespace Contactsd;
+using namespace ML10N;
 
 // A random ID.
 const QLatin1String calNotebookId("b1376da7-5555-1111-2222-227549c4e570");
 const QLatin1String calNotebookColor("#e00080"); // Pink
+const QString calIdExtension = QLatin1String("com.nokia.birthday/");
+
 
 CDBirthdayCalendar::CDBirthdayCalendar(SyncMode syncMode, QObject *parent) :
     QObject(parent),
@@ -68,12 +71,12 @@
     } else {
         // Clear the calendar database if and only if restoring from a backup.
         switch(syncMode) {
-        case Incremental:
+        case KeepOldDB:
             // Force calendar name update, if a locale change happened while 
contactsd was not running.
             onLocaleChanged();
             break;
 
-        case FullSync:
+        case DropOldDB:
             mStorage->deleteNotebook(notebook);
             notebook = createNotebook();
             mStorage->addNotebook(notebook);
@@ -107,13 +110,37 @@
                                                     0));
 }
 
+QHash<QContactLocalId, CalendarBirthday>
+CDBirthdayCalendar::birthdays()
+{
+    if (not mStorage->loadNotebookIncidences(calNotebookId)) {
+        warning() << Q_FUNC_INFO << "Failed to load all incidences";
+        return QHash<QContactLocalId, CalendarBirthday>();
+    }
+
+    QHash<QContactLocalId, CalendarBirthday> result;
+
+    foreach(const KCalCore::Event::Ptr event, mCalendar->events()) {
+        const QString eventUid = event->uid();
+        const QContactLocalId contactId = localContactId(eventUid);
+
+        if (0 != contactId) {
+            result.insert(contactId, CalendarBirthday(event->dtStart().date(), 
event->summary()));
+        } else {
+            warning() << Q_FUNC_INFO << "Birthday event with a bad uid: " << 
eventUid;
+        }
+    }
+
+    return result;
+}
+
 void CDBirthdayCalendar::updateBirthday(const QContact &contact)
 {
     // Retrieve contact details.
-    const QContactDisplayLabel displayName = 
contact.detail<QContactDisplayLabel>();
-    const QContactBirthday contactBirthday = 
contact.detail<QContactBirthday>();
+    const QString displayLabel = contact.displayLabel();
+    const QDate contactBirthday = contact.detail<QContactBirthday>().date();
 
-    if (displayName.isEmpty() || contactBirthday.isEmpty()) {
+    if (displayLabel.isEmpty() || contactBirthday.isNull()) {
         warning() << Q_FUNC_INFO << "Contact without name or birthday, local 
ID: "
                   << contact.localId();
         return;
@@ -148,18 +175,58 @@
     }
 
     // Transfer birthday details from contact to calendar event.
-    event->setSummary(displayName.label());
+    event->setSummary(displayLabel);
 
     // Event has only date information, no time.
-    event->setDtStart(KDateTime(contactBirthday.date(), QTime(), 
KDateTime::ClockTime));
-    event->setDtEnd(KDateTime(contactBirthday.date().addDays(1), QTime(), 
KDateTime::ClockTime));
+    event->setDtStart(KDateTime(contactBirthday, QTime(), 
KDateTime::ClockTime));
+    event->setDtEnd(KDateTime(contactBirthday.addDays(1), QTime(), 
KDateTime::ClockTime));
 
     // Must always set the recurrence as it depends on the event date.
-    KCalCore::Recurrence * const rule = event->recurrence();
-    rule->setStartDateTime(event->dtStart());
+    KCalCore::Recurrence *const recurrence = event->recurrence();
+
+    if (contactBirthday.month() != 2 || contactBirthday.day() < 29) {
+        // Simply setup yearly recurrence for trivial dates.
+        recurrence->setStartDateTime(event->dtStart());
+        recurrence->setYearly(1); /* every year */
+    } else {
+        // For birthdays on February 29th the event shall occur on the
+        // last day of February. This is February 29th in leap years,
+        // and February 28th in all other years.
+        //
+        // NOTE: Actually this recurrence pattern will fail badly for
+        // people born on February 29th of the years 2100, 2200, 2300,
+        // 2500, ... - but I seriously doubt we care.
+        //
+        // NOTE2: Using setByYearDays() instead of just setting proper
+        // start dates, since libmkcal fails to store the start dates
+        // of recurrence rules.
+        KCalCore::RecurrenceRule *rule;
+
+        // 1. Include February 29th in leap years.
+        rule = new KCalCore::RecurrenceRule;
+        rule->setStartDt(event->dtStart());
+        rule->setByYearDays(QList<int>() << 60); // Feb 29th
+        rule->setRecurrenceType(KCalCore::RecurrenceRule::rYearly);
+        rule->setFrequency(4); // every 4th year
+        recurrence->addRRule(rule);
+
+        // 2. Include February 28th starting from year after birth.
+        rule = new KCalCore::RecurrenceRule;
+        rule->setStartDt(event->dtStart());
+        rule->setByYearDays(QList<int>() << 59); // Feb 28th
+        rule->setRecurrenceType(KCalCore::RecurrenceRule::rYearly);
+        rule->setFrequency(1); // every year
+        recurrence->addRRule(rule);
+
+        // 3. Exclude February 28th in leap years.
+        rule = new KCalCore::RecurrenceRule;
+        rule->setStartDt(event->dtStart());
+        rule->setByYearDays(QList<int>() << 59); // Feb 28th
+        rule->setRecurrenceType(KCalCore::RecurrenceRule::rYearly);
+        rule->setFrequency(4); // every 4th year
+        recurrence->addExRule(rule);
 
-    // This is not a boolean, but the frequency of the recurrence: every 1 
year.
-    rule->setYearly(1);
+    }
 
     // Set the alarms on the event
     event->clearAlarms();
@@ -196,31 +263,28 @@
     }
 }
 
-QDate CDBirthdayCalendar::birthdayDate(QContactLocalId contactId)
+CalendarBirthday CDBirthdayCalendar::birthday(QContactLocalId contactId)
 {
     KCalCore::Event::Ptr event = calendarEvent(contactId);
 
     if (event.isNull()) {
-        return QDate();
+        return CalendarBirthday();
     }
 
-    return event->dtStart().date();
+    return CalendarBirthday(event->dtStart().date(), event->summary());
 }
 
-QString CDBirthdayCalendar::summary(QContactLocalId contactId)
+QContactLocalId CDBirthdayCalendar::localContactId(const QString 
&calendarEventId)
 {
-    KCalCore::Event::Ptr event = calendarEvent(contactId);
-
-    if (event.isNull()) {
-        return QString();
+    if (calendarEventId.startsWith(calIdExtension)) {
+        return calendarEventId.mid(calIdExtension.length()).toUInt();
     }
 
-    return event->summary();
+    return 0;
 }
 
 QString CDBirthdayCalendar::calendarEventId(QContactLocalId contactId)
 {
-    static const QLatin1String calIdExtension("com.nokia.birthday/");
     return calIdExtension + QString::number(contactId);
 }
 
--- plugins/birthday/cdbirthdaycalendar.h
+++ plugins/birthday/cdbirthdaycalendar.h
@@ -33,14 +33,31 @@
 
 QTM_USE_NAMESPACE
 
+class CalendarBirthday
+{
+public:
+    CalendarBirthday(const QDate &date, const QString &summary)
+    : mDate(date), mSummary(summary) {}
+    CalendarBirthday() {}
+
+public:
+    const QDate & date() const { return mDate; }
+    const QString & summary() const { return mSummary; }
+
+private:
+    QDate mDate;
+    QString mSummary;
+};
+
+
 class CDBirthdayCalendar : public QObject
 {
     Q_OBJECT
 
 public:
     enum SyncMode {
-        Incremental,
-        FullSync
+        KeepOldDB,
+        DropOldDB
     };
 
     //! Constructor.
@@ -56,13 +73,15 @@
     //! Actually save the events in the calendar database
     void save();
 
-    QDate birthdayDate(QContactLocalId contactId);
-    QString summary(QContactLocalId contactId);
+    CalendarBirthday birthday(QContactLocalId contactId);
+    QHash<QContactLocalId, CalendarBirthday> birthdays();
 
 private:
     mKCal::Notebook::Ptr createNotebook();
 
-    QString calendarEventId(QContactLocalId contactId);
+    static QContactLocalId localContactId(const QString &calendarEventId);
+    static QString calendarEventId(QContactLocalId contactId);
+
     KCalCore::Event::Ptr calendarEvent(QContactLocalId contactId);
 
 private Q_SLOTS:
--- plugins/birthday/cdbirthdaycontroller.cpp
+++ plugins/birthday/cdbirthdaycontroller.cpp
@@ -34,7 +34,6 @@
 
 #include <QContactBirthday>
 #include <QContactDetailFilter>
-#include <QContactDisplayLabel>
 #include <QContactFetchRequest>
 #include <QContactLocalIdFilter>
 
@@ -66,15 +65,11 @@
 
     fetchTrackerIds();
 
-    if (not stampFileExists()) {
-        // Delete the calendar database.
-        mCalendar = new CDBirthdayCalendar(CDBirthdayCalendar::FullSync, this);
-
-        updateAllBirthdays();
-    } else {
-        // Use the existing calendar database.
-        mCalendar = new CDBirthdayCalendar(CDBirthdayCalendar::Incremental, 
this);
-    }
+    const CDBirthdayCalendar::SyncMode syncMode = stampFileExists() ? 
CDBirthdayCalendar::KeepOldDB :
+                                                                      
CDBirthdayCalendar::DropOldDB;
+
+    mCalendar = new CDBirthdayCalendar(syncMode, this);
+    updateAllBirthdays();
 }
 
 CDBirthdayController::~CDBirthdayController()
@@ -228,9 +223,7 @@
     processNotifications(mDeleteNotifications, birthdayChangedIds, 
deletedContacts);
     processNotifications(mInsertNotifications, birthdayChangedIds, 
insertedContacts);
 
-    if (isDebugEnabled()) {
-        debug() << "changed birthdates: " << birthdayChangedIds.count() << 
birthdayChangedIds;
-    }
+    debug() << "changed birthdates: " << birthdayChangedIds.count() << 
birthdayChangedIds;
 
     // Remove the birthdays for contacts that are not there anymore
     foreach (QContactLocalId id, deletedContacts) {
@@ -295,7 +288,7 @@
 void
 
CDBirthdayController::onFullSyncRequestStateChanged(QContactAbstractRequest::State
 newState)
 {
-    if (processFetchRequest(qobject_cast<QContactFetchRequest*>(sender()), 
newState)) {
+    if (processFetchRequest(qobject_cast<QContactFetchRequest*>(sender()), 
newState, FullSync)) {
         // Create the stamp file only after a successful full sync.
         createStampFile();
     }
@@ -317,7 +310,7 @@
 void
 
CDBirthdayController::onFetchRequestStateChanged(QContactAbstractRequest::State 
newState)
 {
-    processFetchRequest(qobject_cast<QContactFetchRequest*>(sender()), 
newState);
+    processFetchRequest(qobject_cast<QContactFetchRequest*>(sender()), 
newState, Incremental);
 }
 
 
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -353,7 +346,8 @@
 
 bool
 CDBirthdayController::processFetchRequest(QContactFetchRequest *const 
fetchRequest,
-                                          QContactAbstractRequest::State 
newState)
+                                          QContactAbstractRequest::State 
newState,
+                                          SyncMode syncMode)
 {
     if (fetchRequest == 0) {
         warning() << Q_FUNC_INFO << "Invalid fetch request";
@@ -370,7 +364,13 @@
             warning() << Q_FUNC_INFO << "Error during birthday contact fetch 
request, code: "
                       << fetchRequest->error();
         } else {
-            updateBirthdays(fetchRequest->contacts());
+            const QList<QContact> contacts = fetchRequest->contacts();
+
+            if (FullSync == syncMode) {
+                syncBirthdays(contacts);
+            } else {
+                updateBirthdays(contacts);
+            }
             success = true;
         }
 
@@ -398,27 +398,67 @@
 {
     foreach (const QContact &contact, changedBirthdays) {
         const QContactBirthday contactBirthday = 
contact.detail<QContactBirthday>();
-        const QContactDisplayLabel contactDisplayLabel = 
contact.detail<QContactDisplayLabel>();
-        const QDate calendarBirthday = 
mCalendar->birthdayDate(contact.localId());
-        const QString calendarSummary = mCalendar->summary(contact.localId());
+        const QString contactDisplayLabel = contact.displayLabel();
+        const CalendarBirthday calendarBirthday = 
mCalendar->birthday(contact.localId());
 
         // Display label or birthdate was removed from the contact, so delete 
it from the calendar.
-        if (contactDisplayLabel.label().isNull() || 
contactBirthday.date().isNull()) {
-            if (isDebugEnabled()) {
-                debug() << "Contact: " << contact << " removed birthday or 
displayLabel, so delete the calendar event";
-            }
+        if (contactDisplayLabel.isEmpty() || contactBirthday.date().isNull()) {
+            debug() << "Contact: " << contact << " removed birthday or 
displayLabel, so delete the calendar event";
 
             mCalendar->deleteBirthday(contact.localId());
         // Display label or birthdate was changed on the contact, so update 
the calendar.
-        } else if ((contactDisplayLabel.label() != calendarSummary) ||
-                   (contactBirthday.date() != calendarBirthday)) {
-            if (isDebugEnabled()) {
+        } else if ((contactDisplayLabel != calendarBirthday.summary()) ||
+                   (contactBirthday.date() != calendarBirthday.date())) {
+            debug() << "Contact with calendar birthday: " << 
contactBirthday.date()
+                    << " and calendar displayLabel: " << 
calendarBirthday.summary()
+                    << " changed details to: " << contact << ", so update the 
calendar event";
+
+            mCalendar->updateBirthday(contact);
+        }
+    }
+}
+
+void
+CDBirthdayController::syncBirthdays(const QList<QContact> &birthdayContacts)
+{
+    QHash<QContactLocalId, CalendarBirthday> oldBirthdays = 
mCalendar->birthdays();
+
+    // Check all birthdays from the contacts if the stored calendar item is 
up-to-date
+    foreach (const QContact &contact, birthdayContacts) {
+        const QString contactDisplayLabel = contact.displayLabel();
+
+        if (contactDisplayLabel.isNull()) {
+            debug() << "Contact: " << contact << " has no displayLabel, so not 
syncing to calendar";
+            continue;
+        }
+
+        QHash<QContactLocalId, CalendarBirthday>::Iterator it = 
oldBirthdays.find(contact.localId());
+
+        if (oldBirthdays.end() != it) {
+            const QContactBirthday contactBirthday = 
contact.detail<QContactBirthday>();
+            const CalendarBirthday &calendarBirthday = *it;
+
+            // Display label or birthdate was changed on the contact, so 
update the calendar.
+            if ((contactDisplayLabel != calendarBirthday.summary()) ||
+                (contactBirthday.date() != calendarBirthday.date())) {
                 debug() << "Contact with calendar birthday: " << 
contactBirthday.date()
-                        << " and calendar displayLabel: " << calendarSummary
+                        << " and calendar displayLabel: " << 
calendarBirthday.summary()
                         << " changed details to: " << contact << ", so update 
the calendar event";
+
+                mCalendar->updateBirthday(contact);
             }
 
+            // Birthday exists, so not a garbage one
+            oldBirthdays.erase(it);
+        } else {
+            // Create new birthday
             mCalendar->updateBirthday(contact);
         }
     }
+
+    // Remaining old birthdays in the calendar db do not did not match any 
contact, so remove them.
+    foreach(QContactLocalId id, oldBirthdays.keys()) {
+        debug() << "Birthday with contact id" << id << "no longer has a 
matching contact, trashing it";
+        mCalendar->deleteBirthday(id);
+    }
 }
--- plugins/birthday/cdbirthdaycontroller.h
+++ plugins/birthday/cdbirthdaycontroller.h
@@ -43,6 +43,11 @@
 {
     Q_OBJECT
 
+    enum SyncMode {
+        Incremental,
+        FullSync
+    };
+
 public:
     explicit CDBirthdayController(QSparqlConnection &connection,
                                   QObject *parent = 0);
@@ -63,7 +68,8 @@
     void updateAllBirthdays();
     void connectChangeNotifier();
     bool processFetchRequest(QContactFetchRequest * const fetchRequest,
-                             QContactAbstractRequest::State newState);
+                             QContactAbstractRequest::State newState,
+                             SyncMode syncMode = Incremental);
     void processNotificationQueues();
     void processNotifications(QList<TrackerChangeNotifier::Quad> 
&notifications,
                               QSet<QContactLocalId> &propertyChanges,
@@ -71,6 +77,7 @@
     void fetchContacts(const QList<QContactLocalId> &contactIds);
     void fetchContacts(const QContactFilter &filter, const char *slot);
     void updateBirthdays(const QList<QContact> &changedBirthdays);
+    void syncBirthdays(const QList<QContact> &birthdayContacts);
 
 private:
     enum {
--- plugins/hotfixes
+++ plugins/hotfixes
-(directory)
--- plugins/hotfixes/hotfixes.cpp
+++ plugins/hotfixes/hotfixes.cpp
@@ -1,215 +0,0 @@
-/*********************************************************************************
- ** This file is part of QtContacts tracker storage plugin
- **
- ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Nokia Corporation ([email protected])
- **
- ** GNU Lesser General Public License Usage
- ** This file may be used under the terms of the GNU Lesser General Public 
License
- ** version 2.1 as published by the Free Software Foundation and appearing in 
the
- ** file LICENSE.LGPL included in the packaging of this file.  Please review 
the
- ** following information to ensure the GNU Lesser General Public License 
version
- ** 2.1 requirements will be met:
- ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain additional 
rights.
- ** These rights are described in the Nokia Qt LGPL Exception version 1.1, 
included
- ** in the file LGPL_EXCEPTION.txt in this package.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- 
*********************************************************************************/
-
-
-#include "hotfixes.h"
-#include "debug.h"
-
-#include <QtCore>
-#include <qmheartbeat.h>
-
-namespace Contactsd {
-
-using MeeGo::QmHeartbeat;
-
-typedef QPair<QString, QString> GarbageTuple;
-
-class HotFixesPrivate
-{
-    HotFixesPrivate(QSparqlConnection &connection)
-        : connection(connection)
-        , heartbeat(0)
-        , timer(0)
-    {
-    }
-
-    QSparqlConnection &connection;
-    QmHeartbeat *heartbeat;
-    QTimer *timer;
-
-    QSparqlQuery checkupQuery;
-    QList<GarbageTuple> garbageTuples;
-
-    friend class HotFixes;
-};
-
-HotFixes::HotFixes(QSparqlConnection &connection, QObject *parent)
-    : QObject(parent)
-    , d(new HotFixesPrivate(connection))
-{
-    if (d->heartbeat) {
-        d->heartbeat->close();
-        d->heartbeat->deleteLater();
-        d->heartbeat = 0;
-    }
-
-    d->heartbeat = new QmHeartbeat(this);
-
-    if (d->heartbeat->open(QmHeartbeat::SignalNeeded)) {
-        connect(d->heartbeat, SIGNAL(wakeUp(QTime)), this, SLOT(onWakeUp()));
-    } else {
-        warning() << "hotfixes - Hearthbeat service not available, using 
fallback mechanism.";
-        d->heartbeat->deleteLater();
-        d->heartbeat = 0;
-
-        d->timer = new QTimer(this);
-        d->timer->setSingleShot(true);
-        connect(d->timer, SIGNAL(timeout()), this, SLOT(onWakeUp()));
-    }
-
-    scheduleWakeUp(0, QmHeartbeat::WAKEUP_SLOT_2_5_MINS);
-}
-
-HotFixes::~HotFixes()
-{
-    if (d->heartbeat) {
-        d->heartbeat->close();
-    }
-
-
-    delete d;
-}
-
-void HotFixes::scheduleWakeUp()
-{
-    scheduleWakeUp(MeeGo::QmHeartbeat::WAKEUP_SLOT_10_HOURS,
-                   MeeGo::QmHeartbeat::WAKEUP_SLOT_10_HOURS);
-}
-
-void HotFixes::scheduleWakeUp(ushort minimumDelay, ushort maximumDelay)
-{
-    debug() << "hotfixes - scheduling wakeup within" << minimumDelay << 
"seconds";
-
-    if (d->heartbeat) {
-        d->heartbeat->wait(minimumDelay, maximumDelay,
-                          QmHeartbeat::DoNotWaitHeartbeat);
-    } else if (d->timer) {
-        // seems "wakeup slots" are just a delay in seconds
-        d->timer->setInterval((minimumDelay + maximumDelay) * 1000 / 2);
-        d->timer->start();
-    }
-}
-
-bool HotFixes::runQuery(const QSparqlQuery &query, const char *slot)
-{
-    QSparqlQueryOptions options;
-    options.setPriority(QSparqlQueryOptions::LowPriority);
-    QSparqlResult *const result = d->connection.exec(query);
-
-    if (result->hasError()) {
-        warning() << "hotfixes - query failed:" << 
result->lastError().message();
-        result->deleteLater();
-        return false;
-    }
-
-    connect(result, SIGNAL(finished()), this, slot);
-    return true;
-}
-
-bool HotFixes::runLookupQuery()
-{
-    debug() << "hotfixes - running lookup query";
-
-    d->garbageTuples.clear();
-
-    static const QLatin1String queryString
-            ("SELECT ?contact ?date {\n"
-             "  ?contact a nco:Contact\n"
-             "  GRAPH <urn:uuid:08070f5c-a334-4d19-a8b0-12a3071bfab9> {\n"
-             "    ?contact dc:date ?date\n"
-             "  }\n"
-             "  FILTER(!EXISTS { ?contact nie:contentLastModified ?date }\n"
-             "      && !EXISTS { ?contact nie:contentAccessed ?date }\n"
-             "      && !EXISTS { ?contact nie:contentCreated ?date })\n"
-             "} LIMIT 200");
-
-    const QSparqlQuery query(queryString, QSparqlQuery::SelectStatement);
-    return runQuery(query, SLOT(onLookupQueryFinished()));
-}
-
-bool HotFixes::runCleanupQuery()
-{
-    if (d->garbageTuples.isEmpty()) {
-        return false;
-    }
-
-    debug() << "hotfixes - running cleanup query";
-
-    QStringList queryTokens;
-
-    queryTokens += QLatin1String("DELETE {");
-
-    for(int i = 0; i < 40 && not d->garbageTuples.isEmpty(); ++i) {
-        const GarbageTuple tuple = d->garbageTuples.takeFirst();
-
-        queryTokens += QString::fromLatin1
-                ("  <%1> nie:informationElementDate \"%2\" ; dc:date \"%2\" 
.").
-                arg(tuple.first, tuple.second);
-    }
-
-    queryTokens += QLatin1String("}");
-
-    const QSparqlQuery query(queryTokens.join(QLatin1String("\n")),
-                             QSparqlQuery::DeleteStatement);
-    return runQuery(query, SLOT(onCleanupQueryFinished()));
-}
-
-void HotFixes::onWakeUp()
-{
-    if (not runLookupQuery()) {
-        // sleep long if no lookup was possible
-        scheduleWakeUp();
-    }
-}
-
-void HotFixes::onLookupQueryFinished()
-{
-    QSparqlResult *const result = qobject_cast<QSparqlResult *>(sender());
-
-    while(result->next()) {
-        d->garbageTuples += qMakePair(result->stringValue(0),
-                                     result->stringValue(1));
-    }
-
-    result->deleteLater();
-
-    if (not runCleanupQuery()) {
-        // sleep long if no cleanup was needed (or possible)
-        scheduleWakeUp();
-    }
-}
-
-void HotFixes::onCleanupQueryFinished()
-{
-    sender()->deleteLater();
-
-    if (not runCleanupQuery()) {
-        // sleep short if current batch of tuples has been processed
-        scheduleWakeUp(QmHeartbeat::WAKEUP_SLOT_30_SEC,
-                       QmHeartbeat::WAKEUP_SLOT_2_5_MINS);
-    }
-}
-
-
-} // namespace Contactsd
--- plugins/hotfixes/hotfixes.h
+++ plugins/hotfixes/hotfixes.h
@@ -1,62 +0,0 @@
-/*********************************************************************************
- ** This file is part of QtContacts tracker storage plugin
- **
- ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Nokia Corporation ([email protected])
- **
- ** GNU Lesser General Public License Usage
- ** This file may be used under the terms of the GNU Lesser General Public 
License
- ** version 2.1 as published by the Free Software Foundation and appearing in 
the
- ** file LICENSE.LGPL included in the packaging of this file.  Please review 
the
- ** following information to ensure the GNU Lesser General Public License 
version
- ** 2.1 requirements will be met:
- ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain additional 
rights.
- ** These rights are described in the Nokia Qt LGPL Exception version 1.1, 
included
- ** in the file LGPL_EXCEPTION.txt in this package.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- 
*********************************************************************************/
-
-
-#ifndef CONTACTSD_HOTFIXES_H
-#define CONTACTSD_HOTFIXES_H
-
-#include <QtSparql>
-
-namespace Contactsd {
-
-class HotFixesPrivate;
-class HotFixes : public QObject
-{
-    Q_OBJECT
-
-public:
-    explicit HotFixes(QSparqlConnection &connection, QObject *parent = 0);
-    virtual ~HotFixes();
-
-public slots:
-    void onWakeUp();
-
-private slots:
-    void onLookupQueryFinished();
-    void onCleanupQueryFinished();
-
-private:
-    void scheduleWakeUp();
-    void scheduleWakeUp(ushort minimumDelay, ushort maximumDelay);
-    bool runQuery(const QSparqlQuery &query, const char *slot);
-    bool runLookupQuery();
-    bool runCleanupQuery();
-
-private:
-    HotFixesPrivate *const d;
-};
-
-} // namespace Contactsd
-
-#endif // CONTACTSD_HOTFIXES_H
--- plugins/hotfixes/hotfixes.pro
+++ plugins/hotfixes/hotfixes.pro
@@ -1,27 +0,0 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2012-02-06T12:57:23
-#
-#-------------------------------------------------
-
-TEMPLATE = lib
-TARGET = contactshotfixesplugin
-
-CONFIG += plugin qtsparql qmsystem2
-QT += core
-QT -= gui
-
-INCLUDEPATH += $$TOP_SOURCEDIR/src
-DEPENDPATH += $$TOP_SOURCEDIR/src
-DEFINES += ENABLE_DEBUG QT_ASCII_CAST_WARNINGS
-
-target.path = $$LIBDIR/contactsd-1.0/plugins
-
-SOURCES += \
-    hotfixes.cpp \
-    plugin.cpp
-
-HEADERS += \
-    hotfixes.h
-
-INSTALLS += target
--- plugins/hotfixes/plugin.cpp
+++ plugins/hotfixes/plugin.cpp
@@ -1,61 +0,0 @@
-/** This file is part of Contacts daemon
- **
- ** Copyright (c) 2010-2012 Nokia Corporation and/or its subsidiary(-ies).
- **
- ** Contact:  Nokia Corporation ([email protected])
- **
- ** GNU Lesser General Public License Usage
- ** This file may be used under the terms of the GNU Lesser General Public 
License
- ** version 2.1 as published by the Free Software Foundation and appearing in 
the
- ** file LICENSE.LGPL included in the packaging of this file.  Please review 
the
- ** following information to ensure the GNU Lesser General Public License 
version
- ** 2.1 requirements will be met:
- ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Nokia gives you certain additional 
rights.
- ** These rights are described in the Nokia Qt LGPL Exception version 1.1, 
included
- ** in the file LGPL_EXCEPTION.txt in this package.
- **
- ** Other Usage
- ** Alternatively, this file may be used in accordance with the terms and
- ** conditions contained in a signed written agreement between you and Nokia.
- **/
-
-#include "base-plugin.h"
-#include "hotfixes.h"
-
-namespace Contactsd {
-
-class HotFixesPlugin : public BasePlugin
-{
-    Q_OBJECT
-
-public:
-    HotFixesPlugin()
-        : m_hotfixes(0)
-    {
-    }
-
-    void init()
-    {
-        m_hotfixes = new HotFixes(sparqlConnection(), this);
-    }
-
-    QMap<QString, QVariant> metaData()
-    {
-        MetaData data;
-        data[metaDataKeyName]    = 
QVariant(QString::fromLatin1("contacts-hotfixes"));
-        data[metaDataKeyVersion] = QVariant(QString::fromLatin1("1"));
-        data[metaDataKeyComment] = QVariant(QString::fromLatin1("Hotfixes for 
the contacts framework"));
-        return data;
-    }
-
-private:
-    HotFixes *m_hotfixes;
-};
-
-} // namespace Contactsd
-
-Q_EXPORT_PLUGIN2(garbagecollectorplugin, Contactsd::HotFixesPlugin)
-
-#include "plugin.moc"
--- plugins/plugins.pro
+++ plugins/plugins.pro
@@ -22,4 +22,4 @@
 
 TEMPLATE = subdirs
 
-SUBDIRS += telepathy garbage-collector birthday hotfixes
+SUBDIRS += telepathy garbage-collector birthday
--- plugins/telepathy/cdtpaccount.cpp
+++ plugins/telepathy/cdtpaccount.cpp
@@ -21,11 +21,11 @@
  ** conditions contained in a signed written agreement between you and Nokia.
  **/
 
-#include <TelepathyQt4/ContactManager>
-#include <TelepathyQt4/PendingContacts>
-#include <TelepathyQt4/PendingOperation>
-#include <TelepathyQt4/PendingReady>
-#include <TelepathyQt4/Profile>
+#include <TelepathyQt/ContactManager>
+#include <TelepathyQt/PendingContacts>
+#include <TelepathyQt/PendingOperation>
+#include <TelepathyQt/PendingReady>
+#include <TelepathyQt/Profile>
 
 #include "cdtpaccount.h"
 #include "cdtpaccountcacheloader.h"
--- plugins/telepathy/cdtpaccount.h
+++ plugins/telepathy/cdtpaccount.h
@@ -26,11 +26,11 @@
 
 #include <QObject>
 
-#include <TelepathyQt4/Account>
-#include <TelepathyQt4/Constants>
-#include <TelepathyQt4/Contact>
-#include <TelepathyQt4/Types>
-#include <TelepathyQt4/PendingOperation>
+#include <TelepathyQt/Account>
+#include <TelepathyQt/Constants>
+#include <TelepathyQt/Contact>
+#include <TelepathyQt/Types>
+#include <TelepathyQt/PendingOperation>
 
 #include "types.h"
 #include "cdtpcontact.h"
--- plugins/telepathy/cdtpcontact.cpp
+++ plugins/telepathy/cdtpcontact.cpp
@@ -21,8 +21,8 @@
  ** conditions contained in a signed written agreement between you and Nokia.
  **/
 
-#include <TelepathyQt4/AvatarData>
-#include <TelepathyQt4/ContactCapabilities>
+#include <TelepathyQt/AvatarData>
+#include <TelepathyQt/ContactCapabilities>
 
 #include "cdtpaccount.h"
 #include "cdtpcontact.h"
--- plugins/telepathy/cdtpcontact.h
+++ plugins/telepathy/cdtpcontact.h
@@ -26,9 +26,9 @@
 
 #include <QObject>
 
-#include <TelepathyQt4/Contact>
-#include <TelepathyQt4/Presence>
-#include <TelepathyQt4/Types>
+#include <TelepathyQt/Contact>
+#include <TelepathyQt/Presence>
+#include <TelepathyQt/Types>
 
 #include "types.h"
 
--- plugins/telepathy/cdtpcontroller.cpp
+++ plugins/telepathy/cdtpcontroller.cpp
@@ -21,15 +21,15 @@
  ** conditions contained in a signed written agreement between you and Nokia.
  **/
 
-#include <TelepathyQt4/Account>
-#include <TelepathyQt4/AccountPropertyFilter>
-#include <TelepathyQt4/AndFilter>
-#include <TelepathyQt4/NotFilter>
-#include <TelepathyQt4/AccountSet>
-#include <TelepathyQt4/AccountManager>
-#include <TelepathyQt4/PendingReady>
-#include <TelepathyQt4/ContactManager>
-#include <TelepathyQt4/PendingContacts>
+#include <TelepathyQt/Account>
+#include <TelepathyQt/AccountPropertyFilter>
+#include <TelepathyQt/AndFilter>
+#include <TelepathyQt/NotFilter>
+#include <TelepathyQt/AccountSet>
+#include <TelepathyQt/AccountManager>
+#include <TelepathyQt/PendingReady>
+#include <TelepathyQt/ContactManager>
+#include <TelepathyQt/PendingContacts>
 
 #include "buddymanagementadaptor.h"
 #include "cdtpcontroller.h"
--- plugins/telepathy/cdtpcontroller.h
+++ plugins/telepathy/cdtpcontroller.h
@@ -28,7 +28,7 @@
 #include "cdtpcontact.h"
 #include "cdtpstorage.h"
 
-#include <TelepathyQt4/Types>
+#include <TelepathyQt/Types>
 
 #include <QList>
 #include <QObject>
--- plugins/telepathy/cdtpplugin.cpp
+++ plugins/telepathy/cdtpplugin.cpp
@@ -21,7 +21,7 @@
  ** conditions contained in a signed written agreement between you and Nokia.
  **/
 
-#include <TelepathyQt4/Debug>
+#include <TelepathyQt/Debug>
 
 #include "cdtpcontroller.h"
 #include "cdtpplugin.h"
--- plugins/telepathy/cdtpstorage.cpp
+++ plugins/telepathy/cdtpstorage.cpp
@@ -23,10 +23,10 @@
 
 #include <tracker-sparql.h>
 
-#include <TelepathyQt4/AvatarData>
-#include <TelepathyQt4/ContactCapabilities>
-#include <TelepathyQt4/ContactManager>
-#include <TelepathyQt4/ConnectionCapabilities>
+#include <TelepathyQt/AvatarData>
+#include <TelepathyQt/ContactCapabilities>
+#include <TelepathyQt/ContactManager>
+#include <TelepathyQt/ConnectionCapabilities>
 #include <qtcontacts-tracker/phoneutils.h>
 #include <qtcontacts-tracker/garbagecollector.h>
 #include <ontologies.h>
@@ -685,19 +685,8 @@
 
 static void updateTimestamp(Insert &i, const Value &subject, 
UpdateTimestampMode mode = UntaggedSignalUpdate)
 {
-    const Value timestamp = literalTimeStamp();
-
-    Graph g(defaultGraph);
-
-    if (mode == TaggedSignalUpdate) {
-        g = Graph(privateGraph);
-        g.addPattern(subject, nie::contentLastModified::resource(), timestamp);
-        i.addData(g);
-
-        g = Graph(defaultGraph);
-    }
-
-    g.addPattern(subject, nie::contentLastModified::resource(), timestamp);
+    Graph g(mode == TaggedSignalUpdate ? privateGraph : defaultGraph);
+    g.addPattern(subject, nie::contentLastModified::resource(), 
literalTimeStamp());
     i.addData(g);
 }
 
--- plugins/telepathy/telepathy.pro
+++ plugins/telepathy/telepathy.pro
@@ -33,7 +33,7 @@
 }
 
 CONFIG += link_pkgconfig
-PKGCONFIG += TelepathyQt4 tracker-sparql-0.10
+PKGCONFIG += TelepathyQt4 tracker-sparql-0.14
 DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
 
 INCLUDEPATH += $$TOP_SOURCEDIR/src
--- plugins/telepathy/types.h
+++ plugins/telepathy/types.h
@@ -24,7 +24,7 @@
 #ifndef TYPES_H
 #define TYPES_H
 
-#include <TelepathyQt4/SharedPtr>
+#include <TelepathyQt/SharedPtr>
 
 class CDTpAccount;
 class CDTpContact;
--- tests/mktests.sh.in
+++ tests/mktests.sh.in
@@ -38,7 +38,7 @@
     test -f "$suite/$suite.skip" && continue
 
     if [ -f $suite/$suite-wrapper.sh ]; then
-        command="@PREFIX@/share/contactsd-tests/$suite/$suite-wrapper.sh"
+        command="/opt/tests/contactsd/$suite/$suite-wrapper.sh"
     else
         command="@BINDIR@/$suite/$suite"
     fi
--- tests/tests.pro
+++ tests/tests.pro
@@ -32,12 +32,12 @@
 testxml.depends = $$UNIT_TESTS
 
 install_testxml.files = $$testxml.target
-install_testxml.path = $$PREFIX/share/contactsd-tests
+install_testxml.path = /opt/tests/contactsd/test-definition/
 install_testxml.depends = $$testxml.target
 install_testxml.CONFIG = no_check_exist
 
 install_extrascripts.files = with-session-bus.sh session.conf
-install_extrascripts.path = $$PREFIX/share/contactsd-tests
+install_extrascripts.path = /opt/tests/contactsd/
 install_extrascripts.depends = $$UNIT_TESTS
 install_extrascripts.CONFIG = no_check_exist
 
--- tests/ut_birthdayplugin/test-birthday-plugin.cpp
+++ tests/ut_birthdayplugin/test-birthday-plugin.cpp
@@ -28,12 +28,14 @@
 #include <extendedstorage.h>
 #include <extendedcalendar.h>
 
-#include <MGConfDataStore>
+#include <MGConfItem>
 #include <MLocale>
 
 #include <QContactBirthday>
 #include <QContactName>
 
+using namespace ML10N;
+
 // A random ID, from plugins/birthday/cdbirthdaycalendar.cpp.
 const QLatin1String calNotebookId("b1376da7-5555-1111-2222-227549c4e570");
 
@@ -217,9 +219,8 @@
 
 void TestBirthdayPlugin::testLocaleChange()
 {
-    MGConfDataStore store(QLatin1String("/meegotouch/i18n"));
-
-    store.setValue(QLatin1String("language"), QLatin1String("en"));
+    MGConfItem store(QLatin1String("/meegotouch/i18n/language"));
+    store.set(QLatin1String("en"));
 
     // Leave the time to react to locale change
     loopWait(1000);
@@ -249,7 +250,7 @@
     QCOMPARE(storage->notebook(calNotebookId)->name(), cLocaleCalendarName);
 
     // Change locale and check name again.
-    store.setValue(QLatin1String("language"), QLatin1String("fi"));
+    store.set(QLatin1String("fi"));
 
     loopWait(calendarTimeout);
 
@@ -262,6 +263,62 @@
     QVERIFY2(storage->close(), "Error closing the calendar");
 }
 
+void TestBirthdayPlugin::testLeapYears_data()
+{
+    QTest::addColumn<QDate>("contactBirthDate");
+    QTest::newRow("leap-day") << QDate(2008, 2, 29);
+    QTest::newRow("regular-day") << QDate(2008, 2, 1);
+}
+
+void TestBirthdayPlugin::testLeapYears()
+{
+    const QString contactID = QUuid::createUuid().toString();
+    QFETCH(QDate, contactBirthDate);
+
+    // Add contact with birthday to tracker.
+    QContactName contactName;
+    contactName.setCustomLabel(contactID);
+    QContactBirthday contactBirthday;
+    contactBirthday.setDate(contactBirthDate);
+    QContact contact;
+    QVERIFY(contact.saveDetail(&contactName));
+    QVERIFY(contact.saveDetail(&contactBirthday));
+    QVERIFY(saveContact(contact));
+
+    // Wait until calendar event gets to calendar.
+    loopWait(calendarTimeout);
+
+    // Open calendar database.
+    mKCal::ExtendedCalendar::Ptr calendar =
+        mKCal::ExtendedCalendar::Ptr(new 
mKCal::ExtendedCalendar(KDateTime::Spec::LocalZone()));
+    mKCal::ExtendedStorage::Ptr storage =
+        mKCal::ExtendedCalendar::defaultStorage(calendar);
+
+    QVERIFY(storage->open());
+    QVERIFY(not storage->notebook(calNotebookId).isNull());
+
+    // Check calendar database for contact.
+    QVERIFY(storage->loadNotebookIncidences(calNotebookId));
+    const KCalCore::Event::List eventList = 
findCalendarEvents(calendar->events(), contact);
+    QCOMPARE(eventList.count(), 1);
+
+    const KCalCore::Event::Ptr event = eventList.first();
+    QCOMPARE(event->summary(), contactID);
+    QCOMPARE(event->dtStart().date(), contactBirthDate);
+    QCOMPARE(event->allDay(), true);
+
+    // Check number of recurrences and their values.
+    const KDateTime first(QDate(2000, 1, 1), QTime(), KDateTime::ClockTime);
+    const KDateTime last(QDate(2020, 12, 31), QTime(), KDateTime::ClockTime);
+    const KCalCore::DateTimeList instances = 
event->recurrence()->timesInInterval(first, last);
+
+    QCOMPARE(instances.length(), 13);
+
+    for(int i = 0; i < instances.length(); ++i) {
+        QCOMPARE(instances.at(i).date(), contactBirthDate.addYears(i));
+    }
+}
+
 void TestBirthdayPlugin::cleanupTestCase()
 {
 }
@@ -282,23 +339,34 @@
 int TestBirthdayPlugin::countCalendarEvents(const KCalCore::Event::List 
&eventList,
                                             const QContact &contact) const
 {
-    int found = 0;
-    Q_FOREACH(const QSharedPointer<KCalCore::Event> event, eventList) {
+    return findCalendarEvents(eventList, contact).count();
+}
+
+KCalCore::Event::List TestBirthdayPlugin::findCalendarEvents(const 
KCalCore::Event::List &eventList,
+                                                             const QContact 
&contact) const
+{
+    KCalCore::Event::List matches;
+
+    Q_FOREACH(const KCalCore::Event::Ptr event, eventList) {
         if(event->dtStart().date() == 
contact.detail<QContactBirthday>().date()) {
-            if(event->summary() == 
contact.detail<QContactDisplayLabel>().label()) {
-                found++;
+            if(event->summary() == contact.displayLabel()) {
+                matches += event;
             }
         }
     }
 
-    return found;
+    return matches;
 }
 
 bool TestBirthdayPlugin::saveContact(QContact &contact)
 {
-    mContactLocalIDs.insert(contact.localId());
+    const bool success = mManager->saveContact(&contact);
+
+    if (success) {
+        mContactLocalIDs.insert(contact.localId());
+    }
 
-    return mManager->saveContact(&contact);
+    return success;
 }
 
 CONTACTSD_TEST_MAIN(TestBirthdayPlugin)
--- tests/ut_birthdayplugin/test-birthday-plugin.h
+++ tests/ut_birthdayplugin/test-birthday-plugin.h
@@ -50,12 +50,17 @@
     void testChangeName();
     void testLocaleChange();
 
+    void testLeapYears_data();
+    void testLeapYears();
+
     void cleanupTestCase();
     void cleanup();
 
 private:
     int countCalendarEvents(const KCalCore::Event::List &eventList,
                             const QContact &contact) const;
+    KCalCore::Event::List findCalendarEvents(const KCalCore::Event::List 
&eventList,
+                                             const QContact &contact) const;
     bool saveContact(QContact &contact);
 
 private:
--- tests/ut_birthdayplugin/tests.pri
+++ tests/ut_birthdayplugin/tests.pri
@@ -22,7 +22,7 @@
 
 daemon.target = with-daemon.sh
 daemon.depends = $$PWD/with-daemon.sh.in
-daemon.path = $$PREFIX/share/contactsd-tests
+daemon.path = /opt/tests/contactsd
 daemon.commands = \
     sed -e \"s,@BINDIR@,$$BINDIR,g\" \
         -e \"s,@PLUGINDIR@,$$LIBDIR/contactsd-1.0/plugins,g\" \
@@ -30,16 +30,16 @@
 
 wrapper.target = ut_birthdayplugin-wrapper.sh
 wrapper.depends = $$PWD/ut_birthdayplugin-wrapper.sh.in
-wrapper.path = $$PREFIX/share/contactsd-tests/ut_birthdayplugin
+wrapper.path = /opt/tests/contactsd/ut_birthdayplugin
 wrapper.commands = \
-    sed -e \"s,@SCRIPTDIR@,$$PREFIX/share/contactsd-tests,g\" \
-        -e \"s,@OUT_SCRIPTDIR@,$$PREFIX/share/contactsd-tests,g\" \
+    sed -e \"s,@SCRIPTDIR@,/opt/tests/contactsd,g\" \
+        -e \"s,@OUT_SCRIPTDIR@,/opt/tests/contactsd,g\" \
         -e \"s,@BINDIR@,$$BINDIR,g\" \
         -e \"s,@WITH_DAEMON@,$$daemon.target,g\" \
     $< > $@ && chmod +x $@ || rm -f $@
 
 install_extrascripts.files = $$wrapper.target $$daemon.target
-install_extrascripts.path = $$PREFIX/share/contactsd-tests/ut_birthdayplugin
+install_extrascripts.path = /opt/tests/contactsd/ut_birthdayplugin
 install_extrascripts.depends = daemon wrapper
 install_extrascripts.CONFIG = no_check_exist
 
--- tests/ut_birthdayplugin/ut_birthdayplugin.pro
+++ tests/ut_birthdayplugin/ut_birthdayplugin.pro
@@ -21,13 +21,14 @@
 # conditions contained in a signed written agreement between you and Nokia.
 
 TARGET = ut_birthdayplugin
-target.path = $$BINDIR
+target.path = /opt/tests/contactsd
 
 include(check.pri)
 include(tests.pri)
 include(../common/test-common.pri)
 
-CONFIG += test qtsparql mobility mkcal meegotouch
+CONFIG += test qtsparql mobility mlocale mkcal link_pkgconfig
+PKGCONFIG += mlite
 
 QT -= gui
 QT += testlib
--- tests/ut_telepathyplugin/test-expectation.cpp
+++ tests/ut_telepathyplugin/test-expectation.cpp
@@ -203,7 +203,7 @@
     }
 
     if (mFlags & VerifyAlias) {
-        QString label = contact.detail<QContactDisplayLabel>().label();
+        QString label = contact.displayLabel();
         QCOMPARE(label, mAlias);
     }
 
--- tests/ut_telepathyplugin/test-expectation.h
+++ tests/ut_telepathyplugin/test-expectation.h
@@ -29,7 +29,7 @@
 #include <QContactManager>
 #include <QContact>
 
-#include <TelepathyQt4/SharedPtr>
+#include <TelepathyQt/SharedPtr>
 
 #include <telepathy-glib/telepathy-glib.h>
 #include "libtelepathy/contacts-conn.h"
--- tests/ut_telepathyplugin/test-telepathy-plugin.cpp
+++ tests/ut_telepathyplugin/test-telepathy-plugin.cpp
@@ -35,7 +35,7 @@
 
 #include <qtcontacts-tracker/contactmergerequest.h>
 
-#include <TelepathyQt4/Debug>
+#include <TelepathyQt/Debug>
 
 #include "libtelepathy/util.h"
 #include "libtelepathy/debug.h"
--- tests/ut_telepathyplugin/test-telepathy-plugin.h
+++ tests/ut_telepathyplugin/test-telepathy-plugin.h
@@ -32,7 +32,7 @@
 #include <QContactAbstractRequest>
 
 #include <telepathy-glib/telepathy-glib.h>
-#include <TelepathyQt4/Contact>
+#include <TelepathyQt/Contact>
 
 #include "libtelepathy/contacts-conn.h"
 #include "libtelepathy/contact-list-manager.h"
--- tests/ut_telepathyplugin/test.cpp
+++ tests/ut_telepathyplugin/test.cpp
@@ -4,12 +4,12 @@
 
 #include <QtCore/QTimer>
 
-#include <TelepathyQt4/Types>
-#include <TelepathyQt4/Debug>
-#include <TelepathyQt4/DBus>
-#include <TelepathyQt4/PendingVoid>
-#include <TelepathyQt4/SharedPtr>
-#include <TelepathyQt4/RefCounted>
+#include <TelepathyQt/Types>
+#include <TelepathyQt/Debug>
+#include <TelepathyQt/DBus>
+#include <TelepathyQt/PendingVoid>
+#include <TelepathyQt/SharedPtr>
+#include <TelepathyQt/RefCounted>
 
 using Tp::PendingOperation;
 using Tp::PendingVoid;
--- tests/ut_telepathyplugin/test.h
+++ tests/ut_telepathyplugin/test.h
@@ -2,9 +2,9 @@
 
 #include <QtTest>
 
-#include <TelepathyQt4/PendingOperation>
-#include <TelepathyQt4/PendingVariant>
-#include <TelepathyQt4/Constants>
+#include <TelepathyQt/PendingOperation>
+#include <TelepathyQt/PendingVariant>
+#include <TelepathyQt/Constants>
 
 namespace Tp
 {
--- tests/ut_telepathyplugin/tests.pri
+++ tests/ut_telepathyplugin/tests.pri
@@ -22,7 +22,7 @@
 
 daemon.target = with-daemon.sh
 daemon.depends = $$PWD/with-daemon.sh.in
-daemon.path = $$PREFIX/share/contactsd-tests
+daemon.path = /opt/tests/contactsd
 daemon.commands = \
     sed -e \"s,@BINDIR@,$$BINDIR,g\" \
         -e \"s,@PLUGINDIR@,$$LIBDIR/contactsd-1.0/plugins,g\" \
@@ -30,15 +30,15 @@
 
 wrapper.target = ut_telepathyplugin-wrapper.sh
 wrapper.depends = $$PWD/ut_telepathyplugin-wrapper.sh.in
-wrapper.path = $$PREFIX/share/contactsd-tests/ut_telepathyplugin
+wrapper.path = /opt/tests/contactsd/ut_telepathyplugin
 wrapper.commands = \
-    sed -e \"s,@SCRIPTDIR@,$$PREFIX/share/contactsd-tests,g\" \
+    sed -e \"s,@SCRIPTDIR@,/opt/tests/contactsd,g\" \
         -e \"s,@BINDIR@,$$BINDIR,g\" \
         -e \"s,@WITH_DAEMON@,$$daemon.target,g\" \
     $< > $@ && chmod +x $@ || rm -f $@
 
 install_extrascripts.files = $$wrapper.target $$daemon.target
-install_extrascripts.path = $$PREFIX/share/contactsd-tests/ut_telepathyplugin
+install_extrascripts.path = /opt/tests/contactsd/ut_telepathyplugin
 install_extrascripts.depends = daemon wrapper
 install_extrascripts.CONFIG = no_check_exist
 
--- tests/ut_telepathyplugin/ut_telepathyplugin.pro
+++ tests/ut_telepathyplugin/ut_telepathyplugin.pro
@@ -23,7 +23,7 @@
 PRE_TARGETDEPS += ../libtelepathy/libtelepathy.a
 
 TARGET = ut_telepathyplugin
-target.path = $$BINDIR
+target.path = /opt/tests/contactsd
 
 include(check.pri)
 include(tests.pri)

++++++ deleted files:
--- 0001-Fix-header-path-for-new-versions-of-telepathy-qt4.patch
--- 0001-Move-tests-according-to-Mer-packaging-guidelines.patch
--- 0001-Replace-meegotouch-with-mlite-and-mlocale-in-unit-te.patch
--- 0001-Use-mlocale-instead-of-meegotouch-for-birthday-plugi.patch
--- 0001-compile-against-tracker-0-14.patch



Reply via email to