diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-10 10:57:05 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-10 11:23:31 (GMT) |
commit | 72e0778c9b5bdae58596090b114d5d0e7092f911 (patch) | |
tree | 53c31d9b61700c2c6db672767e24953192c5373c /qmake/project.cpp | |
parent | abb425e3db6c20c5271788cb1ec4e1fe37b9ea5b (diff) | |
parent | 50bb35a5ca48816f7563d1055071b4caa7791056 (diff) | |
download | Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.zip Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.tar.gz Qt-72e0778c9b5bdae58596090b114d5d0e7092f911.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
doc/src/development/qmake-manual.qdoc
mkspecs/symbian-gcce/qmake.conf
qmake/project.cpp
src/corelib/global/qnamespace.qdoc
src/declarative/graphicsitems/qdeclarativetext.cpp
src/gui/text/qtextdocumentlayout.cpp
src/gui/text/qtextdocumentlayout_p.h
tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
tests/auto/networkselftest/networkselftest.pro
tests/auto/qscriptengine/tst_qscriptengine.cpp
tools/designer/src/components/signalsloteditor/signalslot_utils.cpp
tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
tools/qdoc3/test/qt-build-docs.qdocconf
tools/qdoc3/test/qt-html-templates.qdocconf
tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
tools/qdoc3/test/qt.qdocconf
tools/qdoc3/test/qt_ja_JP.qdocconf
tools/qdoc3/test/qt_zh_CN.qdocconf
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r-- | qmake/project.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index af8cdf6..7cc1cb6 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -228,7 +228,7 @@ static QString varMap(const QString &x) return ret; } -static QStringList split_arg_list(QString params) +static QStringList split_arg_list(const QString ¶ms) { int quote = 0; QStringList args; @@ -253,6 +253,8 @@ static QStringList split_arg_list(QString params) while(x > last && params_data[x-1].unicode() == SPACE) --x; args << params.mid(last, x - last); + // Could do a check for unmatched parens here, but split_value_list() + // is called on all our output, so mistakes will be caught anyway. return args; } ushort unicode = params_data[x].unicode(); @@ -285,6 +287,7 @@ static QStringList split_value_list(const QString &vals) QString build; QStringList ret; ushort quote = 0; + int parens = 0; const ushort LPAREN = '('; const ushort RPAREN = ')'; @@ -295,7 +298,7 @@ static QStringList split_value_list(const QString &vals) ushort unicode; const QChar *vals_data = vals.data(); const int vals_len = vals.length(); - for(int x = 0, parens = 0; x < vals_len; x++) { + for(int x = 0; x < vals_len; x++) { unicode = vals_data[x].unicode(); if(x != (int)vals_len-1 && unicode == BACKSLASH && (vals_data[x+1].unicode() == SINGLEQUOTE || vals_data[x+1].unicode() == DOUBLEQUOTE)) { @@ -319,6 +322,11 @@ static QStringList split_value_list(const QString &vals) } if(!build.isEmpty()) ret << build; + if (parens) + warn_msg(WarnDeprecated, "%s:%d: Unmatched parentheses are deprecated.", + parser.file.toLatin1().constData(), parser.line_no); + // Could do a check for unmatched quotes here, but doVariableReplaceExpand() + // is called on all our output, so mistakes will be caught anyway. return ret; } @@ -1678,10 +1686,10 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap<QString, QStringL } if(format == UnknownFormat) return IncludeNoExist; - if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1) - return IncludeFeatureAlreadyLoaded; - place["QMAKE_INTERNAL_INCLUDED_FEATURES"].append(file); } + if(place["QMAKE_INTERNAL_INCLUDED_FEATURES"].indexOf(file) != -1) + return IncludeFeatureAlreadyLoaded; + place["QMAKE_INTERNAL_INCLUDED_FEATURES"].append(file); } if(QDir::isRelativePath(file)) { QStringList include_roots; @@ -2963,6 +2971,9 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QMap<QString, QStringL else if(!current.isEmpty()) ret.append(current); //qDebug() << "REPLACE" << str << ret; + if (quote) + warn_msg(WarnDeprecated, "%s:%d: Unmatched quotes are deprecated.", + parser.file.toLatin1().constData(), parser.line_no); return ret; } |