Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qdbusextratypes.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
4#include "qdbusextratypes.h"
5#include "qdbusutil_p.h"
6
7#ifndef QT_NO_DBUS
8
10
14
15void QDBusObjectPath::doCheck()
16{
17 if (!QDBusUtil::isValidObjectPath(m_path)) {
18 qWarning("QDBusObjectPath: invalid path \"%s\"", qPrintable(m_path));
19 m_path.clear();
20 }
21}
22
23void QDBusSignature::doCheck()
24{
25 if (!QDBusUtil::isValidSignature(m_signature)) {
26 qWarning("QDBusSignature: invalid signature \"%s\"", qPrintable(m_signature));
27 m_signature.clear();
28 }
29}
30
143QDBusObjectPath::operator QVariant() const { return QVariant::fromValue(*this); }
144
216
217#endif // QT_NO_DBUS
\inmodule QtDBus
\inmodule QtDBus
\inmodule QtDBus
void clear()
Clears the contents of the string and makes it null.
Definition qstring.h:1107
\inmodule QtCore
Definition qvariant.h:64
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Definition qvariant.h:531
bool isValidObjectPath(const QString &path)
Returns true if path is valid object path.
bool isValidSignature(const QString &signature)
Returns true if signature is a valid D-Bus type signature for one or more types.
Combined button and popup list for selecting options.
#define qWarning
Definition qlogging.h:162
#define QT_IMPL_METATYPE_EXTERN(TYPE)
Definition qmetatype.h:1369
#define qPrintable(string)
Definition qstring.h:1391