diff -ru digikam.orig/CMakeLists.txt digikam/CMakeLists.txt
--- digikam.orig/CMakeLists.txt	2009-07-19 14:31:04.000000000 +0200
+++ digikam/CMakeLists.txt	2009-07-19 15:12:48.000000000 +0200
@@ -81,12 +81,13 @@
     SET(KEXIV2_FOR_DIGIKAM TRUE)
 ENDIF(NOT WIN32)
 
+SET(NEPOMUK_LIBRARIES "")
+
 # ==================================================================================================
 # Optional depencies
 
 MACRO_OPTIONAL_FIND_PACKAGE(KdepimLibs)
 MACRO_BOOL_TO_01(KDEPIMLIBS_FOUND HAVE_KDEPIMLIBS)
-FIND_PACKAGE(Nepomuk REQUIRED)
 
 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
 
@@ -378,7 +379,6 @@
                         ${QT_INCLUDES}
                         ${GPHOTO2_INCLUDE_DIRS}
                         ${SOPRANO_INCLUDE_DIR}
-                        ${NEPOMUK_INCLUDE_DIR}
                         ${CMAKE_CURRENT_SOURCE_DIR}/digikam
                         ${CMAKE_CURRENT_BINARY_DIR}/digikam
                        )
diff -ru digikam.orig/libs/widgets/metadata/metadatapanel.cpp digikam/libs/widgets/metadata/metadatapanel.cpp
--- digikam.orig/libs/widgets/metadata/metadatapanel.cpp	2009-07-19 14:30:40.000000000 +0200
+++ digikam/libs/widgets/metadata/metadatapanel.cpp	2009-07-19 15:26:11.000000000 +0200
@@ -250,60 +250,8 @@
 #endif
 }
 
-void MetadataPanel::slotTabChanged(int index)
+void MetadataPanel::slotTabChanged(int)
 {
-    DMetadata meta;
-    kapp->setOverrideCursor(Qt::WaitCursor);
-    KSharedConfig::Ptr config = KGlobal::config();
-    KConfigGroup group        = config->group("Image Properties SideBar");
-
-    switch(index)
-    {
-#if KEXIV2_VERSION >= 0x010000
-        case 1:
-        {
-            if (!d->exifViewerConfig->itemsCount())
-            {
-                d->exifViewerConfig->setTagsMap(meta.getStdExifTagsList());
-                d->exifViewerConfig->setcheckedTagsList(group.readEntry("EXIF Tags Filter", d->exifViewerConfig->defaultFilter()));
-            }
-            break;
-        }
-
-        case 2:
-        {
-            if (!d->mknoteViewerConfig->itemsCount())
-            {
-                d->mknoteViewerConfig->setTagsMap(meta.getMakernoteTagsList());
-                d->mknoteViewerConfig->setcheckedTagsList(group.readEntry("MAKERNOTE Tags Filter", d->mknoteViewerConfig->defaultFilter()));
-            }
-            break;
-        }
-
-        case 3:
-        {
-            if (!d->iptcViewerConfig->itemsCount())
-            {
-                d->iptcViewerConfig->setTagsMap(meta.getIptcTagsList());
-                d->iptcViewerConfig->setcheckedTagsList(group.readEntry("IPTC Tags Filter", d->iptcViewerConfig->defaultFilter()));
-            }
-            break;
-        }
-
-        case 4:
-        {
-            if (!d->xmpViewerConfig->itemsCount())
-            {
-                d->xmpViewerConfig->setTagsMap(meta.getXmpTagsList());
-                d->xmpViewerConfig->setcheckedTagsList(group.readEntry("XMP Tags Filter", d->xmpViewerConfig->defaultFilter()));
-            }
-            break;
-        }
-#endif
-        default:
-            break;
-    }
-    kapp->restoreOverrideCursor();
 }
 
 }  // namespace Digikam
diff -ru digikam.orig/libs/widgets/metadata/metadataselector.cpp digikam/libs/widgets/metadata/metadataselector.cpp
--- digikam.orig/libs/widgets/metadata/metadataselector.cpp	2009-07-19 14:30:40.000000000 +0200
+++ digikam/libs/widgets/metadata/metadataselector.cpp	2009-07-19 15:26:46.000000000 +0200
@@ -104,44 +104,6 @@
 {
 }
 
-#if KEXIV2_VERSION >= 0x010000
-
-void MetadataSelector::setTagsMap(const DMetadata::TagsMap& map)
-{
-    clear();
-
-    uint               subItems = 0;
-    QString            ifDItemName, currentIfDName;
-    MdKeyListViewItem *parentifDItem = 0;
-
-    for (DMetadata::TagsMap::const_iterator it = map.constBegin(); it != map.constEnd(); ++it)
-    {
-        // We checking if we have changed of ifDName
-        currentIfDName = it.key().section('.', 1, 1);
-
-        if ( currentIfDName != ifDItemName )
-        {
-            ifDItemName = currentIfDName;
-
-            // Check if the current IfD have any items. If no remove it before to toggle to the next IfD.
-            if ( subItems == 0 && parentifDItem)
-                delete parentifDItem;
-
-            parentifDItem = new MdKeyListViewItem(this, currentIfDName);
-            subItems = 0;
-        }
-
-        // We ignore all unknown tags if necessary.
-        if (!it.key().section('.', 2, 2).startsWith(QLatin1String("0x")))
-        {
-            new MetadataSelectorItem(parentifDItem, it.key(), it.value()[0], it.value()[2]);
-            ++subItems;
-        }
-    }
-}
-
-#endif
-
 void MetadataSelector::setcheckedTagsList(const QStringList& list)
 {
     QTreeWidgetItemIterator it(this);
@@ -260,15 +222,6 @@
     delete d;
 }
 
