forked from qt-creator/qt-creator
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: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -2342,6 +2342,8 @@ void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
|
|||||||
return;
|
return;
|
||||||
const QStringList &itemList = reader->values(QLatin1String("INSTALLS"));
|
const QStringList &itemList = reader->values(QLatin1String("INSTALLS"));
|
||||||
foreach (const QString &item, itemList) {
|
foreach (const QString &item, itemList) {
|
||||||
|
if (reader->values(item + QLatin1String(".CONFIG")).contains(QLatin1String("no_default_install")))
|
||||||
|
continue;
|
||||||
QString itemPath;
|
QString itemPath;
|
||||||
const QString pathVar = item + QLatin1String(".path");
|
const QString pathVar = item + QLatin1String(".path");
|
||||||
const QStringList &itemPaths = reader->values(pathVar);
|
const QStringList &itemPaths = reader->values(pathVar);
|
||||||
@@ -2360,9 +2362,6 @@ void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
|
|||||||
= reader->absoluteFileValues(item + QLatin1String(".files"),
|
= reader->absoluteFileValues(item + QLatin1String(".files"),
|
||||||
m_projectDir, QStringList() << m_projectDir, 0);
|
m_projectDir, QStringList() << m_projectDir, 0);
|
||||||
if (item == QLatin1String("target")) {
|
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;
|
m_installsList.targetPath = itemPath;
|
||||||
} else {
|
} else {
|
||||||
if (itemFiles.isEmpty()) {
|
if (itemFiles.isEmpty()) {
|
||||||
|
|||||||
@@ -77,15 +77,18 @@ DeployableFilesPerProFile::DeployableFilesPerProFile(const Qt4ProFileNode *proFi
|
|||||||
const QString &installPrefix, QObject *parent)
|
const QString &installPrefix, QObject *parent)
|
||||||
: QAbstractTableModel(parent), d(new DeployableFilesPerProFilePrivate(proFileNode))
|
: QAbstractTableModel(parent), d(new DeployableFilesPerProFilePrivate(proFileNode))
|
||||||
{
|
{
|
||||||
if (d->projectType == ApplicationTemplate) {
|
if (hasTargetPath()) {
|
||||||
d->deployables.prepend(DeployableFile(localExecutableFilePath(),
|
if (d->projectType == ApplicationTemplate) {
|
||||||
d->installsList.targetPath));
|
d->deployables.prepend(DeployableFile(localExecutableFilePath(),
|
||||||
} else if (d->projectType == LibraryTemplate) {
|
d->installsList.targetPath));
|
||||||
foreach (const QString &filePath, localLibraryFilePaths()) {
|
} else if (d->projectType == LibraryTemplate) {
|
||||||
d->deployables.prepend(DeployableFile(filePath,
|
foreach (const QString &filePath, localLibraryFilePaths()) {
|
||||||
d->installsList.targetPath));
|
d->deployables.prepend(DeployableFile(filePath,
|
||||||
|
d->installsList.targetPath));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const InstallsItem &elem, d->installsList.items) {
|
foreach (const InstallsItem &elem, d->installsList.items) {
|
||||||
foreach (const QString &file, elem.files)
|
foreach (const QString &file, elem.files)
|
||||||
d->deployables << DeployableFile(file, elem.path);
|
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())
|
if (!index.isValid() || index.row() >= rowCount())
|
||||||
return QVariant();
|
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());
|
const DeployableFile &d = deployableAt(index.row());
|
||||||
if (index.column() == 0 && role == Qt::DisplayRole)
|
if (index.column() == 0 && role == Qt::DisplayRole)
|
||||||
return QDir::toNativeSeparators(d.localFilePath);
|
return QDir::toNativeSeparators(d.localFilePath);
|
||||||
if (role == Qt::DisplayRole || role == Qt::EditRole)
|
if (role == Qt::DisplayRole)
|
||||||
return QDir::cleanPath(d.remoteDir);
|
return QDir::cleanPath(d.remoteDir);
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@@ -205,4 +197,5 @@ QString DeployableFilesPerProFile::projectName() const { return d->projectName;
|
|||||||
QString DeployableFilesPerProFile::proFilePath() const { return d->proFilePath; }
|
QString DeployableFilesPerProFile::proFilePath() const { return d->proFilePath; }
|
||||||
Qt4ProjectType DeployableFilesPerProFile::projectType() const { return d->projectType; }
|
Qt4ProjectType DeployableFilesPerProFile::projectType() const { return d->projectType; }
|
||||||
QString DeployableFilesPerProFile::applicationName() const { return d->targetInfo.target; }
|
QString DeployableFilesPerProFile::applicationName() const { return d->targetInfo.target; }
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
|||||||
Reference in New Issue
Block a user