remove support for loading features relative to current directory

it's completely counterproductive. just include() the file instead.
i don't think anyone knew about this "feature", so just removing it.

as a side effect this removes the repeated existence check of already
found feature files, as we can use a clean else-if cascade.

Change-Id: I5d38d38d0a897f2e8857ac68d5649fd4367941c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-04-18 12:26:25 +02:00
parent 4753958db7
commit 32bc46a90b

View File

@ -1698,7 +1698,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
if(flags & IncludeFlagFeature) { if(flags & IncludeFlagFeature) {
if(!file.endsWith(Option::prf_ext)) if(!file.endsWith(Option::prf_ext))
file += Option::prf_ext; file += Option::prf_ext;
if(file.indexOf(QLatin1Char('/')) == -1 || !QFile::exists(file)) { {
QStringList *&feature_roots = all_feature_roots[host_build]; QStringList *&feature_roots = all_feature_roots[host_build];
if(!feature_roots) { if(!feature_roots) {
feature_roots = new QStringList; feature_roots = new QStringList;
@ -1736,8 +1736,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1) if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1)
return IncludeFeatureAlreadyLoaded; return IncludeFeatureAlreadyLoaded;
place["QMAKE_INTERNAL_INCLUDED_FEATURES"].append(file); place["QMAKE_INTERNAL_INCLUDED_FEATURES"].append(file);
} } else if (QDir::isRelativePath(file)) {
if(QDir::isRelativePath(file)) {
QStringList include_roots; QStringList include_roots;
if(Option::output_dir != qmake_getpwd()) if(Option::output_dir != qmake_getpwd())
include_roots << qmake_getpwd(); include_roots << qmake_getpwd();