-#if KEXIV2_VERSION >= 0x010000
-
-void MetadataSelectorView::setTagsMap(const DMetadata::TagsMap& map)
-{
-    d->selector->setTagsMap(map);
-}
-
-#endif
-
 void MetadataSelectorView::setcheckedTagsList(const QStringList& list)
 {
     d->selector->setcheckedTagsList(list);
diff -ru digikam.orig/libs/widgets/metadata/metadataselector.h digikam/libs/widgets/metadata/metadataselector.h
--- digikam.orig/libs/widgets/metadata/metadataselector.h	2009-07-19 14:30:40.000000000 +0200
+++ digikam/libs/widgets/metadata/metadataselector.h	2009-07-19 15:21:28.000000000 +0200
@@ -72,10 +72,6 @@
     MetadataSelector(QWidget* parent);
     virtual ~MetadataSelector();
 
-#if KEXIV2_VERSION >= 0x010000
-    void setTagsMap(const DMetadata::TagsMap& map);
-#endif
-
     void setcheckedTagsList(const QStringList& list);
     QStringList checkedTagsList();
 
@@ -97,11 +93,6 @@
     virtual ~MetadataSelectorView();
 
     int itemsCount() const;
-
-#if KEXIV2_VERSION >= 0x010000
-    void setTagsMap(const DMetadata::TagsMap& map);
-#endif
-
     void setcheckedTagsList(const QStringList& list);
 
     void setDefaultFilter(const char** list);
diff -ru digikam.orig/utilities/imageeditor/rawimport/rawsettingsbox.cpp digikam/utilities/imageeditor/rawimport/rawsettingsbox.cpp
--- digikam.orig/utilities/imageeditor/rawimport/rawsettingsbox.cpp	2009-07-19 14:30:58.000000000 +0200
+++ digikam/utilities/imageeditor/rawimport/rawsettingsbox.cpp	2009-07-19 15:29:20.000000000 +0200
@@ -473,10 +473,7 @@
     d->tabView->setCurrentIndex(group.readEntry("Settings Page", 0));
 #if KDCRAW_VERSION <= 0x000500
     d->decodingSettingsBox->setCurrentIndex(group.readEntry("Decoding Settings Tab", (int)DcrawSettingsWidget::DEMOSAICING));
-#else
-    d->decodingSettingsBox->readSettings();
 #endif
-    d->postProcessSettingsBox->readSettings();
 
 //    slotChannelChanged();
 //    slotScaleChanged(histogramScale());
diff -ru digikam.orig/utilities/nepomuk/digikamnepomukservice.cpp digikam/utilities/nepomuk/digikamnepomukservice.cpp
--- digikam.orig/utilities/nepomuk/digikamnepomukservice.cpp	2009-07-19 14:31:03.000000000 +0200
+++ digikam/utilities/nepomuk/digikamnepomukservice.cpp	2009-07-19 15:36:06.000000000 +0200
@@ -1,891 +0,0 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2009-06-19
- * Description : Service to sync digikam and nepomuk storages
- *
- * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "digikamnepomukservice.h"
-#include "digikamnepomukservice.moc"
-
-// Qt includes
-
-#include <QDBusConnection>
-#include <QDBusConnectionInterface>
-#include <QDBusInterface>
-#include <QThread>
-#include <QTimer>
-
-// KDE includes
-
-#include <kcomponentdata.h>
-#include <kconfiggroup.h>
-#include <kdebug.h>
-#include <kio/job.h>
-#include <kpluginfactory.h>
-#include <kurl.h>
-#include <Nepomuk/Resource>
-#include <Nepomuk/ResourceManager>
-#include <Nepomuk/Service>
-#include <Nepomuk/Tag>
-#include <Nepomuk/Variant>
-#include <Soprano/Model>
-#include <Soprano/QueryResultIterator>
-#include <Soprano/Statement>
-#include <Soprano/Vocabulary/NAO>
-#include <Soprano/Vocabulary/Xesam>
-#include <Soprano/Vocabulary/XMLSchema>
-
-// Local includes
-
-// QList<int> metatype defined in Nepomuk/Variant
-#define DATABASECHANGESETS_H_NO_QLIST_METATYPE_DECLARATION
-#include "albumdb.h"
-#include "collectionlocation.h"
-#include "collectionmanager.h"
-#include "databaseaccess.h"
-#include "databasechangesets.h"
-#include "databaseparameters.h"
-#include "databasetransaction.h"
-#include "databasewatch.h"
-#include "imageinfo.h"
-#include "imagelister.h"
-
-namespace Digikam
-{
-
-enum WatchedNepomukProperty
-{
-    NaoRating,
-    NaoDescription,
-    NaoTags
-};
-
-class NepomukServicePriv
-{
-public:
-
-    NepomukServicePriv()
-    {
-        syncToDigikam        = false;
-        syncToNepomuk        = false;
-        isConnected          = false;
-        nepomukChangeTimer   = 0;
-        cleanIgnoreListTimer = 0;
-        fullSyncJobs         = 0;
-        changingDB           = false;
-        changingNepomuk      = false;
-    }
-
-    bool        syncToDigikam;
-    bool        syncToNepomuk;
-    bool        isConnected;
-    QTimer     *nepomukChangeTimer;
-    QTimer     *cleanIgnoreListTimer;
-    int         fullSyncJobs;
-
-    bool        changingDB;
-    bool        changingNepomuk;
-
-    TagInfo::List tagList;
-
-    QMultiHash<QUrl, WatchedNepomukProperty> ignoreUris;
-
-    bool checkIgnoreUris(const QUrl &url, WatchedNepomukProperty property)
-    {
-        QHash<QUrl, WatchedNepomukProperty>::iterator it;
-        it = ignoreUris.find(url, property);
-        if (it != ignoreUris.end())
-        {
-            ignoreUris.erase(it);
-            return true;
-        }
-        return false;
-    }
-
-    void addIgnoreUri(const QUrl &url, WatchedNepomukProperty property)
-    {
-        //if (!ignoreUris.contains(url, property))
-        ignoreUris.insert(url, property);
-
-        // always restart timer
-        cleanIgnoreListTimer->start();
-    }
-
-    TagInfo tagInfo(int tagId)
-    {
-        foreach (const TagInfo &info, tagList)
-            if (info.id == tagId)
-                return info;
-        return TagInfo();
-    }
-
-    void triggerSyncToDigikam()
-    {
-        if (!nepomukChangeTimer->isActive())
-            nepomukChangeTimer->start();
-    }
-
-};
-
-class ChangingDB
-{
-public:
-
-    ChangingDB(NepomukServicePriv *d)
-        : d(d)
-    {
-        d->changingDB = true;
-    }
-    ~ChangingDB()
-    {
-        d->changingDB = false;
-    }
-    NepomukServicePriv* const d;
-};
-
-class ChangingNepomuk
-{
-public:
-
-    ChangingNepomuk(NepomukServicePriv *d)
-        : d(d)
-    {
-        d->changingNepomuk = true;
-    }
-    ~ChangingNepomuk()
-    {
-        d->changingNepomuk = false;
-    }
-    NepomukServicePriv* const d;
-};
-
-
-NepomukService::NepomukService(QObject* parent, const QVariantList&)
-            : Nepomuk::Service(parent),
-              d(new NepomukServicePriv)
-{
-    Nepomuk::ResourceManager::instance()->init();
-
-    d->nepomukChangeTimer = new QTimer(this);
-    d->nepomukChangeTimer->setSingleShot(true);
-    d->nepomukChangeTimer->setInterval(5000);
-
-    connect(d->nepomukChangeTimer, SIGNAL(timeout()),
-             this, SLOT(syncNepomukToDigikam()));
-
-    d->cleanIgnoreListTimer = new QTimer(this);
-    d->cleanIgnoreListTimer->setSingleShot(true);
-    d->cleanIgnoreListTimer->setInterval(5000);
-
-    connect(d->cleanIgnoreListTimer, SIGNAL(timeout()),
-             this, SLOT(cleanIgnoreList()));
-
-    readConfig();
-}
-
-NepomukService::~NepomukService()
-{
-}
-
-void NepomukService::readConfig()
-{
-    // Reads from digikam config what this service should do
-
-    KSharedConfig::Ptr config = digikamConfig();
-    KConfigGroup group = config->group("Nepomuk Settings");
-    // default to false here, regardless of default settings in digikam
-    enableSyncToDigikam(group.readEntry("Sync Nepomuk to Digikam", false));
-    enableSyncToNepomuk(group.readEntry("Sync Digikam to Nepomuk", false));
-}
-
-void NepomukService::enableSyncToDigikam(bool syncToDigikam)
-{
-    // Controls syncing Nepomuk -> Digikam.
-    // Called from readConfig or via DBus (from DigikamApp)
-
-    kDebug(50003) << "Sync to digikam enabled: " << syncToDigikam;
-    if (d->syncToDigikam == syncToDigikam)
-        return;
-    d->syncToDigikam = syncToDigikam;
-
-    if (!d->isConnected)
-        connectToDatabase();
-
-    if (!d->isConnected)
-        return;
-
-    if (d->syncToDigikam)
-    {
-        connect(mainModel(), SIGNAL(statementAdded(const Soprano::Statement&)),
-                 this, SLOT(slotStatementAdded(const Soprano::Statement&)));
-
-        connect(mainModel(), SIGNAL(statementRemoved(const Soprano::Statement&)),
-                 this, SLOT(slotStatementRemoved(const Soprano::Statement&)));
-    }
-    else
-    {
-        disconnect(mainModel(), SIGNAL(statementAdded(const Soprano::Statement&)),
-                    this, SLOT(slotStatementAdded(const Soprano::Statement&)));
-
-        disconnect(mainModel(), SIGNAL(statementRemoved(const Soprano::Statement&)),
-                    this, SLOT(slotStatementRemoved(const Soprano::Statement&)));
-    }
-
-    if (lastSyncToDigikam().isNull())
-        d->triggerSyncToDigikam();
-}
-
-void NepomukService::enableSyncToNepomuk(bool syncToNepomuk)
-{
-     // Controls syncing Digikam -> Nepomuk.
-    // Called from readConfig or via DBus (from DigikamApp)
-
-    kDebug(50003) << "Sync to nepomuk enabled:" << syncToNepomuk;
-    if (d->syncToNepomuk == syncToNepomuk)
-        return;
-    d->syncToNepomuk = syncToNepomuk;
-
-    if (!d->isConnected)
-        connectToDatabase();
-
-    if (!d->isConnected)
-        return;
-
-    if (d->syncToNepomuk)
-    {
-        connect(DatabaseAccess::databaseWatch(), SIGNAL(imageChange(const ImageChangeset &)),
-                this, SLOT(slotImageChange(const ImageChangeset &)));
-
-        connect(DatabaseAccess::databaseWatch(), SIGNAL(imageTagChange(const ImageTagChangeset &)),
-                this, SLOT(slotImageTagChange(const ImageTagChangeset &)));
-
-        connect(DatabaseAccess::databaseWatch(), SIGNAL(tagChange(const TagChangeset &)),
-                this, SLOT(slotTagChange(const TagChangeset &)));
-
-        // initial pushing to Nepomuk?
-        if (!hasSyncToNepomuk())
-            QTimer::singleShot(1000, this, SLOT(fullSyncDigikamToNepomuk()));
-    }
-    else
-    {
-        disconnect(DatabaseAccess::databaseWatch(), SIGNAL(imageChange(const ImageChangeset &)),
-                   this, SLOT(slotImageChange(const ImageChangeset &)));
-
-        disconnect(DatabaseAccess::databaseWatch(), SIGNAL(imageTagChange(const ImageTagChangeset &)),
-                   this, SLOT(slotImageTagChange(const ImageTagChangeset &)));
-
-        disconnect(DatabaseAccess::databaseWatch(), SIGNAL(tagChange(const TagChangeset &)),
-                   this, SLOT(slotTagChange(const TagChangeset &)));
-    }
-}
-
-void NepomukService::databaseChanged()
-{
-    // Called via DBus
-    connectToDatabase();
-}
-
-void NepomukService::connectToDatabase()
-{
-    // (Re-)connects to the database
-
-    d->isConnected = false;
-    d->tagList.clear();
-
-    DatabaseParameters params = databaseParameters();
-    if (params.isValid())
-    {
-        DatabaseAccess::setParameters(params, DatabaseAccess::MainApplication);
-
-        d->isConnected = DatabaseAccess::checkReadyForUse();
-        if (!d->isConnected)
-        {
-            QString errorMsg = DatabaseAccess().lastError();
-            kDebug(50003) << "Failed to initialize database" << params.databaseName;
-            return;
-        }
-    }
-}
-
-// ------------------- Sync Digikam -> Nepomuk  ------------------------
-
-void NepomukService::slotImageChange(const ImageChangeset& changeset)
-{
-    // Receives signals (via DatabaseWatch via DBus) about changes in application
-
-    if (d->changingDB)
-        return;
-
-    DatabaseFields::Set changes = changeset.changes();
-    int settings = 0;
-    if (changes & DatabaseFields::Rating)
-        settings |= SyncRating | SyncHasNoRating;
-    if (changes & DatabaseFields::Comment)
-        settings |= SyncComment;
-    if (settings)
-    {
-        syncToNepomuk(changeset.ids(), (SyncToNepomukSettings)settings);
-    }
-}
-
-void NepomukService::slotImageTagChange(const ImageTagChangeset& changeset)
-{
-    // Receives signals (via DatabaseWatch via DBus) about changes in application
-
-    if (d->changingDB)
-        return;
-
-    switch (changeset.operation())
-    {
-        case ImageTagChangeset::Added:
-            syncTagsToNepomuk(changeset.ids(), changeset.tags(), true);
-            break;
-        case ImageTagChangeset::Removed:
-        case ImageTagChangeset::RemovedAll:
-            syncTagsToNepomuk(changeset.ids(), changeset.tags(), false);
-            break;
-        default:
-            break;
-    }
-}
-
-void NepomukService::slotTagChange(const TagChangeset&)
-{
-    d->tagList.clear();
-}
-
-void NepomukService::fullSyncDigikamToNepomuk()
-{
-    // List album root albums of all available collections recursively
-    QList<CollectionLocation> collections = CollectionManager::instance()->allAvailableLocations();
-    foreach (const CollectionLocation &location, collections)
-    {
-        DatabaseUrl url = DatabaseUrl::fromAlbumAndName(QString(), "/", location.albumRootPath(), location.id());
-        KIO::Job *job = ImageLister::startListJob(url);
-        job->addMetaData("listAlbumsRecursively", "true");
-
-        connect(job, SIGNAL(result(KJob*)),
-                this, SLOT(slotFullSyncJobResult(KJob*)));
-
-        connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)),
-                this, SLOT(slotFullSyncJobData(KIO::Job*, const QByteArray&)));
-
-        d->fullSyncJobs++;
-    }
-}
-
-void NepomukService::slotFullSyncJobResult(KJob *job)
-{
-    Q_UNUSED(job);
-    // when initial full sync is done
-    if ( (--d->fullSyncJobs) == 0)
-        markAsSyncedToNepomuk();
-}
-
-void NepomukService::slotFullSyncJobData(KIO::Job*, const QByteArray& data)
-{
-    if (data.isEmpty())
-        return;
-
-    QList<ImageInfo> infos;
-
-    QByteArray tmp(data);
-    QDataStream ds(&tmp, QIODevice::ReadOnly);
-
-    while (!ds.atEnd())
-    {
-        ImageListerRecord record;
-        ds >> record;
-
-        infos << ImageInfo(record);
-    }
-
-    syncToNepomuk(infos, SyncToNepomukSettings(SyncRating | SyncComment)); // do _not_ sync no rating
-    pushTagsToNepomuk(infos);
-}
-
-static int nepomukToDigikamRating(int nepomukRating)
-{
-    // Map [0,10] -> [-1,5]
-    if (nepomukRating == 0)
-        return -1;
-
-    if (nepomukRating % 2)
-        return (nepomukRating + 1) / 2;
-    else
-        return nepomukRating / 2;
-}
-
-static int digikamToNepomukRating(int digikamRating)
-{
-    // Map [-1, 5] -> [0, 10]: 1->2, 2->4, 3->6, 4->8, 5->10 so that there are "full" and not half stars in dolphin
-    if (digikamRating == -1)
-        return 0;
-    return 2*digikamRating;
-}
-
-void NepomukService::syncToNepomuk(const QList<qlonglong> &imageIds, SyncToNepomukSettings syncSettings)
-{
-    QList<ImageInfo> infos;
-    foreach (qlonglong imageid, imageIds)
-    {
-        ImageInfo info(imageid);
-        if (!info.isNull())
-            infos << info;
-    }
-    syncToNepomuk(infos, syncSettings);
-}
-
-void NepomukService::syncToNepomuk(const QList<ImageInfo> &infos, SyncToNepomukSettings syncSettings)
-{
-    foreach (const ImageInfo &info, infos)
-    {
-        ChangingNepomuk changing(d);
-
-        Nepomuk::Resource res(info.fileUrl(), Soprano::Vocabulary::Xesam::File() );
-
-        if (syncSettings & SyncRating)
-        {
-            int rating = info.rating();
-            if (rating != -1 || syncSettings & SyncHasNoRating)
-            {
-                //kDebug(50003) << "Setting rating" << info.rating() << res.resourceUri() << res.isValid();
-                res.setRating(digikamToNepomukRating(info.rating()));
-                d->addIgnoreUri(res.resourceUri(), NaoRating);
-            }
-        }
-
-        if (syncSettings & SyncComment)
-        {
-            QString comment = info.comment();
-            if (!comment.isEmpty())
-            {
-                //kDebug(50003) << "Setting comment" << info.comment() << res.resourceUri() << res.isValid();
-                res.setDescription(info.comment());
-                d->addIgnoreUri(res.resourceUri(), NaoDescription);
-            }
-        }
-    }
-}
-
-// For now d->tagList is enough. If we need hierarchy information,
-// we need to move the core of AlbumManager to libdigikamdatabase
-
-static Nepomuk::Tag nepomukForDigikamTag(const TagInfo &info)
-{
-    if (info.id)
-    {
-        Nepomuk::Tag tag(info.name);
-        if (info.icon.isNull())
-        {
-            // Don't think we can use actual large files for tag icon
-            /*
-            // album image icon
-            QString albumRootPath = CollectionManager::instance()->albumRootPath(info.iconAlbumRootId);
-            album->m_icon         = albumRootPath + info.iconRelativePath;
-            */
-        }
-        else
-        {
-            tag.addSymbol(info.icon);
-        }
-        return tag;
-    }
-    return Nepomuk::Tag();
-}
-
-void NepomukService::syncTagsToNepomuk(const QList<qlonglong> &imageIds, const QList<int> &tagIds, bool addOrRemove)
-{
-    checkTagList();
-    foreach (int tagId, tagIds)
-    {
-        ChangingNepomuk changing(d);
-        Nepomuk::Tag tag = nepomukForDigikamTag(d->tagInfo(tagId));
-        if (tag.isValid())
-        {
-            foreach (qlonglong imageId, imageIds)
-            {
-                ImageInfo info(imageId);
-                if (!info.isNull())
-                {
-                    Nepomuk::Resource res(info.fileUrl(), Soprano::Vocabulary::Xesam::File());
-
-                    if (addOrRemove)
-                        res.addTag(tag);
-                    else
-                        res.removeProperty(Soprano::Vocabulary::NAO::hasTag(), tag);
-
-                    d->addIgnoreUri(res.resourceUri(), NaoTags);
-                }
-            }
-        }
-    }
-}
-
-void NepomukService::pushTagsToNepomuk(const QList<ImageInfo> &imageInfos)
-{
-    checkTagList();
-    foreach (const ImageInfo &info, imageInfos)
-    {
-        ChangingNepomuk changing(d);
-        if (!info.isNull())
-        {
-            foreach (int tagId, info.tagIds())
-            {
-                Nepomuk::Tag tag = nepomukForDigikamTag(d->tagInfo(tagId));
-                if (tag.isValid())
-                {
-                    Nepomuk::Resource res(info.fileUrl(), Soprano::Vocabulary::Xesam::File());
-
-                    res.addTag(tag);
-
-                    d->addIgnoreUri(res.resourceUri(), NaoTags);
-                }
-            }
-        }
-    }
-}
-
-// ------------------- Sync Nepomuk -> Digikam ------------------------
-
-void NepomukService::slotStatementAdded(const Soprano::Statement& statement)
-{
-
-    if (d->changingNepomuk) // no effect currently
-        return;
-
-    Soprano::Node subject = statement.subject();
-    Soprano::Node predicate = statement.predicate();
-    if (predicate == Soprano::Vocabulary::NAO::numericRating())
-    {
-        if (d->checkIgnoreUris(subject.uri(), NaoRating))
-            return;
-        //kDebug(50003) << "Changed rating" << statement.subject().toN3() << statement.object().toN3() << d->changingNepomuk;
-        d->triggerSyncToDigikam();
-    }
-    else if (predicate == Soprano::Vocabulary::NAO::description())
-    {
-        if (d->checkIgnoreUris(subject.uri(), NaoDescription))
-            return;
-        //kDebug(50003) << "Changed comment" << statement.subject().toN3() << statement.object().toN3() << d->changingNepomuk;
-        d->triggerSyncToDigikam();
-    }
-    else if (predicate == Soprano::Vocabulary::NAO::Tag())
-    {
-        if (d->checkIgnoreUris(subject.uri(), NaoTags))
-            return;
-        //kDebug(50003) << "Changed tag" << statement.subject().toN3() << statement.object().toN3() << d->changingNepomuk;
-        d->triggerSyncToDigikam();
-    }
-}
-
-void NepomukService::slotStatementRemoved(const Soprano::Statement& statement)
-{
-    Q_UNUSED(statement);
-}
-
-void NepomukService::cleanIgnoreList()
-{
-    d->ignoreUris.clear();
-}
-
-static QString nepomukChangeQuery(const QString &predicate, const QDateTime &dateTime)
-{
-    return  QString("PREFIX nao: <%1> "
-                    "PREFIX xls: <%2> "
-                    "PREFIX xesam: <%3> "
-                    "SELECT DISTINCT ?path ?value "
-                    " WHERE { GRAPH ?g { ?r %4 ?value . } . "
-                    " ?r xesam:url ?path ."
-                    " ?g nao:created ?t . "
-                    " FILTER ( ?t > \"%5\"^^xls:dateTime ) . } ")
-                    .arg(Soprano::Vocabulary::NAO::naoNamespace().toString())
-                    .arg(Soprano::Vocabulary::XMLSchema::xsdNamespace().toString())
-                    .arg(Soprano::Vocabulary::Xesam::xesamNamespace().toString())
-                    .arg(predicate)
-                    .arg(Soprano::LiteralValue(dateTime).toString());
-    /*
-    More elegant, for Soprano 2.2.65
-                            " FILTER ( ?t > %2 ) . } ")
-                            .arg(Soprano::Node::literalToN3(lastSyncDate));
-
-                            .arg(Soprano::Node::resourceToN3(Soprano::Vocabulary::Xesam::url())
-    */
-}
-
-void NepomukService::syncNepomukToDigikam()
-{
-    // wait until digikam -> nepomuk initial sync, if any, has finished
-    if (d->fullSyncJobs)
-        d->triggerSyncToDigikam();
-
-    QDateTime lastSyncDate = lastSyncToDigikam();
-    if (!lastSyncDate.isValid())
-        lastSyncDate = QDateTime::fromTime_t(0);
-
-    QString query;
-    KUrl::List fileUrls;
-    KUrl fileUrl;
-    Soprano::QueryResultIterator it;
-    QString pathBinding("path"), valueBinding("value");
-
-    query = nepomukChangeQuery("nao:numericRating", lastSyncDate);
-    it = mainModel()->executeQuery(query, Soprano::Query::QueryLanguageSparql);
-    QList<int> ratings;
-    int rating;
-    while( it.next() )
-    {
-        fileUrl = KUrl(it.binding(pathBinding).uri());
-        rating = it.binding(valueBinding).literal().toInt();
-        if (!fileUrl.isEmpty() && rating >= 0 && rating <= 10)
-        {
-            fileUrls << fileUrl;
-            ratings << rating;
-        }
-    }
-    syncRatingToDigikam(fileUrls, ratings);
-
-    fileUrls.clear();
-    query = nepomukChangeQuery("nao:description", lastSyncDate);
-    it = mainModel()->executeQuery(query, Soprano::Query::QueryLanguageSparql);
-    QList<QString> comments;
-    QString comment;
-    while( it.next() )
-    {
-        fileUrl = KUrl(it.binding(pathBinding).uri());
-        comment = it.binding(valueBinding).literal().toString();
-        if (!fileUrl.isEmpty())
-        {
-            fileUrls << fileUrl;
-            comments << comment;
-        }
-    }
-    syncCommentToDigikam(fileUrls, comments);
-
-    fileUrls.clear();
-    query = nepomukChangeQuery("nao:hasTag", lastSyncDate);
-    it = mainModel()->executeQuery(query, Soprano::Query::QueryLanguageSparql);
-    QList<QUrl> tags;
-    QUrl tag;
-    while( it.next() )
-    {
-        fileUrl = KUrl(it.binding(pathBinding).uri());
-        tag = it.binding(valueBinding).uri();
-        if (!fileUrl.isEmpty())
-        {
-            fileUrls << fileUrl;
-            tags << tag;
-        }
-    }
-    syncTagsToDigikam(fileUrls, tags);
-
-    // we mark this regardless of having changed anything
-    markAsSyncedToDigikam();
-}
-
-
-void NepomukService::syncRatingToDigikam(const KUrl::List &fileUrls, const QList<int> &ratings)
-{
-    if (fileUrls.isEmpty())
-        return;
-
-    QList<ImageInfo> infos;
-    QList<int> ratingsForInfos;
-    const int size = fileUrls.size();
-    for (int i=0; i<size; i++)
-    {
-        // If the path is not in digikam collections, info will be null.
-        // It does the same check first that we would be doing here
-        ImageInfo info(fileUrls[i]);
-        if (!info.isNull())
-        {
-            infos << info;
-            ratingsForInfos << nepomukToDigikamRating(ratings[i]);
-        }
-    }
-    if (!infos.isEmpty())
-    {
-        ChangingDB changing(d);
-
-        DatabaseAccess access;
-        DatabaseTransaction transaction(&access);
-        const int infosSize = infos.size();
-        for (int i=0; i<infosSize; i++)
-        {
-            infos[i].setRating(ratingsForInfos[i]);
-        }
-    }
-}
-
-void NepomukService::syncCommentToDigikam(const KUrl::List &fileUrls, const QStringList &comments)
-{
-    if (fileUrls.isEmpty())
-        return;
-
-    QList<ImageInfo> infos;
-    QList<QString> commentsForInfos;
-    const int size = fileUrls.size();
-    for (int i=0; i<size; i++)
-    {
-        // If the path is not in digikam collections, info will be null.
-        // It does the same check first that we would be doing here
-        ImageInfo info(fileUrls[i]);
-        if (!info.isNull())
-        {
-            infos << info;
-            commentsForInfos << comments[i];
-        }
-    }
-    if (!infos.isEmpty())
-    {
-        ChangingDB changing(d);
-
-        DatabaseAccess access;
-        DatabaseTransaction transaction(&access);
-        const int infosSize = infos.size();
-        for (int i=0; i<infosSize; i++)
-        {
-            DatabaseAccess access;
-            ImageComments comments = infos[i].imageComments(access);
-            comments.addComment(commentsForInfos[i]);
-        }
-    }
-}
-
-void NepomukService::syncTagsToDigikam(const KUrl::List &fileUrls, const QList<QUrl> &tags)
-{
-    Q_UNUSED(tags);
-
-    if (fileUrls.isEmpty())
-        return;
-
-    //TODO. Caveat: add + remove!
-    /*
-    QList<ImageInfo> infos;
-    QList<QString> commentsForInfos;
-    const int size = filePaths.size();
-    for (int i=0; i<size; i++)
-    {
-        // If the path is not in digikam collections, info will be null.
-        // It does the same check first that we would be doing here
-        ImageInfo info(filePaths[i]);
-        if (!info.isNull())
-        {
-            infos << info;
-            commentsForInfos << comments[i];
-        }
-    }
-    if (!infos.isEmpty())
-    {
-        DatabaseAccess access;
-        DatabaseTransaction transaction(&access);
-        const int infosSize = infos.size();
-        for (int i=0; i<infosSize; i++)
-        {
-            infos[i].setComment(commentsForInfos[i]);
-        }
-    }
-    */
-}
-
-// ------------------- Utilities ------------------------
-
-QDateTime NepomukService::lastSyncToDigikam()
-{
-    QString timeString = DatabaseAccess().db()->getSetting("SyncNepomukToDigikam-1-Time");
-    if (!timeString.isNull())
-        return QDateTime::fromString(timeString, Qt::ISODate);
-    return QDateTime();
-}
-
-bool NepomukService::hasSyncToNepomuk()
-{
-    return DatabaseAccess().db()->getSetting("InitialSyncDigikamToNepomuk-1") == "yes";
-}
-
-void NepomukService::markAsSyncedToDigikam()
-{
-    DatabaseAccess().db()->setSetting("SyncNepomukToDigikam-1-Time", QDateTime::currentDateTime().toString(Qt::ISODate));
-}
-
-void NepomukService::markAsSyncedToNepomuk()
-{
-    DatabaseAccess().db()->setSetting("InitialSyncDigikamToNepomuk-1", "yes");
-}
-
-void NepomukService::checkTagList()
-{
-    if (d->tagList.isEmpty())
-    {
-        d->tagList = DatabaseAccess().db()->scanTags();
-    }
-}
-
-DatabaseParameters NepomukService::databaseParameters()
-{
-    // Check running digikam instance first
-    QDBusConnectionInterface *interface = QDBusConnection::sessionBus().interface();
-    QDBusReply<QStringList> reply = interface->registeredServiceNames();
-    if (reply.isValid())
-    {
-        QStringList serviceNames = reply.value();
-        QLatin1String digikamService("org.kde.digikam-");
-        foreach (const QString &service, serviceNames)
-        {
-            if (service.startsWith(digikamService))
-            {
-                QDBusInterface interface(service, "/Digikam", "org.kde.digikam");
-                if (interface.isValid())
-                {
-                    QDBusReply<QString> paramReply = interface.call("currentDatabaseParameters");
-                    if (paramReply.isValid())
-                    {
-                        KUrl url(paramReply.value());
-                        kDebug(50003) << "Got database params from running instance:" << url;
-                        return DatabaseParameters(url);
-                    }
-                }
-            }
-        }
-    }
-
-    // no running instance, read settings file
-    KSharedConfig::Ptr config  = digikamConfig();
-    KConfigGroup group = config->group("Album Settings");
-    if (group.exists())
-    {
-        QString dbPath = group.readEntry("Database File Path", QString());
-        kDebug(50003) << "Using database path from config file:" << dbPath;
-        if (!dbPath.isEmpty())
-            return DatabaseParameters::parametersForSQLiteDefaultFile(dbPath);
-    }
-    return DatabaseParameters();
-}
-
-KSharedConfig::Ptr NepomukService::digikamConfig()
-{
-    return KSharedConfig::openConfig(
-                KComponentData("digikam", QByteArray(), KComponentData::SkipMainComponentRegistration)
-                                    );
-}
-
-} // namespace Digikam
-
-NEPOMUK_EXPORT_SERVICE(Digikam::NepomukService, "digikamnepomukservice")
diff -ru digikam.orig/utilities/nepomuk/digikamnepomukservice.h digikam/utilities/nepomuk/digikamnepomukservice.h
--- digikam.orig/utilities/nepomuk/digikamnepomukservice.h	2009-07-19 14:31:03.000000000 +0200
+++ digikam/utilities/nepomuk/digikamnepomukservice.h	2009-07-19 15:37:10.000000000 +0200
@@ -30,7 +30,6 @@
 
 #include <ksharedconfig.h>
 #include <kurl.h>
