Commit Graph

16793 Commits

Author SHA1 Message Date
Oliver Wolff 6b3365b2ea Use msvc qmake scope where appropriate
Use 'msvc' instead of 'win32-mscv*'.

Change-Id: Ic592d9b5e63529aaae0b780b00e0fce5999926a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-11-22 07:17:42 +00:00
Ulf Hermann 63ada5fa00 QQuickText: Signal content height/width changes also when resetting
If we change the content height or content width to the initial one, we
still need to signal the change.

Fixes: QTBUG-71684
Change-Id: Idf6e3f89423eab3d8f5310c164c5acc5108e0d8b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-20 17:37:47 +00:00
Ulf Hermann 9a7c5a925c Doc: Fix spelling of qjsvalue_cast()
Change-Id: Ic853e8c958b250d87a953942ea944f5d52d456a2
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
2018-11-20 17:37:38 +00:00
Ulf Hermann 2b52a997ce QML TypeLoader: Sort composite singletons before recursing into them
When recursingly loading further types for composite singletons before
sorting them, the order in which the recursively referenced types are
loaded is random because the composite singletons are kept in an
(unordered) hash. Any sorting after loading the child components doesn't
help as the recursive references may depend on the types already loaded
at that point.

Sorting the composite singletons before starting the recursion does help
because it eliminates the source of randomness in the system.

Fixes: QTBUG-66976
Change-Id: I0fa1f50b36eba8c73eb8d56b4d5118485ab05f35
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-20 09:07:21 +00:00
Erik Verbruggen a54e15bc79 JS: Check pattern target to be an lvalue
Change-Id: If9468b93b08ad355f07d1436ca88e8d36be22070
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 08:56:15 +00:00
Erik Verbruggen 9d319e20cd JS: Handle check for dangling jump gracefully
The destructor for the Jump object will check if it is linked somewhere.
So when doing an early-exit after generating a jump (and before linking
it) and after an error occurred, make sure to call link anyway. At this
point no code will be generated, so where the jump points to is kinda
pointless.

Change-Id: I09fa03d4224805a838088acd0c5c83d02b328045
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 08:56:05 +00:00
Ulf Hermann 3e9b752bf4 QML: Use all available type information to find enum types
Using the metatype system we can identify most enumeration types
statically, without lookup by name. Only if we get UnknownType we have
to do a name based lookup. As the name based lookup only checks enums
that either belong to the global Qt namespace or the surrounding class,
the type based lookup gives better results.

Task-number: QTBUG-58454
Change-Id: Id6bd748f37838249defb4c5b2a7628eadc1a8341
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 08:25:32 +00:00
Jason Erb 75937c9da7 Fix signed/unsigned warning in VS 2017
Task-number: QTBUG-71862
Change-Id: I836756d004753420bfb7a00013ade0229bd5946e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-19 08:11:56 +00:00
Allan Sandfeld Jensen 435cbb65ef Fix tiling overflow with BorderImage
Switch the geometry to using quint32 indexes if there are too many
tiles.

Change-Id: Idf51210299d14737d0d115104060d32f5754dff7
Task-number: QTBUG-58924
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-17 11:15:57 +00:00
Liang Qi e56df5d505 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	.qmake.conf
	src/qml/compiler/qv4codegen.cpp
	tests/auto/qml/v4misc/tst_v4misc.cpp

Change-Id: I3a7662d14a2eb3d8c37ac522ef4400b6b6ec30d9
2018-11-16 14:03:01 +01:00
Erik Verbruggen 0d3eccd2a9 Stop codegen after error
We won't use the bytecode anyway, and it prevents consistency checks
that come after the error from failing. Specifically: there might be
jumps that have no label defined.

Fixes: QTBUG-71738
Change-Id: I62a7e943b0156d42caccfa40507853de79e3b1ce
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c4f82e59d5)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-16 09:47:22 +00:00
Erik Verbruggen f92c48a231 JS: Check array subscripts for validity when generating code
Task-number: QTBUG-71079
Change-Id: I999130f3994f513bb9d2ca8ddaa94688451937fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit b8f4005f13)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-16 09:47:15 +00:00
Lars Knoll a7948a7519 Properly mark variables as unresolved when accessed from eval
If we can't resolve the variable and are executing eval code,
we need to look it up by name, and not generate a lookup in the
global object.

