Skip to content

Commit

Permalink
chore: Temporary disable some plugins for Treeland
Browse files Browse the repository at this point in the history
对 Treeland 会话临时禁用部分插件。

Log:
  • Loading branch information
BLumia authored and 18202781743 committed Jan 16, 2025
1 parent c5bb329 commit 9991d44
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dde-tray-loader (1.99.12) UNRELEASED; urgency=medium

* Temporary disable some plugins for Treeland

-- Wang Zichong <[email protected]> Thu, 16 Jan 2025 12:07:00 +0800

dde-tray-loader (1.99.11) UNRELEASED; urgency=medium

* fix: Datetime plugin display problem (#230)(Bug: 276275)
Expand Down
17 changes: 17 additions & 0 deletions src/loader/pluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,23 @@ QVector<PluginsItemInterface *> PluginManager::loadedPlugins() const

void PluginManager::loadPlugin(const QString &pluginFilePath)
{
QStringList blacklistedPluginPaths;
// TODO: use dconfig for this purpose.
if (qgetenv("XDG_SESSION_TYPE") == "wayland") {
blacklistedPluginPaths.append(QStringList{
"libshot-start-record-plugin.so",
"libshot-start-plugin.so",
"libdeepin-screen-recorder-plugin.so",
"libeye-comfort-mode.so",
});
}
for (const QString &path : blacklistedPluginPaths) {
if (pluginFilePath.endsWith(path)) {
qDebug() << "Skipping blacklisted plugin:" << pluginFilePath;
return;
}
}

auto *pluginLoader = new QPluginLoader(pluginFilePath, this);
const QJsonObject &meta = pluginLoader->metaData().value("MetaData").toObject();
const QString &pluginApi = meta.value("api").toString();
Expand Down

0 comments on commit 9991d44

Please sign in to comment.