diff options
| author | Vishesh Handa <[email protected]> | 2014-02-06 20:29:09 +0100 |
|---|---|---|
| committer | Vishesh Handa <[email protected]> | 2014-02-06 20:29:09 +0100 |
| commit | 64afe7b22622f79b34aafd54501b08120ab2fc5c (patch) | |
| tree | 125752b2bc33c5e9db84f197dced5d61a7d46e94 /src/views/dolphinviewactionhandler.cpp | |
| parent | 2c20502c346d975bff854567c038bf0b78c3b857 (diff) | |
Port Dolphin to Baloo
Nepomuk is being replaced with Baloo
Diffstat (limited to 'src/views/dolphinviewactionhandler.cpp')
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 051174f6d..48ec95c70 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -20,7 +20,7 @@ #include "dolphinviewactionhandler.h" -#include <config-nepomuk.h> +#include <config-baloo.h> #include "settings/viewpropertiesdialog.h" #include "views/dolphinview.h" @@ -39,12 +39,12 @@ #include <KPropertiesDialog> #include <KIcon> -#ifdef HAVE_NEPOMUK - #include <Nepomuk2/ResourceManager> -#endif - #include <KDebug> +#ifdef HAVE_BALOO + #include <baloo/indexerconfig.h> +#endif + DolphinViewActionHandler::DolphinViewActionHandler(KActionCollection* collection, QObject* parent) : QObject(parent), m_actionCollection(collection), @@ -237,14 +237,10 @@ QActionGroup* DolphinViewActionHandler::createFileItemRolesActionGroup(const QSt KActionMenu* groupMenu = 0; QActionGroup* groupMenuGroup = 0; - bool nepomukRunning = false; bool indexingEnabled = false; -#ifdef HAVE_NEPOMUK - nepomukRunning = (Nepomuk2::ResourceManager::instance()->initialized()); - if (nepomukRunning) { - KConfig config("nepomukserverrc"); - indexingEnabled = config.group("Service-nepomukfileindexer").readEntry("autostart", true); - } +#ifdef HAVE_BALOO + Baloo::IndexerConfig config; + indexingEnabled = config.fileIndexingEnabled(); #endif const QList<KFileItemModel::RoleInfo> rolesInfo = KFileItemModel::rolesInformation(); @@ -284,8 +280,8 @@ QActionGroup* DolphinViewActionHandler::createFileItemRolesActionGroup(const QSt action->setText(info.translation); action->setData(info.role); - const bool enable = (!info.requiresNepomuk && !info.requiresIndexer) || - (info.requiresNepomuk && nepomukRunning) || + const bool enable = (!info.requiresBaloo && !info.requiresIndexer) || + (info.requiresBaloo) || (info.requiresIndexer && indexingEnabled); action->setEnabled(enable); |
