Qt 6.x
The Qt SDK
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
301 DiagnosticsReporter *reporter)
302{
303 // be lazy
304 Interfaces ifs = parseInterfaces(xml, reporter);
305 if (ifs.isEmpty())
306 return Interface();
307
308 // return the first in map order (probably alphabetical order)
309 return *ifs.constBegin().value();
310}
311
319 DiagnosticsReporter *reporter)
320{
321 QString null;
322 QDBusXmlParser parser(null, null, xml, reporter);
323 return parser.interfaces();
324}
325
338 const QString &service,
339 const QString &path,
340 DiagnosticsReporter *reporter)
341{
342 QDBusXmlParser parser(service, path, xml, reporter);
344 if (!retval)
346 return *retval;
347}
348
350
351#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
bool isEmpty() const
Definition qmap.h:268
const_iterator constBegin() const
Definition qmap.h:599
\inmodule QtCore
Definition qshareddata.h:35
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
GLsizei const GLchar *const * path
QXmlStreamReader xml
[0]