summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-05-26 11:54:40 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-05-26 17:40:20 (GMT)
commitc22dc63d5333c85afd167944675bfebec6b5c9a3 (patch)
tree42383f8dccb1e197344f85b5953e57997e8d0a67
parent44e33b3c8d776b66b2122eb3757177dfbd7baa4c (diff)
downloadQt-c22dc63d5333c85afd167944675bfebec6b5c9a3.zip
Qt-c22dc63d5333c85afd167944675bfebec6b5c9a3.tar.gz
Qt-c22dc63d5333c85afd167944675bfebec6b5c9a3.tar.bz2
complain about unescaped backslashes
-rw-r--r--qmake/project.cpp6
-rw-r--r--qmake/project.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 2be68be..9cf6a6f 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -671,6 +671,7 @@ QMakeProject::reset()
scope_blocks.push(ScopeBlock());
iterator = 0;
function = 0;
+ backslashWarned = false;
}
bool
@@ -2933,6 +2934,11 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QMap<QString, QStringL
break;
}
}
+ if(!escape && !backslashWarned) {
+ backslashWarned = true;
+ warn_msg(WarnDeprecated, "%s:%d: Unescaped backslashes are deprecated.",
+ parser.file.toLatin1().constData(), parser.line_no);
+ }
if(escape || !replaced)
unicode =0;
} else if(!quote && (unicode == SINGLEQUOTE || unicode == DOUBLEQUOTE)) {
diff --git a/qmake/project.h b/qmake/project.h
index 0c542db..fd8ced1 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -80,6 +80,7 @@ class QMakeProject
bool recursive;
bool own_prop;
+ bool backslashWarned;
QString pfile, cfile;
QMakeProperty *prop;
void reset();