Changeset View
Changeset View
Standalone View
Standalone View
resources/vcard/vcardresource.cpp
Show All 15 Lines | 1 | /* | |||
---|---|---|---|---|---|
16 | along with this library; see the file COPYING.LIB. If not, write to the | 16 | along with this library; see the file COPYING.LIB. If not, write to the | ||
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
18 | 02110-1301, USA. | 18 | 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #include "vcardresource.h" | 21 | #include "vcardresource.h" | ||
22 | #include "vcardsettingsadaptor.h" | 22 | #include "vcardsettingsadaptor.h" | ||
23 | 23 | | |||
24 | #include <KDBusConnectionPool> | | |||
25 | | ||||
26 | #include <KLocalizedString> | 24 | #include <KLocalizedString> | ||
27 | 25 | | |||
28 | #include <QDBusConnection> | 26 | #include <QDBusConnection> | ||
29 | 27 | | |||
30 | using namespace Akonadi; | 28 | using namespace Akonadi; | ||
31 | using namespace Akonadi_VCard_Resource; | 29 | using namespace Akonadi_VCard_Resource; | ||
32 | 30 | | |||
33 | VCardResource::VCardResource(const QString &id) | 31 | VCardResource::VCardResource(const QString &id) | ||
34 | : SingleFileResource<Settings>(id) | 32 | : SingleFileResource<Settings>(id) | ||
35 | { | 33 | { | ||
36 | setSupportedMimetypes(QStringList() << KContacts::Addressee::mimeType(), QStringLiteral("office-address-book")); | 34 | setSupportedMimetypes(QStringList() << KContacts::Addressee::mimeType(), QStringLiteral("office-address-book")); | ||
37 | 35 | | |||
38 | new VCardSettingsAdaptor(mSettings); | 36 | new VCardSettingsAdaptor(mSettings); | ||
39 | KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/Settings"), | 37 | QDBusConnection::sessionBus().registerObject(QStringLiteral("/Settings"), | ||
40 | mSettings, QDBusConnection::ExportAdaptors); | 38 | mSettings, QDBusConnection::ExportAdaptors); | ||
41 | } | 39 | } | ||
42 | 40 | | |||
43 | VCardResource::~VCardResource() | 41 | VCardResource::~VCardResource() | ||
44 | { | 42 | { | ||
45 | mAddressees.clear(); | 43 | mAddressees.clear(); | ||
46 | } | 44 | } | ||
47 | 45 | | |||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |