Commit c6c091ab authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Remove StandardFileWizardFactory



This class is now unused.

Clean up includes of basefilefactory.h (and surrounding includes)
while at it.

Change-Id: I7d4f695b5ebf9ef0a32d523442084d0591f12d02
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 3191aac8
......@@ -491,47 +491,6 @@ QString BaseFileWizardFactory::preferredSuffix(const QString &mimeType)
\sa Core::Internal::WizardEventLoop
*/
/*!
\fn Core::GeneratedFiles Core::StandardFileWizard::generateFilesFromPath(const QString &path,
const QString &name,
QString *errorMessage) const = 0
Creates the files with the \a name under the \a path.
*/
/*!
Creates a Utils::FileWizardDialog.
*/
BaseFileWizard *StandardFileWizardFactory::create(QWidget *parent, const WizardDialogParameters &parameters) const
{
BaseFileWizard *wizard = new BaseFileWizard(parent);
wizard->setWindowTitle(tr("New %1").arg(displayName()));
Utils::FileWizardPage *page = new Utils::FileWizardPage;
if (parameters.flags().testFlag(WizardDialogParameters::ForceCapitalLetterForFileName))
page->setForceFirstCapitalLetterForFileName(true);
page->setPath(parameters.defaultPath());
wizard->addPage(page);
foreach (QWizardPage *p, parameters.extensionPages())
wizard->addPage(p);
return wizard;
}
/*!
Retrieves \a path and \a fileName and calls \c generateFilesFromPath().
*/
GeneratedFiles StandardFileWizardFactory::generateFiles(const QWizard *w,
QString *errorMessage) const
{
const Utils::Wizard *wizard = qobject_cast<const Utils::Wizard *>(w);
Utils::FileWizardPage *page = wizard->find<Utils::FileWizardPage>();
QTC_ASSERT(page, return GeneratedFiles());
return generateFilesFromPath(page->path(), page->fileName(), errorMessage);
}
} // namespace Core
#include "basefilewizardfactory.moc"
......@@ -133,17 +133,6 @@ protected:
static bool postGenerateOpenEditors(const GeneratedFiles &l, QString *errorMessage = 0);
};
class CORE_EXPORT StandardFileWizardFactory : public BaseFileWizardFactory
{
Q_OBJECT
protected:
BaseFileWizard *create(QWidget *parent, const WizardDialogParameters &parameters) const;
GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
virtual GeneratedFiles generateFilesFromPath(const QString &path, const QString &name,
QString *errorMessage) const = 0;
};
} // namespace Core
Q_DECLARE_OPERATORS_FOR_FLAGS(Core::GeneratedFile::Attributes)
......
......@@ -33,10 +33,6 @@
#include <designer/formtemplatewizardpage.h>
#include <qtsupport/codegenerator.h>
#include <coreplugin/basefilewizardfactory.h>
#include <QDebug>
enum { FormPageId, ClassPageId };
namespace Designer {
......
......@@ -30,12 +30,10 @@
#include "formwizarddialog.h"
#include "formtemplatewizardpage.h"
#include <coreplugin/basefilewizardfactory.h>
#include <qtsupport/codegenerator.h>
#include <utils/filewizardpage.h>
#include <QDebug>
#include <QAbstractButton>
// Make sure there is a gap before the extension pages
......
......@@ -30,7 +30,7 @@
#ifndef CUSTOMWIZARDPARAMETERS_H
#define CUSTOMWIZARDPARAMETERS_H
#include <coreplugin/basefilewizardfactory.h>
#include <coreplugin/iwizardfactory.h>
#include <QStringList>
#include <QMap>
......
......@@ -31,7 +31,6 @@
#include "pythonclassnamepage.h"
#include <utils/newclasswidget.h>
#include <coreplugin/basefilewizardfactory.h>
namespace PythonEditor {
namespace Internal {
......
......@@ -30,12 +30,11 @@
#include "plugingenerator.h"
#include "pluginoptions.h"
#include <coreplugin/basefilewizardfactory.h>
#include <coreplugin/generatedfile.h>
#include <cpptools/abstracteditorsupport.h>
#include <utils/fileutils.h>
#include <cpptools/abstracteditorsupport.h>
#include <QFileInfo>
#include <QDir>
#include <QSet>
......
......@@ -35,7 +35,7 @@
#include <QPair>
#ifndef CREATORLESSTEST
#include <coreplugin/basefilewizardfactory.h>
# include <coreplugin/generatedfile.h>
#endif // CREATORLESSTEST
QT_FORWARD_DECLARE_CLASS(QTextStream)
......
......@@ -32,6 +32,8 @@
#include "abstractmobileapp.h"
#include <QStringList>
namespace QmakeProjectManager {
namespace Internal {
......
......@@ -29,13 +29,11 @@
#include "qmlapp.h"
#include <coreplugin/basefilewizardfactory.h>
#include <coreplugin/icore.h>
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QDebug>
#include <QDir>
#include <QTextStream>
......
......@@ -31,8 +31,6 @@
#include "basecheckoutwizardfactory.h"
#include "checkoutprogresswizardpage.h"
#include <coreplugin/basefilewizardfactory.h>
#include <utils/qtcassert.h>
#include <QPushButton>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment