Andreas Müller
2017-08-06 15:27:15 +02:00
parent ae20e4df8a
commit 451a2258bf
6 changed files with 160 additions and 56 deletions

View File

@@ -31,9 +31,22 @@ SRC_URI[sha256sum] = "f121d9537ce785e3fa13888c09fac4f22b493a6ec6521ef880156df27e
SRC_URI += " \
file://0001-fix-build-for-QT_NO_SESSIONMANAGER.patch \
file://0002-Workaround-build-error-for-Qt5.8-properly-working-qd.patch \
file://0002-do-not-create-dbus-xml-for-fileindexer-our-native-qd.patch \
file://org.kde.baloo.fileindexer.xml \
"
do_configure_append() {
# workaround broken native qdbuscpp2xml [1]. As long as this is necessary,
# org.kde.baloo.fileindexer.xml must be created for each new version of baloo by:
# 1. remove 0002-do-not-create-dbus-xml-for-fileindexer-our-native-qd.patch and do_configure_append
# 2. Build baloo - if it crashes continue with 3.
# 3. search log.do.compile for org.kde.baloo.fileindexer.xml and align command so that
# the file is created by host qdbuscpp2xml(-qt5)
# 4. copy the file created to files
mkdir -p ${B}/src/dbus
cp -f ${WORKDIR}/org.kde.baloo.fileindexer.xml ${B}/src/dbus
}
CMAKE_ALIGN_SYSROOT[1] = "KF5Baloo, -S${libdir}, -s${OE_QMAKE_PATH_HOST_LIBS}"
FILES_${PN} += " \

View File

@@ -1,55 +0,0 @@
From b62bad67e2cb3fc0133c66d83b2d2b9312d29cea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Tue, 7 Mar 2017 13:41:08 +0100
Subject: [PATCH] Workaround build error for Qt5.8 / properly working
qdbuscpp2xml
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/qml/experimental/monitor.cpp | 5 +++++
src/tools/balooctl/monitorcommand.cpp | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/src/qml/experimental/monitor.cpp b/src/qml/experimental/monitor.cpp
index 7bc4b83..4c21984 100644
--- a/src/qml/experimental/monitor.cpp
+++ b/src/qml/experimental/monitor.cpp
@@ -111,7 +111,12 @@ void Monitor::balooStarted(const QString& service)
Q_ASSERT(service == QStringLiteral("org.kde.baloo"));
m_balooRunning = true;
+#if QT_VERSION >= 0x050800
+ QDBusMessage dummyMsg;
+ m_fileindexer->registerMonitor(dummyMsg);
+#else
m_fileindexer->registerMonitor();
+#endif
slotIndexerStateChanged(m_scheduler->state());
qDebug() << "fetched suspend state";
diff --git a/src/tools/balooctl/monitorcommand.cpp b/src/tools/balooctl/monitorcommand.cpp
index a9fdd74..14cf033 100644
--- a/src/tools/balooctl/monitorcommand.cpp
+++ b/src/tools/balooctl/monitorcommand.cpp
@@ -41,7 +41,13 @@ MonitorCommand::MonitorCommand(QObject *parent)
m_out << "Baloo is not running" << endl;
QCoreApplication::exit();
}
+#if QT_VERSION >= 0x050800
+ QDBusMessage dummyMsg;
+ m_interface->registerMonitor(dummyMsg);
+#else
m_interface->registerMonitor();
+#endif
+
connect(m_interface, &org::kde::baloo::fileindexer::startedIndexingFile, this, &MonitorCommand::startedIndexingFile);
connect(m_interface, &org::kde::baloo::fileindexer::finishedIndexingFile, this, &MonitorCommand::finishedIndexingFile);
m_out << "Press ctrl+c to exit monitor" << endl;
--
2.9.3

View File

@@ -0,0 +1,35 @@
From 58e317df45cfabe199d492ee8fd648ac21c3dd37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 6 Aug 2017 13:26:55 +0200
Subject: [PATCH] do not create dbus xml for fileindexer - our native
qdbuscpp2xml is broken
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/dbus/CMakeLists.txt | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/dbus/CMakeLists.txt b/src/dbus/CMakeLists.txt
index 9381bfc..1863efb 100644
--- a/src/dbus/CMakeLists.txt
+++ b/src/dbus/CMakeLists.txt
@@ -25,11 +25,6 @@ qt5_generate_dbus_interface(
#
set(contentindexer_xml org.kde.baloo.fileindexer.xml)
-qt5_generate_dbus_interface(
- ${CMAKE_SOURCE_DIR}/src/file/filecontentindexer.h
- ${contentindexer_xml}
- OPTIONS -a
-)
set(
dbus_interface_xmls
--
2.9.4

View File

@@ -0,0 +1,28 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was:
*
* qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
* before re-generating it.
*/
#include "fileindexerinterface.h"
/*
* Implementation of interface class OrgKdeBalooFileindexerInterface
*/
OrgKdeBalooFileindexerInterface::OrgKdeBalooFileindexerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
{
}
OrgKdeBalooFileindexerInterface::~OrgKdeBalooFileindexerInterface()
{
}
#include "fileindexerinterface.moc"

View File

@@ -0,0 +1,67 @@
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was:
*
* qdbusxml2cpp is Copyright (C) 2016 The Qt Company Ltd.
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*/
#ifndef FILEINDEXERINTERFACE_H
#define FILEINDEXERINTERFACE_H
#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
/*
* Proxy class for interface org.kde.baloo.fileindexer
*/
class OrgKdeBalooFileindexerInterface: public QDBusAbstractInterface
{
Q_OBJECT
public:
static inline const char *staticInterfaceName()
{ return "org.kde.baloo.fileindexer"; }
public:
OrgKdeBalooFileindexerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
~OrgKdeBalooFileindexerInterface();
Q_PROPERTY(QString currentFile READ currentFile)
inline QString currentFile() const
{ return qvariant_cast< QString >(property("currentFile")); }
public Q_SLOTS: // METHODS
inline QDBusPendingReply<> registerMonitor()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("registerMonitor"), argumentList);
}
inline QDBusPendingReply<> unregisterMonitor()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QStringLiteral("unregisterMonitor"), argumentList);
}
Q_SIGNALS: // SIGNALS
void finishedIndexingFile(const QString &filePath);
void startedIndexingFile(const QString &filePath);
};
namespace org {
namespace kde {
namespace baloo {
typedef ::OrgKdeBalooFileindexerInterface fileindexer;
}
}
}
#endif

View File

@@ -0,0 +1,16 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.baloo.fileindexer">
<property name="currentFile" type="s" access="read"/>
<signal name="startedIndexingFile">
<arg name="filePath" type="s" direction="out"/>
</signal>
<signal name="finishedIndexingFile">
<arg name="filePath" type="s" direction="out"/>
</signal>
<method name="registerMonitor">
</method>
<method name="unregisterMonitor">
</method>
</interface>
</node>