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 authored and kegechen committed Sep 9, 2024
1 parent d598e93 commit 0efd5df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
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
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 0efd5df

Please sign in to comment.