From 511bbbdfc0c048936336e0e7923cfd002ea05d38 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 22 Aug 2021 11:09:41 +0200 Subject: 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 --- src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools') 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()) -- cgit v1.2.3