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>
This commit is contained in:
David Faure 2021-08-22 11:09:41 +02:00
parent 278368b523
commit 511bbbdfc0

View File

@ -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())