summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmakelib/evaltest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-0/+4
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Merge qt_error_string and QSystemErrorThiago Macieira2017-07-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes a lot of duplicated code that existed in both qglobal.cpp and qsystemerror.cpp, including the hack to get the correct strerror_r signature. This removes the incorrect use of EACCES, EMFILE, ENOENT, and ENOSPC from qt_error_string on Windows. qt_error_string is supposed to be used only with Win32 error codes from GetLastError(), despite there being a lot of uses in cross-platform and even Windows-specific code that pass errno constants. It may or may not work: that depends on whether the constants happen to match. ENOENT matches ERROR_FILE_NOT_FOUND and one could argue that ENOSPC matching ERROR_OUT_OF_PAPER is acceptable, but EMFILE isn't the same as ERROR_BAD_LENGTH nor is EACCES, ERROR_INVALID_DATA. Change-Id: I1eba2b016de74620bfc8fffd14cccb7f77f4b510 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | qmake: Add test functions for comparing version numbersAlexander Volkov2017-03-201-0/+38
|/ | | | | | | | | | | | | | | qmake really lacks version comparing functions: users either use ugly constructions to compare versions by components, such as greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 4): or even incorrectly compare versions as strings: !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): Add test functions versionAtLeast and versionAtMost which use QVersionNumber to compare version numbers by components. Change-Id: I65e6b3c296d0301d544b7e38bf3d44f8d555c7fc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* qmake: introduce magic bypassNesting() scopeOswald Buddenhagen2016-12-131-0/+25
| | | | | | | will be needed by configure. Change-Id: If14e6944fe84767bd67604ecde98076f873749ef Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
| | * fix $$section()'s bad argument count error messageOswald Buddenhagen2016-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | the autotest was also broken, because it was created by pasting the bogus message into the result ... Change-Id: I02b8663b96c7d96cdb3c19639e2213e49fd2bcec Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | qmake: make discard_from() patch up QMAKE_INTERNAL_INCLUDED_FILES as wellOswald Buddenhagen2016-11-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | when the file's effects are discarded, the mention of the file should be as well. Change-Id: I894b7e2b887dd34d18533b197bfa9d0d84d647e7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | qmake: let discard_from() discard function definitions as wellOswald Buddenhagen2016-11-151-2/+8
| | | | | | | | | | | | | | | | | | | | | for completeness. Change-Id: I3ffc14e041408c773e277442828170e3df04ec8d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Improve QMake JSON errorAllan Sandfeld Jensen2016-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We can not improve the result from JSON parsing without changing API, so instead recalculate the line and column based on input and offset. Change-Id: I54149233f71023aa5d30deff854d6f3406c5c48c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | add discard_from() functionOswald Buddenhagen2016-08-251-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | this function discards all values that come from a specific file. it will be needed for configure bootstrapping, but is too obscure to document it for general use. Change-Id: I62c18aeb1847712e33d0599dbb0b90ffa1722438 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | add support for returning the command's exit status to $$system()Oswald Buddenhagen2016-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | | ... and make use of it in qtRunLoggedCommand(). Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | print no message at all when no argument is supplied to error()Oswald Buddenhagen2016-08-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | this is useful when an adequate message has already been emitted by other means, like various built-ins do. Change-Id: I092771f55969fad8b214204d666327664727c572 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-191-0/+111
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+111
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * fix raw data leak in $$absolute_path()Oswald Buddenhagen2016-07-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | when the file name is empty, the path will be returned verbatim. this must be considered when constructing the return value. Task-number: QTBUG-54550 Change-Id: Ie108ed52275e66a154ef63bd6f7193f55b3e0454 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * fix custom functions inheriting other functions' argumentsOswald Buddenhagen2016-07-131-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-41830 Change-Id: Iba3eee4975a1ee671b7190e52c0efc9a18147c62 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * make error() propagate from requires() and REQUIRES=Oswald Buddenhagen2016-07-131-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | that can make sense if a function which determines the availability of a dependency fails to do so for unexpected reasons. Change-Id: If6cd113df25aee66830c120a2fab067c822a4543 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * make error() propagate from custom replace functionsOswald Buddenhagen2016-07-131-0/+66
| | | | | | | | | | | | | | | | | | | | | it didn't, which is rather unexpected. Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * fix error() not propagating through if()Oswald Buddenhagen2016-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | if() would simply "downgrade" a fatal error to a false condition, which is certainly not expected. Change-Id: Ie9c54f2bddf588856498bf795007b341b7c9363a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Improve error reporting when parsing JSON filesLars Knoll2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | At least report the error string and the file offset where the error happened. Change-Id: Iaa1733593b8af2a7a52b67c0f495731f045d2c11 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | add $$sorted() function.Oswald Buddenhagen2016-05-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][qmake] Added $$sorted() function. Change-Id: Ic069d3ef7c0b7a260c714c76eecc71c41417d01f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | | add $$str_member() functionOswald Buddenhagen2016-05-251-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just like $$member(), but operates on a string value rather than a list variable. it is the swiss army knife of cutting, providing equivalents of left(), right(), mid() and reverse() all in one. [ChangeLog][qmake] Added $$str_member() function. Change-Id: I7c7c6c971db402fff41b428d32a4451f45400728 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | add $$str_size() functionOswald Buddenhagen2016-05-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this is strlen(), but the name is matched to $$size(), just namespaced to reflect that it operates on a string value rather than a list variable. [ChangeLog][qmake] Added $$str_size() function. Change-Id: I56c8b863da244e66bd283257a66b197aa73b0e57 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | add $$num_add() (numeric addition) functionOswald Buddenhagen2016-05-251-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | amazing how we managed to do without it for so long. ^^ the name is intentionally somewhat obscure to avoid clashes, and some namespacing is good anyway. [ChangeLog][qmake] Added $$num_add() function. Change-Id: Ib7648b1f425ef096a87b51f158d0f1409e5c4daa Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | add $$take_first() and $$take_last() functionsOswald Buddenhagen2016-05-251-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | while implementing stacks and queues was possible before with the help of $$member(), these functions make it much more straight-forward. [ChangeLog][qmake] Added $$take_first() and $$take_last() functions. Change-Id: I4922a5331780e468a42c663c9ad3c6456a95a6bf Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | make QMakeParser take a QStringRef as inputOswald Buddenhagen2016-05-241-2/+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>
* / 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 write_file() capable of making files (not) executableOswald Buddenhagen2015-12-211-2/+9
| | | | | Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Make QDir::relativeFilePath() return "." for a path to itself.Christian Kandeler2015-06-241-2/+2
| | | | | | | | | | | The rationale being that the empty string is not a valid path component. [ChangeLog][QtCore][QDir] QDir::relativeFilePath() now returns "." instead of an empty string if the given path is the same as the directory. Change-Id: Ibcf31904b2ae5edf5639d4c2e5ba234365d347fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* add qmake evaluator testOswald Buddenhagen2015-05-201-0/+2513
Change-Id: I31b95daede5edef245dd1ba447f2937a0db34232 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>