forked from qt-creator/qt-creator
BaseFileWizardFactory: Remove ExtensionList type and extensions() method
Change-Id: Ia68924fac19739e26ddb1c660eb23d2df3e5b0c1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -177,20 +177,15 @@ void WizardEventLoop::rejected()
|
|||||||
\sa Core::Internal::WizardEventLoop
|
\sa Core::Internal::WizardEventLoop
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BaseFileWizardFactory::ExtensionList BaseFileWizardFactory::extensions() const
|
|
||||||
{
|
|
||||||
return ExtensionSystem::PluginManager::getObjects<IFileWizardExtension>();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues)
|
void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &extraValues)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!path.isEmpty(), return);
|
QTC_ASSERT(!path.isEmpty(), return);
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
// Compile extension pages, purge out unused ones
|
// Compile extension pages, purge out unused ones
|
||||||
ExtensionList extensionList = extensions();
|
QList<IFileWizardExtension *> extensionList = ExtensionSystem::PluginManager::getObjects<IFileWizardExtension>();
|
||||||
WizardPageList allExtensionPages;
|
WizardPageList allExtensionPages;
|
||||||
for (ExtensionList::iterator it = extensionList.begin(); it != extensionList.end(); ) {
|
for (auto it = extensionList.begin(); it != extensionList.end(); ) {
|
||||||
const WizardPageList extensionPages = (*it)->extensionPages(this);
|
const WizardPageList extensionPages = (*it)->extensionPages(this);
|
||||||
if (extensionPages.empty()) {
|
if (extensionPages.empty()) {
|
||||||
it = extensionList.erase(it);
|
it = extensionList.erase(it);
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ namespace Utils { class Wizard; }
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
class BaseFileWizard;
|
class BaseFileWizard;
|
||||||
class IFileWizardExtension;
|
|
||||||
|
|
||||||
class CORE_EXPORT WizardDialogParameters
|
class CORE_EXPORT WizardDialogParameters
|
||||||
{
|
{
|
||||||
@@ -117,9 +116,6 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef QList<QWizardPage *> WizardPageList;
|
typedef QList<QWizardPage *> WizardPageList;
|
||||||
typedef QList<Core::IFileWizardExtension*> ExtensionList;
|
|
||||||
|
|
||||||
virtual ExtensionList extensions() const;
|
|
||||||
|
|
||||||
virtual BaseFileWizard *create(QWidget *parent, const WizardDialogParameters ¶meters) const = 0;
|
virtual BaseFileWizard *create(QWidget *parent, const WizardDialogParameters ¶meters) const = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user