-
Notifications
You must be signed in to change notification settings - Fork 55
chore: TrayLoader single process support to start multiple plugins #926
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
chore: TrayLoader single process support to start multiple plugins #926
Conversation
b491876 to
5b413b0
Compare
5b413b0 to
54c2e6b
Compare
| "name[zh_CN]": "自维护托盘插件", | ||
| "description": "self maintenance plugins", | ||
| "description[zh_CN]": "自维护托盘插件", | ||
| "permissions": "readwrite", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是应该只读🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| "serial": 0, | ||
| "flags": [], | ||
| "name": "application tray plugins", | ||
| "name[zh_CN]": "应用托盘插件", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该是子项目托盘插件,不是应用托盘吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| "name[zh_CN]": "应用托盘插件", | ||
| "description": "application tray plugins", | ||
| "description[zh_CN]": "应用托盘插件", | ||
| "permissions": "readwrite", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
panels/dock/loadtrayplugins.cpp
Outdated
| if (dirs.isEmpty()) | ||
| dirs << pluginDirs; | ||
|
|
||
| QString selfMaintenancePluginPaths; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以声明为一个list, 用join(";")去拼接成一个字符串。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| "permissions": "readwrite", | ||
| "visibility": "private" | ||
| }, | ||
| "selfMaintenanceTrayPlugins": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们自己维护的插件,能不能改插件类型,在meta中加个字段,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
想,但目前不是很允许。
ded970b to
0ea3291
Compare
panels/dock/loadtrayplugins.cpp
Outdated
| const QString otherPlugins = "otherPlugins"; | ||
|
|
||
| auto dConfig = Dtk::Core::DConfig::create("org.deepin.dde.shell", "org.deepin.ds.dock.tray", QString()); | ||
| QStringList selfMaintenanceTrayPlugins = dConfig->value("selfMaintenanceTrayPlugins").toStringList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这下面的key与上面的变量是不是重复的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以是一致,done
| for (auto &pluginDir : dirs) { | ||
| QDir dir(pluginDir); | ||
| if (!dir.exists()) { | ||
| qWarning() << "The plugin directory does not exist:" << pluginDir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
category?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方是遍历插件目录
panels/dock/loadtrayplugins.cpp
Outdated
| return validExePath; | ||
| } | ||
|
|
||
| QMap<QString, QString> LoadTrayPlugins::getPluginGroup() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
要不抽出一个函数吧,传入满足的条件,返回结果,例如QStringList xxx(const QStringList &plugins) const;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
抽一个获取所有插件的函数,和给插件分组的函数。
254a5af to
cf9a3b2
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tsic404, yixinshark 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 |
cf9a3b2 to
f46b80a
Compare
1.Divide plugins into three groups(selfMaintenance,application,other) 2.single process support to start multiple plugins Log: as title Bug: https://pms.uniontech.com/bug-view-283901.html
f46b80a to
0910903
Compare
deepin pr auto review代码审查意见:
总体来说,代码重构和错误处理是这次提交的主要改进点,但还需要注意依赖项的兼容性、配置文件的处理、资源管理和安全性等方面的问题。 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
1.Divide plugins into three groups(selfMaintenance,application,other) 2.single process support to start multiple plugins
Log: as title
Bug: https://pms.uniontech.com/bug-view-283901.html