summaryrefslogtreecommitdiff
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-08-28 10:12:36 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-05 03:03:12 +0200
commitb32f3ba9e4d9a24ddb10c6c5901e2d299aea23ca (patch)
treeab7f51ee0cdb59581b768c0900d615faa57bddc4 /qmake/project.cpp
parent791cb024637e865e98b336bc63b8e1fcbae3befc (diff)
downloadqtbase-b32f3ba9e4d9a24ddb10c6c5901e2d299aea23ca.tar.gz
remove pretenses of supporting projects on stdin
this may have worked a decade ago, but now it only produces funny Makefiles (and needs hacking main.cpp). the feature doesn't seem *too* important, so just clean it out. Change-Id: I50a60b0e30341f0b523e4a5731c770c9c1013f8b Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index a97d4accce..4f26db8bb0 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1279,13 +1279,9 @@ QMakeProject::read(const QString &file, QHash<QString, QStringList> &place)
const QString oldpwd = qmake_getpwd();
QString filename = Option::normalizePath(file, false);
- bool ret = false, using_stdin = false;
+ bool ret = false;
QFile qfile;
- if(filename == QLatin1String("-")) {
- qfile.setFileName("");
- ret = qfile.open(stdin, QIODevice::ReadOnly);
- using_stdin = true;
- } else if(QFileInfo(file).isDir()) {
+ if (QFileInfo(file).isDir()) {
return false;
} else {
qfile.setFileName(filename);
@@ -1306,8 +1302,7 @@ QMakeProject::read(const QString &file, QHash<QString, QStringList> &place)
QTextStream t(&qfile);
ret = read(t, place);
}
- if(!using_stdin)
- qfile.close();
+ qfile.close();
}
if (!need_restart && scope_blocks.count() != 1) {
qmake_error_msg("Unterminated conditional block at end of file");
@@ -1561,7 +1556,7 @@ QMakeProject::read(uchar cmd)
if(cmd & ReadProFile) { // parse project file
debug_msg(1, "Project file: reading %s", pfile.toLatin1().constData());
- if(pfile != "-" && !QFile::exists(pfile) && !pfile.endsWith(Option::pro_ext))
+ if (!QFile::exists(pfile) && !pfile.endsWith(Option::pro_ext))
pfile += Option::pro_ext;
if(!read(pfile, vars))
return false;
@@ -1627,8 +1622,7 @@ void
QMakeProject::setupProject()
{
setTemplate(vars["TEMPLATE"]);
- if (pfile != "-")
- vars["TARGET"] << QFileInfo(pfile).baseName();
+ vars["TARGET"] << QFileInfo(pfile).baseName();
vars["_PRO_FILE_"] << pfile;
vars["_PRO_FILE_PWD_"] << (pfile.isEmpty() ? qmake_getpwd() : QFileInfo(pfile).absolutePath());
vars["OUT_PWD"] << Option::output_dir;
@@ -2640,7 +2634,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
if(args.count() != 1) {
fprintf(stderr, "%s:%d prompt(question) requires one argument.\n",
parser.file.toLatin1().constData(), parser.line_no);
- } else if(pfile == "-") {
+ } else if (Option::output.fileName() == "-") {
fprintf(stderr, "%s:%d prompt(question) cannot be used when '-o -' is used.\n",
parser.file.toLatin1().constData(), parser.line_no);
} else {