Revert "fix: core dumped under Qt 6.4"

Github bug makes me commit wrong content, revert it.

This reverts commit 6fae5a758b.
This commit is contained in:
black-desk
2023-08-29 10:06:55 +08:00
parent 6fae5a758b
commit 25a7acb6fd
8 changed files with 14 additions and 37 deletions

View File

@ -196,24 +196,12 @@ void unregisterObjectFromDBus(const QString &path);
inline QString getDBusInterface(const QMetaType &meta)
{
auto name = QString{meta.name()};
if (name == "ApplicationAdaptor") {
return ApplicationInterface;
const auto *infoObject = meta.metaObject();
if (auto infoIndex = infoObject->indexOfClassInfo("D-Bus Interface"); infoIndex != -1) {
return infoObject->classInfo(infoIndex).value();
}
if (name == "InstanceAdaptor") {
return InstanceInterface;
}
if (name == "APPObjectManagerAdaptor" or name == "AMObjectManagerAdaptor") {
return ObjectManagerInterface;
}
// const auto *infoObject = meta.metaObject();
// if (auto infoIndex = infoObject->indexOfClassInfo("D-Bus Interface"); infoIndex != -1) {
// return infoObject->classInfo(infoIndex).value();
// }
qWarning() << "couldn't found interface:" << name;
return "";
qWarning() << "no interface found.";
return {};
}
inline ObjectInterfaceMap getChildInterfacesAndPropertiesFromObject(QObject *o)