Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkcore
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#435
  • Loading branch information
deepin-ci-robot committed Sep 9, 2024
1 parent 0e222e6 commit 44b66a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
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
2 changes: 1 addition & 1 deletion include/util/dutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
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

0 comments on commit 44b66a2

Please sign in to comment.