Commit Graph

8 Commits

Author SHA1 Message Date
Ulf Hermann aa20222e84 Tools: Convert to static type registrations
qml and qmltime were still using qmlRegisterType() for some internals.
Let's get rid of those.

Change-Id: I68c0e7213f3b5b28670364c4db1cdec41d299b7d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-02-20 15:08:29 +01:00
Ulf Hermann cc1a604c70 Specify parameters of type registration in class declarations
Using this technique we can automatically register all necessary
revisions and minor versions of a type, using the metaobject system.
This greatly reduces the potential for mistakes and resulting
incompatibilities between versions of imports.

We assume that for each type we need to register all revisions of its
super types and its attached type, and that the revisions match. That
is, if you import version X of type A, you will also get version X of
its attached type and of any super types. As we previously didn't take
these dependencies into account when manually registering the types, a
number of extra revisions are now registered for some types.

Potentially, we can now generate the qmltypes files at compile time,
using moc.

Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-26 12:32:17 +02:00
Edward Welbourne 6d5a0a55d8 Convert uses of QTime as a timer to QElapsedTimer
Change-Id: Ia34d3980e48d2978c8c77e65b1ee2aa7f71fd985
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-06-12 18:32:50 +02:00
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Robin Burchell 1d6bdb6ba0 qmltime: Reject 0 iterations
Causes a divide-by-zero. Low risk, but let's fix it anyway.

Coverity-Id: 161333
Change-Id: I7631abdca469a5dd9e2becf32cc9aa4f5cf515dc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-18 17:53:50 +00:00
Friedemann Kleint 05e3cdd8ab Set Qt version on tools
Change-Id: I21d77b2eba7107528fc00db0cf5d87f8347b63be
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-11-09 09:18:44 +00:00
Liang Qi 68ba8fe3cc Merge remote-tracking branch 'origin/5.6' into 5.7
This change also fixes the build of two benchmarks, tst_affectors
and tst_emission.

Conflicts:
	src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro
	src/qml/qml/ftw/qhashfield_p.h
	tests/benchmarks/particles/affectors/tst_affectors.cpp
	tests/benchmarks/particles/emission/tst_emission.cpp
	tests/benchmarks/qml/pointers/pointers.pro
	tests/benchmarks/qml/pointers/tst_pointers.cpp
	tests/benchmarks/qml/qmltime/qmltime.pro
	tests/benchmarks/qml/qquickwindow/qquickwindow.pro

Change-Id: I595309d1e183c18371cb9b07af6e4681059de3b2
2016-04-08 13:03:25 +02:00
Robin Burchell c19590f720 Move qmltime out of benchmarks directory.
This is a tool, not a benchmark.

Change-Id: Ie6b4452a1235923e1663a8a525ddad8408d21545
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-03-15 08:20:36 +00:00