Change-Id: I693b3b714651911f72620160bfc463d6dbb00820
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-16 09:17:09 +00:00
Qt Forward Merge Bot e7c3165047 Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: I7623438dde316ae1e97802f91991f2e7ccc205a5
2018-11-16 10:08:50 +01:00
Ulf Hermann 87265c7ab8 Qml Tooling: Test that trace events arrive in chronological order
The QML profiler trace client should resolve any deviations from
chronological order. Trace receivers should not need to deal with this.

Change-Id: I9bbb387bbb5c0b7da9f2b508d228665af9f27d4c
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-15 14:22:00 +00:00
Ulf Hermann 71645c45b9 Qml Tooling: Correctly sort debug messages into traces
Debug messages are sent from a different debug service and generally
arrive before they are "due". Therefore we buffer them and pass them on
when the trace has advanced to their position. However, we forgot some
places where we needed to check if there are pending debug messages to
be sent.

Change-Id: Ia6263086a9d06ae7c77c9e2afa85e6e1d8c8a19b
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-15 14:21:54 +00:00
Ulf Hermann 0647853c16 Qml Tooling: Fix crash in QQmlProfilerService test
The event counting for failure diagnostics had an off-by-one error.

Change-Id: I7f652680a4d154a0624dbfd51af0b026f89cc7ad
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-15 14:14:04 +00:00
Ulf Hermann e668e12c58 QML Inspector: Use Qt5-style connection
highlight.h doesn't have a slots section anymore, so the Qt4-style
connect produces a runtime warning and the text doesn't disappear.

Change-Id: Idacd3552df75179566b9efe43192c9c95dbd6f96
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-15 14:05:59 +00:00
Kirill Burtsev 16e3859af1 Qt Quick Test: support tags filter on tests run
Implemented logic for filtering tests with 'case::function:tag' run syntax.

Fixes: QTBUG-71645
Change-Id: I9243636b098b4e9ccb4c74d08679bbbb9f3e8a65
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-11-15 10:45:14 +00:00
Tor Arne Vestbø e12dc7910a macOS: Remove blacklist entries for no longer supported OS versions
Fixes: QTBUG-60518
Change-Id: If41b3c7b3ca4ca9a48692cbb2753b47492693e83
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-11-15 10:30:51 +00:00
Venugopal Shivashankar 9b7b26ca50 Doc: Use \section1 to clearly identify the different parts
The \section1 titles should help the reader relate parts of
the document to the three steps outlined in the beginning.

Task-number: QTBUG-68733
Change-Id: I1bf5adbc2f2629ecd36465ffeb0ade1ebbf961cb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-11-15 09:34:25 +00:00
Ulf Hermann 89a1d4ff3f masm: Don't call fclose(nullptr) and initialize statics
Otherwise our disassembler crashes on QV4_SHOW_ASM.

Change-Id: I63b20c0932452fe852773f91ebecaa7f31dd040d
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-11-14 10:51:06 +00:00
Ulf Hermann 80d26c1508 qmlpreview: Use a better file system watcher
We need to keep watching files even if they are removed and re-added as
editors frequently do when manipulating text files. QFileSystemWatcher
cannot do this by itself, and our simplistic timeout-based attempt
didn't work work properly either.

Fixes: QTBUG-71768
Change-Id: I21e914138179ad8adf07f0196fec8ddcda2cbfca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-11-14 10:50:55 +00:00
Ulf Hermann 1613e32042 qmlpreview: Fix typo
Change-Id: I5b8a674e77f770e4987e03ccf02b5a27c4987e24
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-11-14 10:50:51 +00:00
Kai Koehne e3948955c9 Update plugins.qmltypes
Change-Id: I4357377c0c9dc1f5935ea9293da3f54f7f289b02
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-14 09:24:55 +00:00
Ulf Hermann 8af9d69554 QML Tooling: Fix ordering of memory events in V4 profiler adapter
We should not send memory events that are chronologically after the next
call event, even if the time threshold given by the profiler service
would allow us to do so. When the remaining call events are sent, the
chronological order would otherwise be violated.

