Web lists-archives.com

baloo Qt5.7 -> Qt5.8 oddities




Hi,

I think there is an error in src/qml/experimental/monitor.cpp / void
Monitor::balooStarted. The call m_fileindexer->registerMonitor() needs
a parameter of type const QDBusMessage& - see
src/file/filecontextindexer.h.

Now the fun part trying to explain why this was not yet detected. Ok let's try:

1. With Qt5.7 the conversion qtcpp2xml silently ignores the parameter
'const QDBusMessage& message' -> No build error

2.With Qt5.8 and bootstrapped build of qdbuscpp2xml - build fails.
qtcpp2xml complains

| qdbuscpp2xml -a filecontentindexer.h
| Unregistered input type in parameter list: QDBusMessage
| Unregistered input type in parameter list: QDBusMessage
| <!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>
|  </interface>
| </node>

When qdbusxml2cpp creates fileindexer.h from this, registerMonitor()
and unregisterMonitor() are missing -> compile fails. I have discussed
the qdbuscpp2xml-part on qt-mailing list without result [1].

3. I helped myself by hacking qtbase so that qdbuscpp2xml and
qdbusxml2cpp are not build bootstrapped (see patch attached). Now
everything works as expected from qtbase's perspective but baloo's
build fails due to wrong signature of registerMonitor():
| baloo-5.31.0/src/qml/experimental/monitor.cpp:114:36: error: no
matching function for call to
'OrgKdeBalooFileindexerInterface::registerMonitor()'

OK - if you followed me till this point: What is the proper fix for
qdbuscpp2xml working properly?

[1] http://lists.qt-project.org/pipermail/development/2017-February/028756.html

Thanks for attention

Andreas
From 86ae0ce931edbe0ac30cfe5f94f681f1d055fdb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@xxxxxxxxxxxxxx>
Date: Mon, 6 Mar 2017 11:50:38 +0100
Subject: [PATCH] qdbuscpp2xml.pro: do not build with bootstrapped
 dependenciies
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@xxxxxxxxxxxxxx>
---
 src/src.pro                             | 9 ++-------
 src/tools/qdbuscpp2xml/qdbuscpp2xml.pro | 3 +--
 src/tools/qdbusxml2cpp/qdbusxml2cpp.pro | 5 +----
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/src.pro b/src/src.pro
index 90d7e2b..0aaf604 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -4,9 +4,6 @@ QT_FOR_CONFIG += gui-private
 include($$OUT_PWD/corelib/qtcore-config.pri)
 include($$OUT_PWD/gui/qtgui-config.pri)
 
-force_bootstrap|!qtConfig(commandlineparser): \
-    CONFIG += force_dbus_bootstrap
-
 src_qtzlib.file = $$PWD/corelib/qtzlib.pro
 src_qtzlib.target = sub-zlib
 
@@ -37,13 +34,11 @@ src_tools_bootstrap_dbus.depends = src_tools_bootstrap
 
 src_tools_qdbusxml2cpp.subdir = tools/qdbusxml2cpp
 src_tools_qdbusxml2cpp.target = sub-qdbusxml2cpp
-force_dbus_bootstrap: src_tools_qdbusxml2cpp.depends = src_tools_bootstrap_dbus
-else: src_tools_qdbusxml2cpp.depends = src_dbus
+src_tools_qdbusxml2cpp.depends = src_dbus
 
 src_tools_qdbuscpp2xml.subdir = tools/qdbuscpp2xml
 src_tools_qdbuscpp2xml.target = sub-qdbuscpp2xml
-force_bootstrap: src_tools_qdbuscpp2xml.depends = src_tools_bootstrap_dbus
-else: src_tools_qdbuscpp2xml.depends = src_dbus
+src_tools_qdbuscpp2xml.depends = src_dbus
 
 src_winmain.subdir = $$PWD/winmain
 src_winmain.target = sub-winmain
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
index 5ac3159..74c507c 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro
@@ -1,7 +1,6 @@
 option(host_build)
 QT = core-private
-force_bootstrap: QT += bootstrap_dbus-private
-else: QT += dbus-private
+QT += dbus-private
 DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
 QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS
 
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
index d9ee5de..e891103 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro
@@ -1,9 +1,6 @@
 option(host_build)
-!force_bootstrap:!qtConfig(commandlineparser): \
-    CONFIG += force_bootstrap
 QT = core-private
-force_bootstrap: QT += bootstrap_dbus-private
-else: QT += dbus-private
+QT += dbus-private
 DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
 QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS
 
-- 
2.9.3