Commit Graph

40 Commits

Author SHA1 Message Date
Oswald Buddenhagen
b6b44b368c qmake: introduce magic bypassNesting() scope
will be needed by configure.

Change-Id: If14e6944fe84767bd67604ecde98076f873749ef
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:56:20 +00:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
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
2016-11-16 12:35:36 +01:00
Oswald Buddenhagen
c05f0a83fd qmake: make discard_from() patch up QMAKE_INTERNAL_INCLUDED_FILES as well
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>
2016-11-15 22:44:27 +00:00
Oswald Buddenhagen
965e861e61 qmake: let discard_from() discard function definitions as well
for completeness.

Change-Id: I3ffc14e041408c773e277442828170e3df04ec8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:23 +00:00
Allan Sandfeld Jensen
887e260a93 Improve QMake JSON error
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>
2016-11-15 17:27:01 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Oswald Buddenhagen
8db556d299 fix $$section()'s bad argument count error message
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>
2016-11-14 12:18:56 +00:00
Oswald Buddenhagen
12bb328bb0 add discard_from() function
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>
2016-08-25 11:56:07 +00:00
Oswald Buddenhagen
0eff800e81 add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().

Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:29 +00:00
Oswald Buddenhagen
22d1351dde print no message at all when no argument is supplied to error()
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>
2016-08-08 09:48:38 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
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
2016-07-19 20:14:40 +02:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
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
2016-07-15 20:47:57 +02:00
Oswald Buddenhagen
3c8134958c fix raw data leak in $$absolute_path()
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>
2016-07-13 14:27:01 +00:00
Oswald Buddenhagen
d459a6b0e0 fix calculations of worst-case size requirements for token buffer
Change-Id: I3aa4c736acec44f95a0a33c7baae9276568f684f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 14:26:58 +00:00
Oswald Buddenhagen
dacf3994ba fix custom functions inheriting other functions' arguments
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>
2016-07-13 14:26:54 +00:00
Oswald Buddenhagen
1b4ea11332 make error() propagate from requires() and REQUIRES=
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>
2016-07-13 14:26:49 +00:00
Oswald Buddenhagen
339b9706cc make error() propagate from custom replace functions
it didn't, which is rather unexpected.

Change-Id: I8cdb7b1490a8c2207809812b93cc65fbe23a1b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-07-13 14:26:46 +00:00
Oswald Buddenhagen
b27d4835c2 fix error() not propagating through if()
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>
2016-07-13 14:26:42 +00:00
Lars Knoll
34c24ceb1f Improve error reporting when parsing JSON files
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>
2016-06-17 16:11:11 +00:00
Oswald Buddenhagen
50e22c7653 add $$sorted() function.
[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>
2016-05-25 06:19:16 +00:00
Oswald Buddenhagen
e70330f99e add $$str_member() function
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>
2016-05-25 06:19:11 +00:00
Oswald Buddenhagen
22f3800cac add $$str_size() function
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>
2016-05-25 06:19:00 +00:00
Oswald Buddenhagen
d3cc25ef52 add $$num_add() (numeric addition) function
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>
2016-05-25 06:18:55 +00:00
Oswald Buddenhagen
3d21634fb6 add $$take_first() and $$take_last() functions
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>
2016-05-25 06:18:50 +00:00
Oswald Buddenhagen
ad17a35853 make QMakeParser take a QStringRef as input
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>
2016-05-24 12:38:59 +00:00
Jani Heikkinen
f776595cc1 Updated license headers
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>
2016-01-21 18:55:18 +00:00
Frederik Gladhorn
ad16478a76 Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi

Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
2016-01-08 12:35:24 +01:00
Oswald Buddenhagen
e5f3b653f0 add enablers for printing project errors in cumulative mode
this doesn't actually do anything in qmake.

Change-Id: Ia14953a5a9dc31af56ad6c338017dd5b85bb4494
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/08d0cb6f8e90a818bf6d3bec7a6d00f16419b8c0)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:39:31 +00:00
Oswald Buddenhagen
57ca8d2698 make write_file() capable of making files (not) executable
Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:34:26 +00:00
Friedemann Kleint
76cf88157f Tests: Remove CONFIG += parallel_test.
The keyword no longer has a meaning for the new CI.

Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-05 07:16:50 +00:00
Christian Kandeler
ec8c1dcf14 Make QDir::relativeFilePath() return "." for a path to itself.
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>
2015-06-24 15:43:58 +00:00
Oswald Buddenhagen
5ddc16b5df add qmake evaluator test
Change-Id: I31b95daede5edef245dd1ba447f2937a0db34232
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:34 +00:00
Oswald Buddenhagen
ef50e244cd split parser test initialization
the idea was to speed up optimized msvc compilation, but it didn't help.
still, it's better structured that way.

Change-Id: I4b2108d02a47ef8ef704b0b542b0f281bff20165
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:32 +00:00
Oswald Buddenhagen
48c38aae10 move parser test to a separate file
for better structure.

Change-Id: I16bd1ca245640e92ffe167241a5a565e7a550e1d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:30 +00:00
Oswald Buddenhagen
f37381e292 add autotest for ProString
also adds documentation, which is kind of a sanity test. ehm.

Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:08 +00:00
Oswald Buddenhagen
a3fac53864 add parser tests for use of 'else' after bad conditionals
Change-Id: I9885f629a2f6511574eebd81896a1d9f258e55cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-20 18:11:05 +00:00
Oswald Buddenhagen
79de60f38b silence MSVC warnings about using TS() without parameters
Change-Id: I23264dcabc02b89441fa47c890fc662e9a41f7ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-05-20 18:11:03 +00:00
Oswald Buddenhagen
9d4641f56e add autotest for qmake parser
Change-Id: Ib3dcb6c1aaac20ca6a3bc0dc564e16ec7bd152db
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-02-25 13:55:12 +00:00
Oswald Buddenhagen
756d5502f9 add autotest for ioutils
Change-Id: I63700a57e0edf5aec02abfffdc7601743379f12c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-25 13:54:36 +00:00
Oswald Buddenhagen
e507b0148b add test for the qmake library
the existing test is a blackbox test. this one is going to be different.

the first test is a bit trivial ...

Change-Id: Iba1b0b5c32490677551ee92c36f381b884c2765d
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-25 13:54:33 +00:00