-#include <Nepomuk/Service>
 
 // Local includes
 
@@ -70,24 +69,24 @@
 
 protected Q_SLOTS:
 
-    void slotImageChange(const ImageChangeset& changeset);
-    void slotImageTagChange(const ImageTagChangeset& changeset);
-    void slotTagChange(const TagChangeset& changeset);
+    void slotImageChange(const ImageChangeset& changeset) {};
+    void slotImageTagChange(const ImageTagChangeset& changeset) {};
+    void slotTagChange(const TagChangeset& changeset) {};
 
-    void slotStatementAdded(const Soprano::Statement& statement);
-    void slotStatementRemoved(const Soprano::Statement& statement);
+    void slotStatementAdded(const Soprano::Statement& statement) {};
+    void slotStatementRemoved(const Soprano::Statement& statement) {};
 
-    void syncNepomukToDigikam();
-    void fullSyncDigikamToNepomuk();
+    void syncNepomukToDigikam() {};
+    void fullSyncDigikamToNepomuk() {};
 
-    void cleanIgnoreList();
+    void cleanIgnoreList() {};
 
-    void slotFullSyncJobResult(KJob *job);
-    void slotFullSyncJobData(KIO::Job*, const QByteArray& data);
+    void slotFullSyncJobResult(KJob *job) {};
+    void slotFullSyncJobData(KIO::Job*, const QByteArray& data) {};
 
 protected:
 
