Commit 95824dc2 authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

fix usage of removed DEPLOYMENT property in Qt 5



For DEPLOYMENT, foo.sources has been superseded by
foo.files in Qt 5.

Change-Id: I8a357aca0969b7caa94b9e9ed63613064ba86299
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent e77bb8af
......@@ -600,9 +600,13 @@ void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader
InternalNode contents;
ProjectExplorer::Target *t = m_project->activeTarget();
ProjectExplorer::Kit *k = t ? t->kit() : ProjectExplorer::KitManager::instance()->defaultKit();
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k);
// Figure out DEPLOYMENT and INSTALL folders
QStringList folders;
QStringList dynamicVariables = dynamicVarNames(readerExact, readerCumulative);
QStringList dynamicVariables = dynamicVarNames(readerExact, readerCumulative, qtVersion);
if (includeFileExact)
foreach (const QString &dynamicVar, dynamicVariables) {
folders += readerExact->values(dynamicVar, includeFileExact);
......@@ -1253,12 +1257,14 @@ QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type)
}
QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative)
QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
QtSupport::BaseQtVersion *qtVersion)
{
QStringList result;
// Figure out DEPLOYMENT and INSTALLS
const QString deployment = QLatin1String("DEPLOYMENT");
const QString sources = QLatin1String(".sources");
const QString sources = QLatin1String(qtVersion && qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0) ? ".sources" : ".files");
QStringList listOfVars = readerExact->values(deployment);
foreach (const QString &var, listOfVars) {
result << (var + sources);
......
......@@ -53,6 +53,7 @@ class ICore;
}
namespace QtSupport {
class BaseQtVersion;
class ProFileReader;
}
......@@ -169,7 +170,7 @@ public:
protected:
void setIncludedInExactParse(bool b);
static QStringList varNames(FileType type);
static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative);
static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, QtSupport::BaseQtVersion *qtVersion);
static QSet<Utils::FileName> filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);
static QSet<Utils::FileName> filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);
......
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