Fixes: QTBUG-71515
Change-Id: Iee27304f836a899b2b35133316cecd3d34f128c6
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2018-11-14 08:44:39 +00:00
Erik Verbruggen c4f82e59d5 Stop codegen after error
We won't use the bytecode anyway, and it prevents consistency checks
that come after the error from failing. Specifically: there might be
jumps that have no label defined.

Fixes: QTBUG-71738
Change-Id: I62a7e943b0156d42caccfa40507853de79e3b1ce
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-11-13 11:52:44 +00:00
Friedemann Kleint dcf41b5f69 Yarr: Fix developer build with MinGW 64
Use the MinGW/Windows runtime specific printf formats for size_t, formats,
fixing:

3rdparty\masm\yarr\YarrInterpreter.cpp: In lambda function:
3rdparty\masm\yarr\YarrInterpreter.cpp:2128:24: error: unknown conversion type character 'z' in format [-Werror=format=]
             out.printf("%4zu", index);
                        ^~~~~~
3rdparty\masm\yarr\YarrInterpreter.cpp:2128:24: error: too many arguments for format [-Werror=format-extra-args]
cc1plus.exe: all warnings being treated as errors

Change-Id: I9d39c51b907fc7834aaf353dd0ce8095852f9b3e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-13 08:58:17 +00:00
Jüri Valdmann 4651aecaee Fix more null pointer accesses in QQuickOpenGLShaderEffectMaterialCache
This amends 6c08137faf.

Fixes: QTBUG-71705
Change-Id: I0e9ca137c039802d348af4a29146395155e497c0
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-12 15:32:50 +00:00
Lars Knoll c765d5945b Add a configure test for std::make_unique
Seems like this is the only reliable way to determine whether we
have std::make_unique() or need to provide our own version.

Change-Id: I5b162e0a2d2448d7bc519958c6e85a075812135a
Fixes: QTBUG-71448
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-10 18:47:19 +00:00
Kai Koehne 06f4b3761a Fix copyright header of wavefrontmesh plugin
Change copyright of files introduced in 4207940684 from GPL to
LGPL.

Change-Id: Id2aba2b97f6079a92411d1c448bbee0e03b26d95
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-11-09 16:08:28 +00:00
Antti Kokko b85020d051 Add the changes file for Qt 5.12.0
Change-Id: I76a31de4d3e5a0986ea4d510dea8be53198cc71c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-09 12:47:52 +00:00
Oswald Buddenhagen 7eaa93680c Bump version
Change-Id: I443e76802310ae44f869ca8a60a285cb2eb9adcc
2018-11-08 11:27:09 +01:00
Jüri Valdmann 6c08137faf Fix null pointer access in QQuickOpenGLShaderEffectMaterialCache
If a QQuickWindow is destroyed without ever being rendered, then there won't be
any QOpenGLContext in QQuickOpenGLShaderEffectMaterial::cleanupMaterialCache.

Same goes for QQuickWidgetRenderControl.

Fixes: QTBUG-65236
Change-Id: I2742505d147bc8444b46688170d33fbb2844f2ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-07 18:33:33 +00:00
Janne Koskinen 7748d3ca46 INTEGRITY: Fix build failure
Change-Id: Ibdf441d8c73b507a404391f82695d7a99eb3c6ca
Reviewed-by: Tuukka Turunen <tuukka.turunen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-11-07 15:59:07 +00:00
Kirill Burtsev 74a5ce0266 Fix TestCase::skip to ignore rest of the data rows in TestCase
Fixes: QTBUG-53131
Change-Id: Ic24fe4b5db0e404b1b089a054ce76265763f2682
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-07 14:54:49 +00:00
Mitch Curtis 1d024222d8 QUICK_TEST_MAIN_WITH_SETUP: improve documentation
- Explain how the moc include works.
- Add missing Q_OBJECT macro to example.

