summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-07-24 13:23:48 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-07-30 19:38:38 +0200
commitbae184532dde3b8d46bd90d060377ab06dc62644 (patch)
tree4947320da0adb5246b152be204d77b7496b8b25e /qmake/generators
parentca972866e2263e1d393cd3fb5f88ca2c4b1b9d8a (diff)
Xcode: Don't show QMAKE_INTERNAL_INCLUDED_FILES from Qt (prf/pri)
We build "Supporting Files" out of QMAKE_INTERNAL_INCLUDED_FILES, which is really not supposed to be exposed to the user like that, but since the variable will hold user-included pri files eg., the Xcode generator piggy-backs on this variable to list the files. To make the project view in Xcode a bit cleaner we explicitly exclude any file living inside the Qt directory, meaning we won't show all the pri and prf files from Qt's mkspecs directory anymore. Change-Id: I828700aceac5fdf3ea2b27d9ba3885543c2ad137 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 0b8761180d..70ac77f5da 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -463,10 +463,16 @@ ProjectBuilderSources::files(QMakeProject *project) const
{
QStringList ret = project->values(ProKey(key)).toQStringList();
if(key == "QMAKE_INTERNAL_INCLUDED_FILES") {
+ QString qtPrefix(QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath, QLibraryInfo::EffectivePaths) + '/');
+ QString qtSrcPrefix(QLibraryInfo::rawLocation(QLibraryInfo::PrefixPath, QLibraryInfo::EffectiveSourcePaths) + '/');
+
QStringList newret;
for(int i = 0; i < ret.size(); ++i) {
- if(!ret.at(i).endsWith(Option::prf_ext))
- newret.append(ret.at(i));
+ // Don't show files "internal" to Qt in Xcode
+ if (ret.at(i).startsWith(qtPrefix) || ret.at(i).startsWith(qtSrcPrefix))
+ continue;
+
+ newret.append(ret.at(i));
}
ret = newret;
}
@@ -567,6 +573,9 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
// doesn't have access to any of the information it needs to resolve relative paths.
project->values("QMAKE_INTERNAL_INCLUDED_FILES").prepend(fileFixify(project->projectFile(), qmake_getpwd(), input_dir));
+ // Since we can't fileFixify inside ProjectBuilderSources::files(), we resolve the absolute paths here
+ project->values("QMAKE_INTERNAL_INCLUDED_FILES") = ProStringList(fileFixify(project->values("QMAKE_INTERNAL_INCLUDED_FILES").toQStringList(), FileFixifyAbsolute));
+
//DUMP SOURCES
QMap<QString, ProStringList> groups;
QList<ProjectBuilderSources> sources;