summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
Commit message (Collapse)AuthorAgeFilesLines
* make qmake abort when $$prompt() gets EOFOswald Buddenhagen2016-12-131-2/+6
| | | | | | | | | | | | | | otherwise, infinite loops can result, as amply demonstrated by the new configure (which duly replicated the old configures' behavior ...). QMakeEvaluator::evaluateBuiltinExpand() now returns a VisitReturn like all other evaluate*() functions. the string list return value is now an out parameter; i used a reference instead of a pointer to avoid adjusting 56 usages of it. Task-number: QTBUG-13964 Change-Id: I51ca7df8d694c6ffe9d9899cba414b1b46f5ce95 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-191-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-4/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| | * make error() propagate from custom replace functionsOswald Buddenhagen2016-07-131-4/+5
| | | | | | | | | | | | | | | | | | | | | it didn't, which is rather unexpected. Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | make QMakeParser take a QStringRef as inputOswald Buddenhagen2016-05-241-1/+2
|/ / | | | | | | | | | | | | | | | | | | the only place where this actually saves a deep copy is the evaluation of if(), but as a side effect the parser is now able to deal with not null-terminated strings, which is kinda nice as well. Change-Id: Ib6d08617aa79d2f9eaecd4906d4d548f34bf377d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | qmake: eradicate Q_FOREACH loops [already const]Marc Mutz2016-01-281-1/+1
| | | | | | | | | | | | | | | | (or trivially marked const) ... by replacing them with C++11 range-for loops. Change-Id: I1522e220a57ecb1c5ee0d4281233b3c3931a2ff8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | qmake: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: If086bea06fe26232a7bb99fad8b09fce4dc74c27 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | qmake: eradicate Q_FOREACH loops [const-& returns]Marc Mutz2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. The functions QMakeProject::values(), QMakeMetaInfo::values() and QHashIterator::value() all return by const-reference, so they can be passed to range-for without further changes. Change-Id: Ic3b39ed8ff8cd7a6f287f1aa9d61a1acd67d7aaa Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-211-17/+12
|/ | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* make fileFixify() calling convention somewhat saneOswald Buddenhagen2015-04-211-0/+1
| | | | | | | | | | instead of allowing arbitrary input and output base paths, restrict them to the project input and output dirs (in any permutation), which are the only cases ever used anyway. this permits much clearer call sites, and allows later optimizations. Change-Id: I48d149a4417af5c858e66ec57c476a5bc6b17f17 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* remove pointless return value from QMakeParser::read()Oswald Buddenhagen2015-02-041-10/+9
| | | | | | | | | | it always returned true nowadays. an obvious followup effect is that the return value of parsedProBlock() doesn't need to be null-checked any more as well. Change-Id: I782785cab9b721a78a342a010921a73e642ebe7f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* 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>
* pass a pointer instead of a reference to initFrom()Oswald Buddenhagen2014-06-201-1/+1
| | | | | | | | | | msvc thinks that it's impossible to create a null reference (because some language lawyer said so) and thus complains about our assert that checks the reference's validity. work around by not dereferencing the pointers we already have. Change-Id: Ife2288d4187860105de12fdebc0e671e0159ace3 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* implement simple VFS to support caching during project parsingOswald Buddenhagen2013-08-071-2/+2
| | | | | | | | | | | | 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 copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@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>
* Use QStringList::join(QChar) overload where applicable [qmake]Marc Mutz2012-09-211-1/+1
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I9c9964703dedfdab6e7bfac80be22bd5570e2e49 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* make error() abort the qmake run, not just the current fileOswald Buddenhagen2012-09-211-5/+18
| | | | | | Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't allow overloading of built-in functionsOswald Buddenhagen2012-09-181-2/+15
| | | | | | | | | | the functions are not versioned or scoped, so user-defined overloads would mess up qmake's own feature files. it seems safer to break user projects than to allow the user to break qmake. Change-Id: I020a2e6416bbb6e2fd2ece339629d848c00c8398 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* port qmake to qt creator's qmake language evaluatorOswald Buddenhagen2012-09-111-3707/+51
| | | | | | | | | | | | | | | | | | | | | 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>
* introduce qmake variable abstractionsOswald Buddenhagen2012-09-071-16/+16
| | | | | | | | this is preparation for adapting to a new evaluator. Change-Id: I6fc59f5525735754a00afa6629fbfe257e84db97 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove pretenses of supporting projects on stdinOswald Buddenhagen2012-09-051-12/+6
| | | | | | | | | | 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>
* remove QMAKE_MKSPECS property from qmake -query's viewOswald Buddenhagen2012-09-051-1/+3
| | | | | | | | | | it's a dynamic property which is something between meaningless and misleading when used outside a project file. also, experience from creator shows that people would consistently abuse it (not handling it as the list it is). Change-Id: Id52cd40da5c38c0c74535d0701fdae53dfa39cad Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make $$relative_path() minimize already relative pathsOswald Buddenhagen2012-08-071-4/+5
| | | | | | | | | | QDir::relativeFilePath() doesn't do anything if the path is already relative, so make it absolute first to force a re-calculation. the cleanPath() is gone, as relativeFilePath() already does that. Change-Id: I8f4d0d839db3fe99a608f70916b4b5bd52c56535 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix qmake -projectRafael Roquetto2012-08-061-0/+6
| | | | | | | | qmake -project was always outputting a project with subdirs template, because Option::h_moc_mod was not being properly read, causing addFile() to misbehave. Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* remove second argument from $$eval() (access to global scope)Oswald Buddenhagen2012-07-311-13/+2
| | | | | | | | | | | sam added this based on a vague notion of backwards compatibility when he fixed the function to use the local scope, but it kind of makes no sense - there is very little reason for accessing the global scope from within a function. google doesn't find any relevant hits except our source code, so let's just nuke it. Change-Id: Ie957bb47b531f7e9b5dfcceb4e09f65dd826b422 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix host vs. makefile directory separator messOswald Buddenhagen2012-07-281-34/+62
| | | | | | | | | | | | | | | | | the system path separator and shell are bound to the host system (system() will use cmd even on mingw with sh.exe in path). the makefiles otoh may depend on what the qmakespec defines. consequently, add $$system_path() and $$system_quote() (for use with system() & $$system()). $$native_path() is renamed to $$shell_path() and should be used with $$shell_quote() to produce command lines in makefiles. $$QMAKE_DIR_SEP needs to be applied to Option::dir_sep right after parsing the spec, so it is available to $$shell_{path,quote}(). Change-Id: If3db4849e7f96068cf03a32348a24f3a72d6292c Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* ifdef out the "clears variables previously set" warningOswald Buddenhagen2012-07-061-0/+2
| | | | | | | | it produces way too many false positives to be useful. Change-Id: Iefa423f96fa5574267b1468abb5efc8454ab54a3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* export QMAKESPEC to the projectOswald Buddenhagen2012-07-031-0/+1
| | | | | | | | | | this makes it unnecessary to dump qmakespec to .qmake.cache and qmodule.pri. Task-number: QTBUG-22700 Change-Id: I678c7ee7df2512184b9cd06d7a3be8bbd0b0da15 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix bugs surrounding reading super cache when no local cache is presentOswald Buddenhagen2012-06-301-3/+2
| | | | | | | | we would ignore the early read variables and fail to export the super cache's path to the project. Change-Id: I3c467802b4af22f73be05b25dbd8ccb6196d28a8 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* use source root also for finding featuresOswald Buddenhagen2012-06-271-0/+2
| | | | | Change-Id: I108914c6d2c6d06414156584aeb3a1afb0f5838d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* move cachefile_depth calculation out of project evaluatorOswald Buddenhagen2012-06-271-5/+1
| | | | | | | it has no business there Change-Id: I6d1a4b55b5acacc470cc109a6c69a907abbba312 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* remove possibility to request project recursion from within a pro file againOswald Buddenhagen2012-06-271-4/+1
| | | | | | | | | | the feature was implemented for the abld/sbs2 generators only, and is of course undocumented. this reverts most of commit e795e61ef93f8080f9938ac49f2fca306644af85. Change-Id: Ibd1726b036ce6c45f8e678ea996218f774f8aed2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* reduce a bit of code dupe while assembling feature search pathOswald Buddenhagen2012-06-271-13/+9
| | | | | | | | instead of having a bunch of nested loops, collect into a temporary list and process it at the end. Change-Id: I97e5642f7e13f7c7b69eae00833e61cdf46a02ed Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* repurpose deprecated -E switchOswald Buddenhagen2012-06-271-12/+17
| | | | | | | | | instead of dumping the variables as we are going, dump everything at the end. this is potentially useful, as opposed to the previous functionality which was redundant with -d. Change-Id: Icf14703cb93e03f7079dfc0266b219ad9c902133 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* make a bunch of functions constOswald Buddenhagen2012-06-271-1/+1
| | | | | | | values() and variables() get both const and non-const overloads Change-Id: Idfabea1acc488bf78f24edb831681ee07f0074c4 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* make magicValues() constOswald Buddenhagen2012-06-271-6/+3
| | | | | | | the weird debugging feature is not used anyway Change-Id: I07f481a94f2b2ab2a5b61270f0e00183cefd4cd1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't use backwards compat mapping for generator accessesOswald Buddenhagen2012-06-271-1/+1
| | | | | | | | we can rely on only user code needing variable mapping, so apply it only in the evaluator. Change-Id: I6fc58e7bcf24cf0fa8783d5341ab1e7b9f001c88 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* introduce magicValues() functionOswald Buddenhagen2012-06-271-2/+8
| | | | | | | | | the only place where the two remaining magic values need to be referencable is doVariableReplaceExpand(), so make a separate function and use it only in that place. Change-Id: I6e2fcfa3a4f16727d90ace56eb88fc99ef272ffc Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make $$PWD non-magic on readOswald Buddenhagen2012-06-271-4/+3
| | | | | | | like the other variables, we can just store it in the hash. Change-Id: I49ad39dca8d498119b27f16ea4bdc44ae698d72e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* set $$_DATE_ only on project startupOswald Buddenhagen2012-06-271-3/+1
| | | | | | | | | this changes the semantics a bit - it will be the datetime of qmake startup rather than the time a particular file is processed. i'd argue that this is insignificant. Change-Id: I75918967bef25038ce54aa81ab03c027384c0268 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* deprecate $$IN_PWDOswald Buddenhagen2012-06-271-2/+3
| | | | | | | | it suggests a symmetry to $$OUT_PWD which simply isn't there. the shorter alias $$PWD is much more popular anyway. Change-Id: Iefbfd56f1a3e526f15c9d6cd1bf59778be6f2f8d Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* make project-related variables non-magicOswald Buddenhagen2012-06-271-11/+5
| | | | | | | | $$_PRO_FILE_, $$_PRO_FILE_PWD_ and $$OUT_PWD can be cleanly initialized. no need for magic. Change-Id: I2e339d17bae42ecb573c2f82c716f6be15a35b98 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move initialization of $$TARGET to setupProject()Oswald Buddenhagen2012-06-271-4/+2
| | | | | | | that's what we have it for Change-Id: Ib734b97d337a82c73b086dfeb2b263171f2a02b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make $$TEMPLATE magic on write instead of on readOswald Buddenhagen2012-06-271-16/+26
| | | | | Change-Id: I03a68993dd7d4488f8212132a9d492d135295b9e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make a bunch of invariant variables non-magicOswald Buddenhagen2012-06-271-126/+102
| | | | | | | | instead of resolving them on-demand, just initialize the value hash with them. less magic and faster. Change-Id: I28cb6c21ae6ae60a33734f62acdef0794420ba8f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't make $$TEMPLATE_PREFIX available any moreOswald Buddenhagen2012-06-271-4/+0
| | | | | | | | this is a purely internal variable. projects are supposed to query $$TEMPLATE only. Change-Id: I32a3aa7012a4fedcf6e77e2e1302ed978baac700 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move initialization of numerous variables to spec_pre.prfOswald Buddenhagen2012-06-271-12/+0
| | | | | | | | this is cleaner by design and allows removing some hacks. Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* use real qmakespec as basis for finding featuresOswald Buddenhagen2012-06-271-4/+3
| | | | | | | | | | doesn't make much of a difference on unix (as the default specs are just symlinks). on windows, it makes the gross hack used for finding spec-specific wince default_post.prfs unnecessary. Change-Id: Id403dce5be487e1ae22c1f54b8095a6afdd98bc8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>