summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusxmlgenerator.cpp
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2023-06-19 15:33:52 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2023-06-20 15:39:14 +0200
commita12abc2614cf69be676436af99eb62363fdaff3d (patch)
treee020cf345109b54c211737ae745936a395a3cc6a /src/dbus/qdbusxmlgenerator.cpp
parent56644240851443b1259bff2098d221068dd3e8b5 (diff)
QDBus: Remove commented out code
The code is commented out since 12 years ago. Change-Id: I5cd7380f8f1e778ea62b510aeece1aced111d662 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusxmlgenerator.cpp')
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 662a96e53b..412ac18095 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -228,56 +228,6 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
return " <interface name=\"%1\">\n%2 </interface>\n"_L1
.arg(interface, xml);
}
-#if 0
-QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, const QMetaObject *base,
- int flags)
-{
- if (interface.isEmpty()) {
- // generate the interface name from the meta object
- int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE);
- if (idx >= mo->classInfoOffset()) {
- interface = QLatin1StringView(mo->classInfo(idx).value());
- } else {
- interface = QLatin1StringView(mo->className());
- interface.replace("::"_L1, "."_L1);
-
- if (interface.startsWith("QDBus"_L1)) {
- interface.prepend("org.qtproject.QtDBus."_L1);
- } else if (interface.startsWith(u'Q') &&
- interface.length() >= 2 && interface.at(1).isUpper()) {
- // assume it's Qt
- interface.prepend("org.qtproject.Qt."_L1);
- } else if (!QCoreApplication::instance()||
- QCoreApplication::instance()->applicationName().isEmpty()) {
- interface.prepend("local."_L1);
- } else {
- interface.prepend(u'.').prepend(QCoreApplication::instance()->applicationName());
- QStringList domainName =
- QCoreApplication::instance()->organizationDomain().split(u'.',
- Qt::SkipEmptyParts);
- if (domainName.isEmpty())
- interface.prepend("local."_L1);
- else
- for (int i = 0; i < domainName.count(); ++i)
- interface.prepend(u'.').prepend(domainName.at(i));
- }
- }
- }
-
- QString xml;
- int idx = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTROSPECTION);
- if (idx >= mo->classInfoOffset())
- return QString::fromUtf8(mo->classInfo(idx).value());
- else
- xml = generateInterfaceXml(mo, flags, base->methodCount(), base->propertyCount());
-
- if (xml.isEmpty())
- return QString(); // don't add an empty interface
- return QString::fromLatin1(" <interface name=\"%1\">\n%2 </interface>\n")
- .arg(interface, xml);
-}
-
-#endif
QT_END_NAMESPACE