diff options
author | David Faure <david.faure@kdab.com> | 2021-08-22 11:09:41 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2021-08-24 15:34:59 +0200 |
commit | 511bbbdfc0c048936336e0e7923cfd002ea05d38 (patch) | |
tree | 7daee9b108791d89c4151e419c8a459278f04dd3 /src | |
parent | 278368b523e974665b60d22a0eaf27d9ed130078 (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.cpp | 4 |
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()) |