Implement adding new project into opened subdirs project

Reviewed-by: dt <qtc-committer@nokia.com>
This commit is contained in:
Jarek Kobus
2010-08-26 18:33:16 +02:00
parent fc1be8b488
commit 1cefde9e45
30 changed files with 271 additions and 46 deletions

View File

@@ -179,6 +179,12 @@ QList<ProjectExplorer::ProjectNode::ProjectAction> GenericProjectNode::supported
<< RemoveFile;
}
bool GenericProjectNode::canAddSubProject(const QString &proFilePath) const
{
Q_UNUSED(proFilePath)
return false;
}
bool GenericProjectNode::addSubProjects(const QStringList &proFilePaths)
{
Q_UNUSED(proFilePaths)

View File

@@ -57,6 +57,8 @@ public:
virtual QList<ProjectExplorer::ProjectNode::ProjectAction> supportedActions(Node *node) const;
virtual bool canAddSubProject(const QString &proFilePath) const;
virtual bool addSubProjects(const QStringList &proFilePaths);
virtual bool removeSubProjects(const QStringList &proFilePaths);

View File

@@ -231,6 +231,17 @@ Core::GeneratedFiles GenericProjectWizard::generateFiles(const QWizard *w,
return files;
}
QString GenericProjectWizard::generatedProjectFilePath(const QWizard *w) const
{
const GenericProjectWizardDialog *wizard = qobject_cast<const GenericProjectWizardDialog *>(w);
const QString projectPath = wizard->path();
const QDir dir(projectPath);
const QString projectName = wizard->projectName();
const QString creatorFileName = QFileInfo(dir, projectName + QLatin1String(".creator")).absoluteFilePath();
return creatorFileName;
}
bool GenericProjectWizard::postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage)
{
Q_UNUSED(w);

View File

@@ -81,6 +81,8 @@ protected:
virtual Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const;
virtual QString generatedProjectFilePath(const QWizard *w) const;
virtual bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
bool isValidDir(const QFileInfo &fileInfo) const;