summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusutil_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbus/qdbusutil_p.h')
-rw-r--r--src/dbus/qdbusutil_p.h68
1 files changed, 16 insertions, 52 deletions
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 50a2490fd0..3db9384968 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -1,42 +1,6 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtDBus module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// Copyright (C) 2016 Intel Corporation.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
//
// W A R N I N G
@@ -63,7 +27,7 @@
QT_BEGIN_NAMESPACE
-#define Q_DBUS_NO_EXPORT // force findclasslist.pl looking into this namespace
+#define Q_DBUS_NO_EXPORT // force syncqt looking into this namespace
namespace Q_DBUS_NO_EXPORT QDBusUtil
{
Q_DBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);
@@ -99,11 +63,11 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
{
if (name.isEmpty()) {
if (empty == EmptyAllowed) return true;
- *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Interface name cannot be empty"));
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1StringView("Interface name cannot be empty"));
return false;
}
if (isValidInterfaceName(name)) return true;
- *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Invalid interface class: %1").arg(name));
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1StringView("Invalid interface class: %1").arg(name));
return false;
}
@@ -111,11 +75,11 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
{
if (name.isEmpty()) {
if (empty == EmptyAllowed) return true;
- *error = QDBusError(QDBusError::InvalidService, QLatin1String("Service name cannot be empty"));
+ *error = QDBusError(QDBusError::InvalidService, QLatin1StringView("Service name cannot be empty"));
return false;
}
if (isValidBusName(name)) return true;
- *error = QDBusError(QDBusError::InvalidService, QLatin1String("Invalid service name: %1").arg(name));
+ *error = QDBusError(QDBusError::InvalidService, QLatin1StringView("Invalid service name: %1").arg(name));
return false;
}
@@ -123,11 +87,11 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
{
if (path.isEmpty()) {
if (empty == EmptyAllowed) return true;
- *error = QDBusError(QDBusError::InvalidObjectPath, QLatin1String("Object path cannot be empty"));
+ *error = QDBusError(QDBusError::InvalidObjectPath, QLatin1StringView("Object path cannot be empty"));
return false;
}
if (isValidObjectPath(path)) return true;
- *error = QDBusError(QDBusError::InvalidObjectPath, QLatin1String("Invalid object path: %1").arg(path));
+ *error = QDBusError(QDBusError::InvalidObjectPath, QLatin1StringView("Invalid object path: %1").arg(path));
return false;
}
@@ -136,12 +100,12 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
if (!nameType) nameType = "member";
if (name.isEmpty()) {
if (empty == EmptyAllowed) return true;
- *error = QDBusError(QDBusError::InvalidMember, QLatin1String(nameType) + QLatin1String(" name cannot be empty"));
+ *error = QDBusError(QDBusError::InvalidMember, QLatin1StringView(nameType) + QLatin1StringView(" name cannot be empty"));
return false;
}
if (isValidMemberName(name)) return true;
- *error = QDBusError(QDBusError::InvalidMember, QLatin1String("Invalid %1 name: %2")
- .arg(QLatin1String(nameType), name));
+ *error = QDBusError(QDBusError::InvalidMember, QLatin1StringView("Invalid %1 name: %2")
+ .arg(QLatin1StringView(nameType), name));
return false;
}
@@ -149,11 +113,11 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
{
if (name.isEmpty()) {
if (empty == EmptyAllowed) return true;
- *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Error name cannot be empty"));
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1StringView("Error name cannot be empty"));
return false;
}
if (isValidErrorName(name)) return true;
- *error = QDBusError(QDBusError::InvalidInterface, QLatin1String("Invalid error name: %1").arg(name));
+ *error = QDBusError(QDBusError::InvalidInterface, QLatin1StringView("Invalid error name: %1").arg(name));
return false;
}
@@ -166,7 +130,7 @@ namespace Q_DBUS_NO_EXPORT QDBusUtil
inline QString dbusInterface()
{
// it's the same string, but just be sure
- Q_ASSERT(dbusService() == QLatin1String(DBUS_INTERFACE_DBUS));
+ Q_ASSERT(dbusService() == QLatin1StringView(DBUS_INTERFACE_DBUS));
return dbusService();
}
inline QString dbusInterfaceProperties()