forked from qt-creator/qt-creator
Implement adding new project into opened subdirs project
Reviewed-by: dt <qtc-committer@nokia.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user