File fix-build.patch of Package baloo_kcm
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32cfa46..945e3fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ if (NOT BALOO_DBUS_INTERFACES_DIR)
set(BALOO_DBUS_INTERFACES_DIR "${CMAKE_INSTALL_FULL_DBUSDIR}/interfaces")
endif ()
-qt5_add_dbus_interface(kcm_file_SRCS ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.file.indexer.xml baloofileindexerinterface)
+qt5_add_dbus_interface(kcm_file_SRCS ${BALOO_DBUS_INTERFACES_DIR}/org.kde.baloo.scheduler.xml balooschedulerinterface)
ki18n_wrap_ui(kcm_file_SRCS
configwidget.ui
diff --git a/kcm.cpp b/kcm.cpp
index 45cc867..8d475cf 100644
--- a/kcm.cpp
+++ b/kcm.cpp
@@ -159,7 +159,7 @@ void ServerConfigModule::save()
}
else {
QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.kde.baloo"),
- QLatin1String("/indexer"),
+ QLatin1String("/"),
QLatin1String("org.kde.baloo"),
QLatin1String("quit"));
@@ -238,8 +238,8 @@ void ServerConfigModule::getInterfaces()
{
delete m_FileIndexer;
- m_FileIndexer = new org::kde::baloo("org.kde.baloo", "/indexer", QDBusConnection::sessionBus());
- connect(m_FileIndexer, SIGNAL(statusChanged()), SLOT(updateFileIndexerStatus()));
+ m_FileIndexer = new org::kde::baloo::scheduler("org.kde.baloo", "/scheduler", QDBusConnection::sessionBus());
+ connect(m_FileIndexer, SIGNAL(stateChanged(int)), SLOT(updateFileIndexerStatus()));
updateFileIndexerStatus();
}
@@ -248,7 +248,7 @@ void ServerConfigModule::updateFileIndexerStatus()
if ( m_FileIndexer && m_FileIndexer->isValid() )
{
bnControlFileIndexer->setEnabled(true);
- if (m_FileIndexer->isSuspended() ) {
+ if (m_FileIndexer->state() == 1) {
lbFileIndexerStatus->setText( i18nc( "@info:status", "Desktop indexing services are suspended" ) );
bnControlFileIndexer->setText( i18nc( "@info:status", "Resume" ) );
}
@@ -274,7 +274,7 @@ void ServerConfigModule::slotControlFileIndexerClicked()
{
if (m_FileIndexer && m_FileIndexer->isValid())
{
- if (m_FileIndexer->isSuspended())
+ if (m_FileIndexer->state() == 1)
m_FileIndexer->resume();
else
m_FileIndexer->suspend();
diff --git a/kcm.h b/kcm.h
index 571e968..5572aed 100644
--- a/kcm.h
+++ b/kcm.h
@@ -23,11 +23,10 @@
#include <KCModule>
#include "ui_configwidget.h"
#include "indexfolderselectiondialog.h"
-#include "baloofileindexerinterface.h"
+#include "balooschedulerinterface.h"
namespace Baloo
{
-
class ServerConfigModule : public KCModule, private Ui::ConfigWidget
{
Q_OBJECT
@@ -59,7 +58,7 @@ public Q_SLOTS:
void slotControlFileIndexerClicked();
private:
- org::kde::baloo *m_FileIndexer;
+ org::kde::baloo::scheduler *m_FileIndexer;
void getInterfaces();
void loadDisplay();