-
Notifications
You must be signed in to change notification settings - Fork 15
sync: from linuxdeepin/dtkcore #143
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkcore\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | e18a6b5679"
}
]
} |
|
TAG Bot New tag: 6.0.41 |
ace64ad to
3c27966
Compare
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtkcore\"",
"line_number": 10,
"rule": "S35",
"reason": "Url link | e18a6b5679"
}
]
} |
3c27966 to
aec09f2
Compare
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#497
aec09f2 to
85dc5d0
Compare
deepin pr auto review我来审查这段代码的修改,并提供改进意见: 语法逻辑
代码质量
代码性能
代码安全
改进建议
QSet<QString> annotations;
for (const QDBusIntrospection::Interface *interface : interfaces) {
for (const auto &method : interface->methods) {
for (const auto &arg : method.outputArgs) {
annotations += arg.annotations;
}
for (const auto &arg : method.inputArgs) {
annotations += arg.annotations;
}
}
}
QSet<QString> annotationSet;
QStringList annotationList;
for (const QDBusIntrospection::Interface *interface : interfaces) {
for (const auto &method : interface->methods) {
for (const auto &arg : method.outputArgs) {
for (const QString &annotation : arg.annotations) {
if (!annotationSet.contains(annotation)) {
annotationSet.insert(annotation);
annotationList.append(annotation);
}
}
}
// 类似处理 inputArgs
}
}
static QStringList collectAnnotations(const QList<QDBusIntrospection::Interface *> &interfaces)
{
QSet<QString> annotations;
for (const QDBusIntrospection::Interface *interface : interfaces) {
for (const auto &method : interface->methods) {
for (const auto &arg : method.outputArgs) {
annotations += arg.annotations;
}
for (const auto &arg : method.inputArgs) {
annotations += arg.annotations;
}
}
}
return annotations.values();
}总结来说,原代码的修改虽然功能正确,但降低了代码的性能和效率。建议保持使用 |
Synchronize source files from linuxdeepin/dtkcore.
Source-pull-request: linuxdeepin/dtkcore#497