1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Plugins: Load KDE Frameworks Integration by default inside KDE session

This commit is contained in:
David Rosca 2018-04-02 10:28:44 +02:00
parent fb95cc81d6
commit ec1c2c8031
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -84,9 +84,18 @@ void Plugins::unloadPlugin(Plugins::Plugin* plugin)
void Plugins::loadSettings()
{
QStringList defaultAllowedPlugins = {
QSL("internal:adblock")
};
// Enable KDE Frameworks Integration when running inside KDE session
if (qgetenv("KDE_FULL_SESSION") == QByteArray("true")) {
defaultAllowedPlugins.append(QSL("lib:KDEFrameworksIntegration.so"));
}
Settings settings;
settings.beginGroup("Plugin-Settings");
m_allowedPlugins = settings.value("AllowedPlugins", QStringList(QSL("internal:adblock"))).toStringList();
m_allowedPlugins = settings.value("AllowedPlugins", defaultAllowedPlugins).toStringList();
settings.endGroup();
}