Commit a577cb2b authored by Christian Kandeler's avatar Christian Kandeler
Browse files

RemoteLinux: Respect "no_deault_target" setting.



I.e. do not consider subprojects with that configuration for
deployment.

Change-Id: Ia04c8168480772ebf4026337ba0c81fba532f346
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 44d8e7be
......@@ -1792,9 +1792,10 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
QHash<QString, ProFile*> includeFilesExact;
QSet<QString> exactSubdirs;
ProFile *fileForCurrentProjectExact = 0;
QStringList subProjectsNotToDeploy;
if (evalResult == EvalOk) {
if (m_projectType == SubDirsTemplate) {
newProjectFilesExact = subDirsPaths(m_readerExact);
newProjectFilesExact = subDirsPaths(m_readerExact, &subProjectsNotToDeploy);
exactSubdirs = newProjectFilesExact.toSet();
}
foreach (ProFile *includeFile, m_readerExact->includeFiles()) {
......@@ -1968,6 +1969,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
m_qt4targetInformation = targetInformation(m_readerExact);
m_resolvedMkspecPath = m_project->proFileOption()->qmakespec;
m_subProjectsNotToDeploy = subProjectsNotToDeploy;
setupInstallsList(m_readerExact);
setupProjectVersion(m_readerExact);
......@@ -2203,7 +2205,7 @@ QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) con
return result;
}
QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader) const
QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy) const
{
QStringList subProjectPaths;
......@@ -2239,7 +2241,13 @@ QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader) const
}
if (QFile::exists(realFile)) {
subProjectPaths << QDir::cleanPath(realFile);
realFile = QDir::cleanPath(realFile);
subProjectPaths << realFile;
if (subProjectsNotToDeploy && !subProjectsNotToDeploy->contains(realFile)
&& reader->values(subDirVar + QLatin1String(".CONFIG"))
.contains(QLatin1String("no_default_target"))) {
subProjectsNotToDeploy->append(realFile);
}
} else {
m_project->proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'")
.arg(subDirVar).arg(realDir));
......
......@@ -360,6 +360,10 @@ public:
QStringList variableValue(const Qt4Variable var) const;
bool isSubProjectDeployable(const QString &filePath) const {
return !m_subProjectsNotToDeploy.contains(filePath);
}
void updateCodeModelSupportFromBuild(const QStringList &files);
void updateCodeModelSupportFromEditor(const QString &uiFileName, const QString &contents);
......@@ -423,7 +427,8 @@ private:
QString mocDirPath(QtSupport::ProFileReader *reader) const;
QStringList includePaths(QtSupport::ProFileReader *reader) const;
QStringList libDirectories(QtSupport::ProFileReader *reader) const;
QStringList subDirsPaths(QtSupport::ProFileReader *reader) const;
QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy = 0) const;
TargetInformation targetInformation(QtSupport::ProFileReader *reader) const;
void setupInstallsList(const QtSupport::ProFileReader *reader);
void setupProjectVersion(const QtSupport::ProFileReader *reader);
......@@ -435,6 +440,7 @@ private:
QMap<QString, QDateTime> m_uitimestamps;
TargetInformation m_qt4targetInformation;
QString m_resolvedMkspecPath;
QStringList m_subProjectsNotToDeploy;
InstallsList m_installsList;
ProjectVersion m_projectVersion;
friend class Qt4NodeHierarchy;
......
......@@ -109,8 +109,13 @@ void DeploymentInfo::createModels(const Qt4ProFileNode *proFileNode)
foreach (const ProjectExplorer::ProjectNode * const subProject, subProjects) {
const Qt4ProFileNode * const qt4SubProject
= qobject_cast<const Qt4ProFileNode *>(subProject);
if (qt4SubProject && !qt4SubProject->path().endsWith(QLatin1String(".pri")))
createModels(qt4SubProject);
if (!qt4SubProject)
continue;
if (qt4SubProject->path().endsWith(QLatin1String(".pri")))
continue;
if (!proFileNode->isSubProjectDeployable(subProject->path()))
continue;
createModels(qt4SubProject);
}
}
default:
......
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