1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

DataPaths: Allow to override Plugins path with FALKON_PLUGIN_PATH env variable

This commit is contained in:
David Rosca 2018-02-24 12:07:09 +01:00
parent f80287b2d8
commit 79297f54a2
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -118,6 +118,12 @@ void DataPaths::init()
// We also allow to load data from Config path
initAssetsIn(m_paths[Config].at(0));
// If FALKON_PLUGIN_PATH is set, only load plugins from there
const QByteArray pluginPath = qgetenv("FALKON_PLUGIN_PATH");
if (!pluginPath.isNull()) {
m_paths[Plugins] = QStringList{QString::fromLocal8Bit(pluginPath)};
}
m_tmpdir.reset(new QTemporaryDir());
m_paths[Temp].append(m_tmpdir->path());
if (!m_tmpdir->isValid()) {