Skip to content
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: Temporary disable some plugins for Treeland #237

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading