From 599b03179e392b97023c6ebca98faa514967841a Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 4 Jul 2019 11:30:56 +0200 Subject: [PATCH] QmakeProjectManager: Take "executable" CONFIG value into account MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... when setting up deployment data. Fixes: QTCREATORBUG-22663 Change-Id: I88c428177b76a7bb59fc884c0b727fd0f26a780f Reviewed-by: Jörg Bornemann --- src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp | 7 ++++--- src/plugins/qmakeprojectmanager/qmakeparsernodes.h | 5 +++-- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index c9fce5bb9ad..9ce44864302 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -1860,8 +1860,9 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader, bool fixInstallPrefix = (installPrefix != devInstallPrefix); foreach (const QString &item, itemList) { - bool active = !reader->values(item + QLatin1String(".CONFIG")) - .contains(QLatin1String("no_default_install")); + const QStringList config = reader->values(item + ".CONFIG"); + const bool active = !config.contains("no_default_install"); + const bool executable = config.contains("executable"); const QString pathVar = item + QLatin1String(".path"); const QStringList &itemPaths = reader->values(pathVar); if (itemPaths.count() != 1) { @@ -1889,7 +1890,7 @@ InstallsList QmakeProFile::installsList(const QtSupport::ProFileReader *reader, } else { const auto &itemFiles = reader->fixifiedValues( item + QLatin1String(".files"), projectDir, buildDir, true); - result.items << InstallsItem(itemPath, itemFiles, active); + result.items << InstallsItem(itemPath, itemFiles, active, executable); } } return result; diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h index 3827957d576..76caaa09273 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.h +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.h @@ -265,11 +265,12 @@ public: class QMAKEPROJECTMANAGER_EXPORT InstallsItem { public: InstallsItem() = default; - InstallsItem(QString p, QVector f, bool a) - : path(p), files(f), active(a) {} + InstallsItem(QString p, QVector f, bool a, bool e) + : path(p), files(f), active(a), executable(e) {} QString path; QVector files; bool active = false; + bool executable = false; }; class QMAKEPROJECTMANAGER_EXPORT InstallsList { diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index dee31c56af7..c19016e7416 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1062,8 +1062,10 @@ void QmakeProject::collectData(const QmakeProFile *file, DeploymentData &deploym for (const InstallsItem &item : installsList.items) { if (!item.active) continue; - foreach (const auto &localFile, item.files) - deploymentData.addFile(localFile.fileName, item.path); + for (const auto &localFile : item.files) { + deploymentData.addFile(localFile.fileName, item.path, item.executable + ? DeployableFile::TypeExecutable : DeployableFile::TypeNormal); + } } switch (file->projectType()) {