-    void connectToDatabase();
+    void connectToDatabase() {};
 
     enum SyncToNepomukSettings
     {
@@ -97,26 +96,26 @@
         SyncComment = 0x4
     };
 
-    void readConfig();
-    void syncToNepomuk(const QList<qlonglong> &imageid, SyncToNepomukSettings syncSettings);
-    void syncToNepomuk(const QList<ImageInfo> &infos, SyncToNepomukSettings syncSettings);
-    void syncTagsToNepomuk(const QList<qlonglong> &imageIds, const QList<int> &tagIds, bool addOrRemove);
-    void syncRatingToDigikam(const KUrl::List &filePaths, const QList<int> &ratings);
-    void syncCommentToDigikam(const KUrl::List &filePaths, const QStringList &ratings);
-    void syncTagsToDigikam(const KUrl::List &filePaths, const QList<QUrl> &tags);
-    void pushTagsToNepomuk(const QList<ImageInfo> &imageInfos);
-
-    QDateTime lastSyncToDigikam();
-    void markAsSyncedToDigikam();
-    bool hasSyncToNepomuk();
-    void markAsSyncedToNepomuk();
-    void checkTagList();
-    DatabaseParameters databaseParameters();
-    KSharedConfig::Ptr digikamConfig();
+    void readConfig() {};
+    void syncToNepomuk(const QList<qlonglong> &imageid, SyncToNepomukSettings syncSettings) {};
+    void syncToNepomuk(const QList<ImageInfo> &infos, SyncToNepomukSettings syncSettings) {};
+    void syncTagsToNepomuk(const QList<qlonglong> &imageIds, const QList<int> &tagIds, bool addOrRemove) {};
+    void syncRatingToDigikam(const KUrl::List &filePaths, const QList<int> &ratings) {};
+    void syncCommentToDigikam(const KUrl::List &filePaths, const QStringList &ratings) {};
+    void syncTagsToDigikam(const KUrl::List &filePaths, const QList<QUrl> &tags) {};
+    void pushTagsToNepomuk(const QList<ImageInfo> &imageInfos) {};
+
+    QDateTime lastSyncToDigikam() {};
+    void markAsSyncedToDigikam() {};
+    bool hasSyncToNepomuk() {};
+    void markAsSyncedToNepomuk() {};
+    void checkTagList() {};
+    DatabaseParameters databaseParameters() {};
+    KSharedConfig::Ptr digikamConfig() {};
 
 private:
 
-    NepomukServicePriv* const d;
+ //   NepomukServicePriv* const d;
 };
 
 } // namespace Digikam
