mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
DataPaths: Only load plugins from first path in portable build
This commit is contained in:
parent
2873cf45a9
commit
ec1e30314c
@ -48,6 +48,7 @@ void DataPaths::setPortableVersion()
|
|||||||
{
|
{
|
||||||
DataPaths* d = qz_data_paths();
|
DataPaths* d = qz_data_paths();
|
||||||
d->m_paths[Config] = d->m_paths[AppData];
|
d->m_paths[Config] = d->m_paths[AppData];
|
||||||
|
d->m_paths[Plugins] = QStringList{d->m_paths[Plugins].at(0)};
|
||||||
|
|
||||||
d->m_paths[Profiles] = d->m_paths[Config];
|
d->m_paths[Profiles] = d->m_paths[Config];
|
||||||
d->m_paths[Profiles].first().append(QLatin1String("/profiles"));
|
d->m_paths[Profiles].first().append(QLatin1String("/profiles"));
|
||||||
|
@ -148,17 +148,13 @@ void Plugins::loadAvailablePlugins()
|
|||||||
|
|
||||||
m_pluginsLoaded = true;
|
m_pluginsLoaded = true;
|
||||||
|
|
||||||
QStringList dirs = DataPaths::allPaths(DataPaths::Plugins);
|
const QStringList dirs = DataPaths::allPaths(DataPaths::Plugins);
|
||||||
|
|
||||||
// Portable build: Load only plugins from DATADIR/plugins/ directory.
|
|
||||||
if (mApp->isPortable())
|
|
||||||
dirs = QStringList(DataPaths::path(DataPaths::Plugins));
|
|
||||||
|
|
||||||
// InternalPlugin
|
// InternalPlugin
|
||||||
registerAvailablePlugin(loadInternalPlugin(QSL("adblock")));
|
registerAvailablePlugin(loadInternalPlugin(QSL("adblock")));
|
||||||
|
|
||||||
// SharedLibraryPlugin
|
// SharedLibraryPlugin
|
||||||
for (const QString &dir : qAsConst(dirs)) {
|
for (const QString &dir : dirs) {
|
||||||
const auto files = QDir(dir).entryInfoList(QDir::Files);
|
const auto files = QDir(dir).entryInfoList(QDir::Files);
|
||||||
for (const QFileInfo &info : files) {
|
for (const QFileInfo &info : files) {
|
||||||
if (info.baseName() == QL1S("PyFalkon")) {
|
if (info.baseName() == QL1S("PyFalkon")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user