Commit a07b68a0 authored by Alexander Lohnau's avatar Alexander Lohnau 💬

KCM Plasmasearch: Do not intialize runners in config module

Summary:
The runners are loaded from the plugin info list `Plasma::RunnerManager::listRunnerInfo()`,
because of that there is no need to create a RunnerManager and initialize the plugins.

If you have a lot of additional plugins installed that do a lot of work in the init/reloadConfiguration
method the loading time of the KCM is notable slower.

Additionally the KCMUTILS_VERSION version check has been removed, because
the KF5_MIN_VERSION is 5.69.

Test Plan:
All plugin should show up.
To check this create a debug which prints the length of the `listRunnerInfo` list.
Then you can verify that the length of the list is equal to the count
of entries in the plugin selector. For this you can also use the xdotool utility:
`sleep 5;for i in {1..myNum};  do sleep 0.1;xdotool key Down; done`.

Reviewers: #plasma, davidedmundson, ngraham, meven

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29319
parent 35ed83a0
/* This file is part of the KDE Project /* This file is part of the KDE Project
Copyright (c) 2014 Vishesh Handa <me@vhanda.in> Copyright (c) 2014 Vishesh Handa <me@vhanda.in>
Copyright (c) 2020 Alexander Lohnau <alexander.lohnau@gmx.de>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
...@@ -18,10 +19,7 @@ ...@@ -18,10 +19,7 @@
#include "kcm.h" #include "kcm.h"
#include "kcmutils_version.h"
#include <KPluginFactory> #include <KPluginFactory>
#include <KPluginLoader>
#include <KAboutData> #include <KAboutData>
#include <KSharedConfig> #include <KSharedConfig>
#include <QDebug> #include <QDebug>
...@@ -36,7 +34,6 @@ ...@@ -36,7 +34,6 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QLabel> #include <QLabel>
#include <QDialog> #include <QDialog>
#include <QDialogButtonBox>
#include <QPainter> #include <QPainter>
#include <QPushButton> #include <QPushButton>
...@@ -80,16 +77,10 @@ SearchConfigModule::SearchConfigModule(QWidget* parent, const QVariantList& args ...@@ -80,16 +77,10 @@ SearchConfigModule::SearchConfigModule(QWidget* parent, const QVariantList& args
connect(m_pluginSelector, &KPluginSelector::changed, this, &SearchConfigModule::markAsChanged); connect(m_pluginSelector, &KPluginSelector::changed, this, &SearchConfigModule::markAsChanged);
connect(m_pluginSelector, &KPluginSelector::configCommitted, this, &SearchConfigModule::markAsChanged); connect(m_pluginSelector, &KPluginSelector::configCommitted, this, &SearchConfigModule::markAsChanged);
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 67, 0)
connect(m_pluginSelector, &KPluginSelector::defaulted, this, &KCModule::defaulted); connect(m_pluginSelector, &KPluginSelector::defaulted, this, &KCModule::defaulted);
#endif
layout->addLayout(headerLayout); layout->addLayout(headerLayout);
layout->addWidget(m_pluginSelector); layout->addWidget(m_pluginSelector);
Plasma::RunnerManager *manager = new Plasma::RunnerManager(this);
manager->reloadConfiguration();
} }
void SearchConfigModule::load() void SearchConfigModule::load()
......
/* /*
Copyright (c) 2014 Vishesh Handa <me@vhanda.in> Copyright (c) 2014 Vishesh Handa <me@vhanda.in>
Copyright (c) 2020 Alexander Lohnau <alexander.lohnau@gmx.de>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment