Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: from linuxdeepin/dtkcore #69

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/global/dsysinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class LIBDTKCORESHARED_EXPORT DSysInfo
UosDesktop,
UosServer,
UosDevice,
UosSmart,

UosTypeCount // must at last
};
Expand Down
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/util/ddbusinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
Loading