Commit 793de72a authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Honour the default path passed to the generic project wizard

parent 2bc45cc8
......@@ -50,7 +50,7 @@ using namespace Core::Utils;
namespace {
class DirModel: public QDirModel
class DirModel : public QDirModel
{
public:
DirModel(QObject *parent)
......@@ -178,6 +178,11 @@ QString GenericProjectWizardDialog::path() const
return m_firstPage->path();
}
void GenericProjectWizardDialog::setPath(const QString &path)
{
m_firstPage->setPath(path);
}
QString GenericProjectWizardDialog::projectName() const
{
return m_firstPage->name();
......@@ -201,6 +206,7 @@ void GenericProjectWizardDialog::updateFilesView(const QModelIndex &current,
void GenericProjectWizardDialog::initializePage(int id)
{
Q_UNUSED(id)
#if 0
if (id == m_secondPageId) {
using namespace Core::Utils;
......@@ -251,6 +257,8 @@ QWizard *GenericProjectWizard::createWizardDialog(QWidget *parent,
GenericProjectWizardDialog *wizard = new GenericProjectWizardDialog(parent);
setupWizard(wizard);
wizard->setPath(defaultPath);
foreach (QWizardPage *p, extensionPages)
wizard->addPage(p);
......@@ -302,6 +310,8 @@ bool GenericProjectWizard::isValidDir(const QFileInfo &fileInfo) const
Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
QString *errorMessage) const
{
Q_UNUSED(errorMessage)
const GenericProjectWizardDialog *wizard = qobject_cast<const GenericProjectWizardDialog *>(w);
const QString projectPath = wizard->path();
const QDir dir(projectPath);
......
......@@ -64,6 +64,8 @@ public:
virtual ~GenericProjectWizardDialog();
QString path() const;
void setPath(const QString &path);
QString projectName() const;
private Q_SLOTS:
......
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