aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/extensionmanager/extensionmanagerwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/extensionmanager/extensionmanagerwidget.cpp')
-rw-r--r--src/plugins/extensionmanager/extensionmanagerwidget.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/plugins/extensionmanager/extensionmanagerwidget.cpp b/src/plugins/extensionmanager/extensionmanagerwidget.cpp
index d6f0ddf3de6..0c367adc5ea 100644
--- a/src/plugins/extensionmanager/extensionmanagerwidget.cpp
+++ b/src/plugins/extensionmanager/extensionmanagerwidget.cpp
@@ -9,7 +9,6 @@
#include "extensionsmodel.h"
#include <coreplugin/coreconstants.h>
-#include <coreplugin/coreplugin.h>
#include <coreplugin/coreplugintr.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
@@ -267,19 +266,17 @@ public:
return;
const bool doIt = m_pluginView.data().setPluginsEnabled({spec}, checked);
if (doIt) {
- if (checked && spec->isEffectivelySoftloadable()) {
- ExtensionSystem::PluginManager::loadPluginsAtRuntime({spec});
- Core::Internal::CorePlugin::loadMimeFromPlugin(spec);
- } else if (ICore::infoBar()->canInfoBeAdded(kRestartSetting)) {
- Utils::InfoBarEntry info(
- kRestartSetting,
- Core::Tr::tr("Plugin changes will take effect after restart."));
- info.addCustomButton(Tr::tr("Restart Now"), [] {
- ICore::infoBar()->removeInfo(kRestartSetting);
- QTimer::singleShot(0, ICore::instance(), &ICore::restart);
- });
- ICore::infoBar()->addInfo(info);
- }
+ if (!ICore::infoBar()->canInfoBeAdded(kRestartSetting))
+ return;
+
+ Utils::InfoBarEntry info(
+ kRestartSetting,
+ Core::Tr::tr("Plugin changes will take effect after restart."));
+ info.addCustomButton(Tr::tr("Restart Now"), [] {
+ ICore::infoBar()->removeInfo(kRestartSetting);
+ QTimer::singleShot(0, ICore::instance(), &ICore::restart);
+ });
+ ICore::infoBar()->addInfo(info);
ExtensionSystem::PluginManager::writeSettings();
} else {