remove last traces of js support

don't even complain about trying to use js-based feature files. we have
been doing that for long enough.

Change-Id: Ib58ec204322442c488e8d780989f26b1e32595ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-04-18 12:09:48 +02:00
parent 0202e15617
commit 7d44bd0646
3 changed files with 10 additions and 28 deletions

View File

@ -54,7 +54,6 @@ QT_BEGIN_NAMESPACE
//convenience //convenience
const char *Option::application_argv0 = 0; const char *Option::application_argv0 = 0;
QString Option::prf_ext; QString Option::prf_ext;
QString Option::js_ext;
QString Option::prl_ext; QString Option::prl_ext;
QString Option::libtool_ext; QString Option::libtool_ext;
QString Option::pkgcfg_ext; QString Option::pkgcfg_ext;
@ -422,7 +421,6 @@ Option::init(int argc, char **argv)
Option::libtool_ext = ".la"; Option::libtool_ext = ".la";
Option::pkgcfg_ext = ".pc"; Option::pkgcfg_ext = ".pc";
Option::prf_ext = ".prf"; Option::prf_ext = ".prf";
Option::js_ext = ".js";
Option::ui_ext = ".ui"; Option::ui_ext = ".ui";
Option::h_ext << ".h" << ".hpp" << ".hh" << ".hxx"; Option::h_ext << ".h" << ".hpp" << ".hh" << ".hxx";
Option::c_ext << ".c"; Option::c_ext << ".c";

View File

@ -72,7 +72,6 @@ void warn_msg(QMakeWarn t, const char *fmt, ...);
struct Option struct Option
{ {
//simply global convenience //simply global convenience
static QString js_ext;
static QString libtool_ext; static QString libtool_ext;
static QString pkgcfg_ext; static QString pkgcfg_ext;
static QString prf_ext; static QString prf_ext;

View File

@ -1690,7 +1690,6 @@ QMakeProject::doProjectTest(QString func, const QString &params,
QMakeProject::IncludeStatus QMakeProject::IncludeStatus
QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QStringList> &place) QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QStringList> &place)
{ {
enum { UnknownFormat, ProFormat, JSFormat } format = UnknownFormat;
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;
@ -1722,18 +1721,13 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
} }
for(int root = start_root; root < feature_roots->size(); ++root) { for(int root = start_root; root < feature_roots->size(); ++root) {
QString prf(feature_roots->at(root) + QLatin1Char('/') + file); QString prf(feature_roots->at(root) + QLatin1Char('/') + file);
if(QFile::exists(prf + Option::js_ext)) { if (QFile::exists(prf)) {
format = JSFormat;
file = prf + Option::js_ext;
break;
} else if(QFile::exists(prf)) {
format = ProFormat;
file = prf; file = prf;
break; goto foundf;
} }
} }
if(format == UnknownFormat)
return IncludeNoExist; return IncludeNoExist;
foundf: ;
} }
if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1) if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1)
return IncludeFeatureAlreadyLoaded; return IncludeFeatureAlreadyLoaded;
@ -1751,19 +1745,13 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
testName += file; testName += file;
if(QFile::exists(testName)) { if(QFile::exists(testName)) {
file = testName; file = testName;
break; goto foundi;
} }
} }
}
if(format == UnknownFormat) {
if(QFile::exists(file)) {
if(file.endsWith(Option::js_ext))
format = JSFormat;
else
format = ProFormat;
} else {
return IncludeNoExist; return IncludeNoExist;
} foundi: ;
} else if (!QFile::exists(file)) {
return IncludeNoExist;
} }
if(Option::mkfile::do_preprocess) //nice to see this first.. if(Option::mkfile::do_preprocess) //nice to see this first..
fprintf(stderr, "#switching file %s(%s) - %s:%d\n", (flags & IncludeFlagFeature) ? "load" : "include", fprintf(stderr, "#switching file %s(%s) - %s:%d\n", (flags & IncludeFlagFeature) ? "load" : "include",
@ -1783,10 +1771,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
} }
bool parsed = false; bool parsed = false;
parser_info pi = parser; parser_info pi = parser;
if(format == JSFormat) { {
warn_msg(WarnParser, "%s:%d: QtScript support disabled for %s.",
pi.file.toLatin1().constData(), pi.line_no, orig_file.toLatin1().constData());
} else {
if(flags & (IncludeFlagNewProject|IncludeFlagNewParser)) { if(flags & (IncludeFlagNewProject|IncludeFlagNewParser)) {
// The "project's variables" are used in other places (eg. export()) so it's not // The "project's variables" are used in other places (eg. export()) so it's not
// possible to use "place" everywhere. Instead just set variables and grab them later // possible to use "place" everywhere. Instead just set variables and grab them later