summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* complain about absent files to -pro argument (in lupdate)Oswald Buddenhagen2013-08-201-4/+4
| | | | | | | | | this doesn't actually do anything in qmake. Change-Id: I908fc3792bdc321370e51be98adf7a9c81e37a85 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/e1f3732197ef77a29cb7f3c1ce094b3f31a7b689) (cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
* avoid boolean argument trap: introduce QMakeParser::ParseFlagOswald Buddenhagen2013-08-201-2/+2
| | | | | | | Change-Id: I26ce032a1aa044e9a4da0c8708a4490b07374992 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/066b08fc62c67d586996ea4e272ef05dd3865fac) (cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
* implement simple VFS to support caching during project parsingOswald Buddenhagen2013-08-071-16/+8
| | | | | | | | | | | | sync up with qt creator - for qmake itself, this is just a minor refactoring. Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/66802ef8bf7989dc025e34bf91d93576189c483c) (cherry picked from qtcreator/69542826fa643a0fed2fc9e717f072c2852dc017) (cherry picked from qtcreator/196424115338fb9a535810704b7d814d318b0462) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* update size calculations for assignment statementsOswald Buddenhagen2013-05-201-4/+4
| | | | | | | | | this was forgotten when the value lists were extended by a size hint. Change-Id: I6f9b55ed671224a9b8735c8d937f94aac4a73a42 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> (cherry picked from qtcreator/f24c9865306624c2fc150d4bd262a5c4d5a3689a) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* permit returning from filesOswald Buddenhagen2013-03-121-12/+17
| | | | | | | | | this allows skipping an entire feature file if a condition is not fulfilled, without putting the whole body inside a conditional. Change-Id: I84fe9c94dda58c794fb52c3f163b40563b0db30a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QMakeParser: save one ByteArray constructionhjk2013-02-061-1/+1
| | | | | | Change-Id: I2845fdefb8b32de227f08017e0e3ad98923d1c87 Reviewed-by: hjk <hjk121@nokiamail.com> (cherry picked from qtcreator/52be02d1cbbf69d4f82c517c7b633ed3d13b1007)
* Remove braces for single lines of conditionsOrgad Shaneh2013-02-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk <qthjk@ovi.com> (cherry picked from qtcreator/29a93998df8405e8799ad23934a56cd99fb36403) Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix qmake's pro file cache to interact correctly with write_fileSimon Hausmann2012-10-251-0/+6
| | | | | | | | | When writing a file with write_file() we have to inform the pro file parser cache to discard the file if it's existant in the cache, to ensure that calling include() after write_file() always works. Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* remove the entirely insane whitespace compressionOswald Buddenhagen2012-09-181-18/+2
| | | | | | | | | | | it was merely an artifact of using QString::simplified() on the unparsed (!) project code. there is no reason why anyone should actually rely on it, so just remove it. Change-Id: If9b957c4b1263f3990a2331f8851bb1c06154ea8 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't pretend that break()/next()/return() are functionsOswald Buddenhagen2012-09-131-0/+47
| | | | | | | | | | | | | | it's a pretty braindead thing to implement control flow statements as (built-in) functions. as a "side effect", this fixes return() value handling for lists. (cherry picked from qtcreator/f53ed6c4b3feca59a94d4f0de8b1a7411122e30e) (cherry picked from qtcreator/f529e22ec38fb9a656d74394e484d2453cf42c69) Change-Id: I59c8efa0e4d65329327115f7f8ed20719e7f7546 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* improve parse error recovery pathsOswald Buddenhagen2012-09-131-4/+7
| | | | | | | | | | to reduce collateral damage from parse errors. (cherry picked from qtcreator/00c0d0d5e42d28e03c2846c17d3acbcd8420859d) Change-Id: Ic59700d657069d3b15372509b4bff966057d27a9 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* port qmake to qt creator's qmake language evaluatorOswald Buddenhagen2012-09-111-0/+1185
this is a monster commit which does the following things: - import the evaluator as-is from qt creator into qmake/library/ - integrate it into qmake's makefiles - overwrite proitems.h with actual special types - remove the parts of Option which are redundant with QMakeGlobals - make QMakeProperty a singleton owned by Option::globals. the dynamic handling so far made no sense. - make QMakeProject a subclass of QMakeEvaluator, with relatively few extensions the changes to existing qmake code outside project.* and option.* are minor. implementing the changes gradually would mean changing a lot of code which will be just replaced in the next commit, so i'm not wasting my time on it. Change-Id: I9746650423b8c5b3fbd8c3979a73228982a46195 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>