Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusintrospection.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include "qdbusxmlparser_p.h"
6
7#ifndef QT_NO_DBUS
8
10
25 = default;
26
304 DiagnosticsReporter *reporter)
305{
306 // be lazy
307 Interfaces ifs = parseInterfaces(xml, reporter);
308 if (ifs.isEmpty())
309 return Interface();
310
311 // return the first in map order (probably alphabetical order)
312 return *ifs.constBegin().value();
313}
314
322 DiagnosticsReporter *reporter)
323{
324 QString null;
325 QDBusXmlParser parser(null, null, xml, reporter);
326 return parser.interfaces();
327}
328
341 const QString &service,
342 const QString &path,
343 DiagnosticsReporter *reporter)
344{
345 QDBusXmlParser parser(service, path, xml, reporter);
346 QSharedDataPointer<QDBusIntrospection::Object> retval = parser.object();
347 if (!retval)
349 return *retval;
350}
351
353
354#endif // QT_NO_DBUS
static Object parseObject(const QString &xml, const QString &service=QString(), const QString &path=QString(), DiagnosticsReporter *reporter=nullptr)
Parses the XML document fragment (given by xml) containing one object, found at the service service a...
static Interfaces parseInterfaces(const QString &xml, DiagnosticsReporter *reporter=nullptr)
Parses the XML document fragment (given by xml) containing several interfaces.
static Interface parseInterface(const QString &xml, DiagnosticsReporter *reporter=nullptr)
Parses the XML document fragment (given by xml) containing one interface.
QDBusIntrospection::Interfaces interfaces() const
QSharedDataPointer< QDBusIntrospection::Object > object() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLsizei const GLchar *const * path
QXmlStreamReader xml
[0]