Change-Id: I2bacdc45721bb6022f030ff4bc89c95132e35e60
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-11-07 08:48:40 +00:00
Mitch Curtis 9007862264 Doc: improve qmlRegisterInterface() documentation
Change-Id: I5e8b63a287c65baf1eb53957cc5a9585176db284
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-07 08:48:37 +00:00
Alexander Akulich 919a680499 Doc: Add a link from enumeration basic type to enum attributes
Change-Id: I7a7c095f3df11233029e91b3a95262122ae31fcc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-11-06 14:08:08 +00:00
Alexander Akulich 52e326cf17 Doc: Add enumeration object attributes to the QML Reference
Change-Id: I2d402d9be905794e731c73aac75c84168390e07d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-11-06 14:08:04 +00:00
Erik Verbruggen 53440d6844 V4: Fix 32bit moveReg to not use the return value registers
As with the 64bit implementation: use the scratch register. The return
value register is used to hold the newly allocated space on the JS
stack.

Fixes: QTBUG-71319
Change-Id: Ia924ad24ff7f4fbf5ec21b6e6237cce7d907bf3e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-11-06 10:40:28 +00:00
Frederik Gladhorn 00b1ff4607 Fix translation bindings when qtquickcompiler is used
It turns out that the context information is lost when using the
compiler. The unit->unitData()->sourceFileIndex is wrong (always 0),
which should probably be fixed. This change only works around that by
using unit->fileName(); instead.
Make sure that the test actually verifies translations happen and have a
context.

Done-with: Jan Arve Sæther
Fixes: QTBUG-71553
Change-Id: Ib5926bd4b9a6267644f5c9328a84c23d61ca5466
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-06 10:40:15 +00:00
Lars Knoll b1f07986c3 Create proper template objects for tagged templates
If a tagged template gets evaluated multiple times, the
underlying template object is shared.

Change-Id: Ie2f476fbc93d5991322ce1087c42719a8d8333ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 21:15:39 +00:00
Lars Knoll 0fce92af2c Correctly read files with a \0 in them
At least one test case uses this, so let's make sure
we read them correctly.

Change-Id: I9f4ea7785b5a400cd6f0b210a6a98975bbbaf7ce
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 21:14:54 +00:00
Frederik Gladhorn 0477a057fd Move xmllistmodel to xmlpatterns
Latest changes moved to xmlpatterns:
e08f9393acc6417598f328d7f4b7b082c5d57afa

Change-Id: I7e3054a3f0f11833053746294e3b2b958047394d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-11-05 12:48:48 +00:00
Nazar Gerasymchuk 2cc77519eb Remove misleading Q_UNUSED(uri)
Several implementations of registerTypes method contains misleading
Q_UNUSED(uri) but actually uri is used in it.

Change-Id: I34faf4f15cd0f1b60c76f077cdbe5af631d4c8e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 10:40:18 +00:00
Thomas Hartmann f224482001 DesignerSupport: Fix emitComponentCompleteSignalForAttachedProperty
The signal for completed for the attached Component property was
no emitted correctly by emitComponentCompleteSignalForAttachedProperty().

I added a test for the correct behaivour.

Change-Id: I0ebfc10e512ba5c5e2352a5f5d6be3030b43cbbc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-11-05 09:16:51 +00:00
Jüri Valdmann b340d8bb88 QV4::Scoped: Use explicit operator bool
Change-Id: Ibf41d6051fe35aac37fb40ca3c499d0daacebc65
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-05 09:00:58 +00:00
Lars Knoll 9755cf48cb Create proper template objects
Create the proper template object for a tagged template.
This fixes quite a few use cases (esp. String.raw), but is not
yet 100% spec compliant.

Change-Id: I69eaee22c384c0d1bd2c6c56ad711d29521b0b86
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-02 18:44:11 +00:00
Lars Knoll 4241ce2cfc Pass the raw string value to template literals
They are required for spec compliance of tagged
templates.

Change-Id: I8ef8e2314843f07a02d204394400f3f3894f8f91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-11-02 18:44:01 +00:00