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 <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2021-02-12 15:36:07 +01:00
parent 6009673a2d
commit 2197eeb4aa
2 changed files with 5 additions and 5 deletions

View File

@@ -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.")