diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-10 10:57:05 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-10 11:23:31 (GMT) |
commit | 72e0778c9b5bdae58596090b114d5d0e7092f911 (patch) | |
tree | 53c31d9b61700c2c6db672767e24953192c5373c /tools/qdbus | |
parent | abb425e3db6c20c5271788cb1ec4e1fe37b9ea5b (diff) | |
parent | 50bb35a5ca48816f7563d1055071b4caa7791056 (diff) | |
download | Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.zip Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.tar.gz Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
doc/src/development/qmake-manual.qdoc
mkspecs/symbian-gcce/qmake.conf
qmake/project.cpp
src/corelib/global/qnamespace.qdoc
src/declarative/graphicsitems/qdeclarativetext.cpp
src/gui/text/qtextdocumentlayout.cpp
src/gui/text/qtextdocumentlayout_p.h
tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
tests/auto/networkselftest/networkselftest.pro
tests/auto/qscriptengine/tst_qscriptengine.cpp
tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
tools/qdoc3/test/qt-build-docs.qdocconf
tools/qdoc3/test/qt-html-templates.qdocconf
tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
tools/qdoc3/test/qt.qdocconf
tools/qdoc3/test/qt_ja_JP.qdocconf
tools/qdoc3/test/qt_zh_CN.qdocconf
Diffstat (limited to 'tools/qdbus')
-rw-r--r-- | tools/qdbus/qdbus/qdbus.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp index 6742810..a3821a1 100644 --- a/tools/qdbus/qdbus/qdbus.cpp +++ b/tools/qdbus/qdbus/qdbus.cpp @@ -50,6 +50,10 @@ #include <QtDBus/QtDBus> #include <private/qdbusutil_p.h> +QT_BEGIN_NAMESPACE +Q_DBUS_EXPORT extern bool qt_dbus_metaobject_skip_annotations; +QT_END_NAMESPACE + static QDBusConnection connection(QLatin1String("")); static bool printArgumentsLiterally = false; @@ -99,7 +103,7 @@ static void printArg(const QVariant &v) else if (arg.currentSignature() == QLatin1String("a{sv}")) printArg(qdbus_cast<QVariantMap>(arg)); else - printf("qdbus: I don't know how to display an argument of type '%s'\n", + printf("qdbus: I don't know how to display an argument of type '%s', run with --literal.\n", qPrintable(arg.currentSignature())); } else { printf("%s\n", qPrintable(v.toString())); @@ -311,7 +315,11 @@ static int placeCall(const QString &service, const QString &path, const QString int id = QVariant::nameToType(types.at(i)); if (id == QVariant::UserType) id = QMetaType::type(types.at(i)); - Q_ASSERT(id); + if (!id) { + fprintf(stderr, "Cannot call method '%s' because type '%s' is unknown to this tool\n", + qPrintable(member), types.at(i).constData()); + return 1; + } QVariant p; QString argument; @@ -435,6 +443,7 @@ static void printAllServices(QDBusConnectionInterface *bus) int main(int argc, char **argv) { + QT_PREPEND_NAMESPACE(qt_dbus_metaobject_skip_annotations) = true; QCoreApplication app(argc, argv); QStringList args = app.arguments(); args.takeFirst(); |