summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2021-08-22 11:09:41 +0200
committerDavid Faure <david.faure@kdab.com>2021-08-24 15:34:59 +0200
commit511bbbdfc0c048936336e0e7923cfd002ea05d38 (patch)
tree7daee9b108791d89c4151e419c8a459278f04dd3 /src
parent278368b523e974665b60d22a0eaf27d9ed130078 (diff)
qdbusxml2cpp: generate "using" rather than "typedef"
It's more modern :) I was hoping it would allow to forward declare the org::kde::Foo class, but unfortunately it doesn't, the forward declaration has to use "using" or "typedef" too... Change-Id: I9ec2900ac25c1bca75d097aa339fd2a872568f95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
index 97fc26f633..bf079995d7 100644
--- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -707,8 +707,8 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
// add this class:
if (!name.isEmpty()) {
hs << QString(current.count() * 2, QLatin1Char(' '))
- << "typedef ::" << classNameForInterface(it->constData()->name, Proxy)
- << " " << name << ";" << Qt::endl;
+ << "using " << name << " = ::" << classNameForInterface(it->constData()->name, Proxy)
+ << ";" << Qt::endl;
}
if (it == interfaces.constEnd())