Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
#
# SPDX-License-Identifier: LGPL-3.0-or-later

cmake_minimum_required (VERSION 3.13)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" FILE_VERSION)
Expand Down Expand Up @@ -32,4 +36,6 @@ set(DTK_VERSION "${DTK_VERSION_MAJOR}.${DTK_VERSION_MINOR}.${DTK_VERSION_PATCH}"
# Officially, DTK5 uses QT5, DTK6 uses QT6
set(QT_VERSION_MAJOR ${DTK_VERSION_MAJOR})

add_compile_definitions(QT_NO_KEYWORDS)

include(dtkcore.cmake)
4 changes: 2 additions & 2 deletions tests/fakedbus/fakedbusservice.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand All @@ -19,7 +19,7 @@ class FakeDBusServiceParent: public QObject

Q_PROPERTY(QList<QDBusObjectPath> objectPaths READ objectpaths NOTIFY objectpathsChanged);
QList<QDBusObjectPath> objectpaths();
signals:
Q_SIGNALS:
void objectpathsChanged();
private:
DDBusInterface *m_dDbusFakeDBusServiceInter;
Expand Down
4 changes: 2 additions & 2 deletions tests/ut_dthreadutils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2020 - 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2020-2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -97,7 +97,7 @@ public Q_SLOTS:
int testFunc(int i, double j) {
int r =qFloor(i + j);
wait();
emit testFuncTrigger(r);
Q_EMIT testFuncTrigger(r);
return r;
}

Expand Down
26 changes: 13 additions & 13 deletions tools/qdbusxml2cpp/qdbusxml2cpp.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2016 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2016 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

Expand Down Expand Up @@ -301,7 +301,7 @@ static QString classNameForInterface(const QString &interface, ClassType classTy

QString retval;
if (classType == Proxy)
foreach (QString part, parts) {
Q_FOREACH (QString part, parts) {
part[0] = part[0].toUpper();
retval += part;
}
Expand Down Expand Up @@ -584,7 +584,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
<< includeList
<< "#include <QtDBus/QtDBus>" << endl;

foreach (const QString &include, includes) {
Q_FOREACH (const QString &include, includes) {
hs << "#include \"" << include << "\"" << endl;
if (headerName.isEmpty())
cs << "#include \"" << include << "\"" << endl;
Expand Down Expand Up @@ -648,7 +648,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
}
hs << endl;

foreach (const QDBusIntrospection::Interface *interface, interfaces) {
Q_FOREACH (const QDBusIntrospection::Interface *interface, interfaces) {
QString className = "__" + classNameForInterface(interface->name, Proxy);

// using namespace Dtk::Core in cpp
Expand Down Expand Up @@ -777,7 +777,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
}

// properties:
foreach (const QDBusIntrospection::Property &property, interface->properties) {
Q_FOREACH (const QDBusIntrospection::Property &property, interface->properties) {
QByteArray type = qtTypeName(property.type, property.annotations);
// QString templateType = templateArg(type);
// QString constRefType = constRefArg(type);
Expand Down Expand Up @@ -834,7 +834,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf

// methods:
hs << "public Q_SLOTS: // METHODS" << endl;
foreach (const QDBusIntrospection::Method &method, interface->methods) {
Q_FOREACH (const QDBusIntrospection::Method &method, interface->methods) {
bool isDeprecated = annotationValue(method.annotations, "org.freedesktop.DBus.Deprecated") == QLatin1String("true");
bool isNoReply =
annotationValue(method.annotations, QLatin1String(ANNOTATION_NO_WAIT)) == QLatin1String("true");
Expand Down Expand Up @@ -955,7 +955,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
hs << endl;

hs << "Q_SIGNALS: // SIGNALS" << endl;
foreach (const QDBusIntrospection::Signal &signal, interface->signals_) {
Q_FOREACH (const QDBusIntrospection::Signal &signal, interface->signals_) {
hs << " ";
if (annotationValue(signal.annotations, QLatin1String("org.freedesktop.DBus.Deprecated")) == QLatin1String("true"))
hs << "Q_DECL_DEPRECATED ";
Expand All @@ -970,7 +970,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf

//propery changed signals
hs << " // begin property changed signals" << endl;
foreach (const QDBusIntrospection::Property &property, interface->properties) {
Q_FOREACH (const QDBusIntrospection::Property &property, interface->properties) {
hs << " ";
QByteArray type = qtTypeName(property.type, property.annotations);
QString constRefType = constRefArg(type);
Expand Down Expand Up @@ -1144,7 +1144,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
<< "#include <QtCore/QVariant>" << endl;
hs << "#include <QtDBus/QtDBus>" << endl;

foreach (const QString &include, includes) {
Q_FOREACH (const QString &include, includes) {
hs << "#include \"" << include << "\"" << endl;
if (headerName.isEmpty())
cs << "#include \"" << include << "\"" << endl;
Expand All @@ -1168,7 +1168,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
if (parentClassName.isEmpty())
parent = QLatin1String("QObject");

foreach (const QDBusIntrospection::Interface *interface, interfaces) {
Q_FOREACH (const QDBusIntrospection::Interface *interface, interfaces) {
QString className = classNameForInterface(interface->name, Adaptor);

// comment:
Expand Down Expand Up @@ -1213,7 +1213,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
<< endl;

hs << "public: // PROPERTIES" << endl;
foreach (const QDBusIntrospection::Property &property, interface->properties) {
Q_FOREACH (const QDBusIntrospection::Property &property, interface->properties) {
QByteArray type = qtTypeName(property.type, property.annotations);
QString constRefType = constRefArg(type);
QString getter = propertyGetter(property);
Expand Down Expand Up @@ -1256,7 +1256,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
}

hs << "public Q_SLOTS: // METHODS" << endl;
foreach (const QDBusIntrospection::Method &method, interface->methods) {
Q_FOREACH (const QDBusIntrospection::Method &method, interface->methods) {
bool isNoReply =
annotationValue(method.annotations, QLatin1String(ANNOTATION_NO_WAIT)) == QLatin1String("true");
if (isNoReply && !method.outputArgs.isEmpty()) {
Expand Down Expand Up @@ -1364,7 +1364,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
}

hs << "Q_SIGNALS: // SIGNALS" << endl;
foreach (const QDBusIntrospection::Signal &signal, interface->signals_) {
Q_FOREACH (const QDBusIntrospection::Signal &signal, interface->signals_) {
hs << " ";
if (annotationValue(signal.annotations, QLatin1String("org.freedesktop.DBus.Deprecated")) == QLatin1String("true"))
hs << "Q_DECL_DEPRECATED ";
Expand Down
Loading