diff --git a/include/global/dsysinfo.h b/include/global/dsysinfo.h index 24293b8..89eacf9 100644 --- a/include/global/dsysinfo.h +++ b/include/global/dsysinfo.h @@ -60,6 +60,7 @@ class LIBDTKCORESHARED_EXPORT DSysInfo UosDesktop, UosServer, UosDevice, + UosSmart, UosTypeCount // must at last }; diff --git a/include/util/dutil.h b/include/util/dutil.h index 999827b..4353b85 100644 --- a/include/util/dutil.h +++ b/include/util/dutil.h @@ -96,7 +96,7 @@ inline QString getAppIdFromAbsolutePath(const QString &path) return {}; } - auto tmp = path.chopped(desktopSuffix.size() - 1); + auto tmp = path.chopped(desktopSuffix.size()); auto components = tmp.split(QDir::separator(), Qt::SkipEmptyParts); auto location = std::find(components.cbegin(), components.cend(), "applications"); if (location == components.cend()) { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6b147a6..b987702 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -67,9 +67,7 @@ if(LINUX) Dtk${DTK_VERSION_MAJOR}::Log ) target_link_libraries(${LIB_NAME} PRIVATE - ICU::uc Qt${QT_VERSION_MAJOR}::CorePrivate - uchardet ) if("${QT_VERSION_MAJOR}" STREQUAL "5") target_link_libraries(${LIB_NAME} PRIVATE @@ -93,9 +91,7 @@ else() Qt${QT_VERSION_MAJOR}::Xml ) target_link_libraries(${LIB_NAME} PRIVATE - ICU::uc Qt${QT_VERSION_MAJOR}::CorePrivate - uchardet ) if("${QT_VERSION_MAJOR}" STREQUAL "5") target_link_libraries(${LIB_NAME} PRIVATE diff --git a/src/util/ddbusinterface.cpp b/src/util/ddbusinterface.cpp index b761130..73cb304 100644 --- a/src/util/ddbusinterface.cpp +++ b/src/util/ddbusinterface.cpp @@ -114,16 +114,16 @@ void DDBusInterfacePrivate::updateProp(const char *propName, const QVariant &val #endif } QByteArray baSignal = QStringLiteral("%1Changed(%2)").arg(propName).arg(typeName).toLatin1(); - QByteArray baSignalName = QStringLiteral("%1Changed").arg(propName).toLatin1(); - const char *signal = baSignal.data(); - const char *signalName = baSignalName.data(); - int i = metaObj->indexOfSignal(signal); + int i = metaObj->indexOfSignal(baSignal.data()); if (i != -1) { - QMetaObject::invokeMethod(m_parent, signalName, Qt::DirectConnection, QGenericArgument(typeName, data)); + auto method = metaObj->method(i); + if (method.parameterCount() == 1) { + method.invoke(m_parent, Qt::DirectConnection, QGenericArgument(method.parameterTypes().first(), data)); + } else { + method.invoke(m_parent, Qt::DirectConnection); + } } else { - qDebug() << "It's not exist the property:[" << propName <<"] for parent:" << m_parent - << ", interface:" << q_ptr->interface() - << ", and It's changed value is:" << value; + qDebug() << "It's not exist the property:[" << propName << "] for parent:" << m_parent << ", interface:" << q_ptr->interface() << ", and It's changed value is:" << value; } }