Commit 5337b34e authored by Christian Kandeler's avatar Christian Kandeler
Browse files

RemoteLinux: Respect "no_default_install" CONFIG setting.



Files with this configuration will be excluded from the list of
deployables, including the build target.

Change-Id: Id1f31ee356916669eb71e911da92d02d84891087
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@nokia.com>
parent 8c5479eb
......@@ -2342,6 +2342,8 @@ void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
return;
const QStringList &itemList = reader->values(QLatin1String("INSTALLS"));
foreach (const QString &item, itemList) {
if (reader->values(item + QLatin1String(".CONFIG")).contains(QLatin1String("no_default_install")))
continue;
QString itemPath;
const QString pathVar = item + QLatin1String(".path");
const QStringList &itemPaths = reader->values(pathVar);
......@@ -2360,9 +2362,6 @@ void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
= reader->absoluteFileValues(item + QLatin1String(".files"),
m_projectDir, QStringList() << m_projectDir, 0);
if (item == QLatin1String("target")) {
if (!m_installsList.targetPath.isEmpty())
qDebug("%s: Overwriting existing target.path in INSTALLS list.",
qPrintable(m_projectFilePath));
m_installsList.targetPath = itemPath;
} else {
if (itemFiles.isEmpty()) {
......
......@@ -77,15 +77,18 @@ DeployableFilesPerProFile::DeployableFilesPerProFile(const Qt4ProFileNode *proFi
const QString &installPrefix, QObject *parent)
: QAbstractTableModel(parent), d(new DeployableFilesPerProFilePrivate(proFileNode))
{
if (d->projectType == ApplicationTemplate) {
d->deployables.prepend(DeployableFile(localExecutableFilePath(),
d->installsList.targetPath));
} else if (d->projectType == LibraryTemplate) {
foreach (const QString &filePath, localLibraryFilePaths()) {
d->deployables.prepend(DeployableFile(filePath,
d->installsList.targetPath));
if (hasTargetPath()) {
if (d->projectType == ApplicationTemplate) {
d->deployables.prepend(DeployableFile(localExecutableFilePath(),
d->installsList.targetPath));
} else if (d->projectType == LibraryTemplate) {
foreach (const QString &filePath, localLibraryFilePaths()) {
d->deployables.prepend(DeployableFile(filePath,
d->installsList.targetPath));
}
}
}
foreach (const InstallsItem &elem, d->installsList.items) {
foreach (const QString &file, elem.files)
d->deployables << DeployableFile(file, elem.path);
......@@ -123,21 +126,10 @@ QVariant DeployableFilesPerProFile::data(const QModelIndex &index, int role) con
if (!index.isValid() || index.row() >= rowCount())
return QVariant();
if (d->projectType != AuxTemplate && !hasTargetPath() && index.row() == 0
&& index.column() == 1) {
if (role == Qt::DisplayRole)
return tr("<no target path set>");
if (role == Qt::ForegroundRole) {
QBrush brush;
brush.setColor("red");
return brush;
}
}
const DeployableFile &d = deployableAt(index.row());
if (index.column() == 0 && role == Qt::DisplayRole)
return QDir::toNativeSeparators(d.localFilePath);
if (role == Qt::DisplayRole || role == Qt::EditRole)
if (role == Qt::DisplayRole)
return QDir::cleanPath(d.remoteDir);
return QVariant();
}
......@@ -205,4 +197,5 @@ QString DeployableFilesPerProFile::projectName() const { return d->projectName;
QString DeployableFilesPerProFile::proFilePath() const { return d->proFilePath; }
Qt4ProjectType DeployableFilesPerProFile::projectType() const { return d->projectType; }
QString DeployableFilesPerProFile::applicationName() const { return d->targetInfo.target; }
} // namespace RemoteLinux
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