From 2197eeb4aa8d7a44c444e3646138c69559c9176e Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 12 Feb 2021 15:36:07 +0100 Subject: Fix installation directory in plugin install wizard Correctly initialize the bool variable that decides where the plugin is installed. Fix creation of installation directory: QDir::cdUp does not do anything for directories that do not exist. Change-Id: I5ee559a663380f293046eded7a2c3efbb1023776 Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/plugininstallwizard.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/coreplugin/plugininstallwizard.cpp') diff --git a/src/plugins/coreplugin/plugininstallwizard.cpp b/src/plugins/coreplugin/plugininstallwizard.cpp index c91629e5aa..e2bc69fb41 100644 --- a/src/plugins/coreplugin/plugininstallwizard.cpp +++ b/src/plugins/coreplugin/plugininstallwizard.cpp @@ -63,7 +63,7 @@ struct Data { FilePath sourcePath; FilePath extractedPath; - bool installIntoApplication; + bool installIntoApplication = false; }; static QStringList libraryNameFilter() @@ -353,7 +353,7 @@ public: vlayout->addSpacing(10); auto localInstall = new QRadioButton(PluginInstallWizard::tr("User plugins")); - localInstall->setChecked(true); + localInstall->setChecked(!m_data->installIntoApplication); auto localLabel = new QLabel( PluginInstallWizard::tr("The plugin will be available to all compatible %1 " "installations, but only for the current user.") @@ -367,6 +367,7 @@ public: auto appInstall = new QRadioButton( PluginInstallWizard::tr("%1 installation").arg(Constants::IDE_DISPLAY_NAME)); + appInstall->setChecked(m_data->installIntoApplication); auto appLabel = new QLabel( PluginInstallWizard::tr("The plugin will be available only to this %1 " "installation, but for all users that can access it.") -- cgit v1.2.1