qdbusxmlparser: Enabled error output
Implements behavior for the --verbose switch already specified but never implemented. Without this switch you would have to rebuild qdbusxml2cpp to see error output. Using -V will now produce error output such as: dbus.parser: unknown token "" "Characters" dbus.parser: Invalid D-BUS interface name 'com.qt-project.dbus' found while parsing introspection dbus.parser: unknown token "" "Characters" dbus.parser: skipping unknown element "method" dbus.parser: xml error "Opening and ending tag mismatch." doc "..." Task-number: QTBUG-34126 Change-Id: Ie5b7ec78007ddc305b1e7ddbffb1436920721c9c Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
bdb81d0bd1
commit
cd78457c6d
@ -48,15 +48,12 @@
|
||||
|
||||
#ifndef QT_NO_DBUS
|
||||
|
||||
//#define QDBUS_PARSER_DEBUG
|
||||
#ifdef QDBUS_PARSER_DEBUG
|
||||
# define qDBusParserError qDebug
|
||||
#else
|
||||
# define qDBusParserError if (true) {} else qDebug
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(dbusParser, "dbus.parser", QtWarningMsg)
|
||||
|
||||
#define qDBusParserError(...) qCDebug(dbusParser, ##__VA_ARGS__)
|
||||
|
||||
static bool parseArg(const QXmlStreamAttributes &attributes, QDBusIntrospection::Argument &argData,
|
||||
QDBusIntrospection::Interface *ifaceData)
|
||||
{
|
||||
|
@ -52,6 +52,7 @@
|
||||
//
|
||||
|
||||
#include <QtDBus/private/qtdbusglobal_p.h>
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
#include <QtCore/qmap.h>
|
||||
#include "qdbusintrospection_p.h"
|
||||
|
||||
@ -59,6 +60,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(dbusParser)
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include <qdebug.h>
|
||||
#include <qfile.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qloggingcategory.h>
|
||||
#include <qstring.h>
|
||||
#include <qstringlist.h>
|
||||
#include <qtextstream.h>
|
||||
@ -1092,6 +1093,9 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
QLoggingCategory::setFilterRules(QStringLiteral("dbus.parser.debug=true"));
|
||||
|
||||
QDBusIntrospection::Interfaces interfaces = readInput();
|
||||
cleanInterfaces(interfaces);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user