forked from qt-creator/qt-creator
Core: Export Core::executePluginInstallWizard
ExtensionManager wants to execute the wizard, but it lives in another plugin. This change exports the former Core::PluginInstallWizard::exec as Core::executePluginInstallWizard Change-Id: I3ba068e9c8351355abfedfb9f6d6879de55b0534 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -98,7 +98,7 @@ void PluginDialog::closeDialog()
|
||||
|
||||
void PluginDialog::showInstallWizard()
|
||||
{
|
||||
if (PluginInstallWizard::exec())
|
||||
if (executePluginInstallWizard())
|
||||
m_isRestartRequired = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ static FilePath pluginInstallPath(bool installIntoApplication)
|
||||
}
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class SourcePage : public WizardPage
|
||||
{
|
||||
@@ -145,7 +144,7 @@ struct ArchiveIssue
|
||||
// Async. Result is set if any issue was found.
|
||||
void checkContents(QPromise<ArchiveIssue> &promise, const FilePath &tempDir)
|
||||
{
|
||||
PluginSpec *coreplugin = PluginManager::specForPlugin(CorePlugin::instance());
|
||||
PluginSpec *coreplugin = PluginManager::specForPlugin(Internal::CorePlugin::instance());
|
||||
|
||||
// look for plugin
|
||||
QDirIterator it(tempDir.path(), libraryNameFilter(), QDir::Files | QDir::NoSymLinks,
|
||||
@@ -397,7 +396,7 @@ static bool copyPluginFile(const FilePath &src, const FilePath &dest)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PluginInstallWizard::exec(const FilePath &archive)
|
||||
bool executePluginInstallWizard(const FilePath &archive)
|
||||
{
|
||||
Wizard wizard(ICore::dialogParent());
|
||||
wizard.setWindowTitle(Tr::tr("Install Plugin"));
|
||||
@@ -442,5 +441,4 @@ bool PluginInstallWizard::exec(const FilePath &archive)
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
|
||||
@@ -3,18 +3,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core_global.h"
|
||||
|
||||
#include <utils/filepath.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class PluginInstallWizard
|
||||
{
|
||||
public:
|
||||
static bool exec(const Utils::FilePath &archive = {});
|
||||
};
|
||||
CORE_EXPORT bool executePluginInstallWizard(const Utils::FilePath &archive = {});
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Core
|
||||
|
||||
Reference in New Issue
Block a user