forked from qt-creator/qt-creator
On new generic project, show progress and dialog
Task-Nr: QTCREATORBUG-2226 Change-Id: I62e1c740a008663396960cfc12a05202f8800892 Reviewed-on: http://codereview.qt.nokia.com/594 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "genericprojectwizard.h"
|
||||
#include "filesselectionwizardpage.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
@@ -69,8 +70,15 @@ GenericProjectWizardDialog::GenericProjectWizardDialog(QWidget *parent)
|
||||
m_firstPage->setFileNameLabel(tr("Project name:"));
|
||||
m_firstPage->setPathLabel(tr("Location:"));
|
||||
|
||||
// second page
|
||||
m_secondPage = new FilesSelectionWizardPage(this);
|
||||
m_secondPage->setTitle(tr("File Selection"));
|
||||
|
||||
const int firstPageId = addPage(m_firstPage);
|
||||
wizardProgress()->item(firstPageId)->setTitle(tr("Location"));
|
||||
|
||||
const int secondPageId = addPage(m_secondPage);
|
||||
wizardProgress()->item(secondPageId)->setTitle(tr("Files"));
|
||||
}
|
||||
|
||||
GenericProjectWizardDialog::~GenericProjectWizardDialog()
|
||||
@@ -81,6 +89,16 @@ QString GenericProjectWizardDialog::path() const
|
||||
return m_firstPage->path();
|
||||
}
|
||||
|
||||
QStringList GenericProjectWizardDialog::selectedPaths() const
|
||||
{
|
||||
return m_secondPage->selectedPaths();
|
||||
}
|
||||
|
||||
QStringList GenericProjectWizardDialog::selectedFiles() const
|
||||
{
|
||||
return m_secondPage->selectedFiles();
|
||||
}
|
||||
|
||||
void GenericProjectWizardDialog::setPath(const QString &path)
|
||||
{
|
||||
m_firstPage->setPath(path);
|
||||
@@ -188,15 +206,12 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
|
||||
const QString filesFileName = QFileInfo(dir, projectName + QLatin1String(".files")).absoluteFilePath();
|
||||
const QString includesFileName = QFileInfo(dir, projectName + QLatin1String(".includes")).absoluteFilePath();
|
||||
const QString configFileName = QFileInfo(dir, projectName + QLatin1String(".config")).absoluteFilePath();
|
||||
const QStringList sources = wizard->selectedFiles();
|
||||
const QStringList paths = wizard->selectedPaths();
|
||||
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
Core::MimeDatabase *mimeDatabase = core->mimeDatabase();
|
||||
|
||||
const QStringList suffixes = mimeDatabase->suffixes();
|
||||
|
||||
QStringList sources, paths;
|
||||
getFileList(dir, projectPath, suffixes, &sources, &paths);
|
||||
|
||||
Core::MimeType headerTy = mimeDatabase->findByType(QLatin1String("text/x-chdr"));
|
||||
|
||||
QStringList nameFilters;
|
||||
|
||||
Reference in New Issue
Block a user