Commit Graph

103 Commits

Author SHA1 Message Date
Mitch Curtis 182bb9d04d Adjust to QUnifiedTimer slow mode changes
a318e331f1387eb3c9d13be96c28619453a35571 in qtbase.

Task-number: QTBUG-137919
Change-Id: I98e3871053bbb04b83aa114844f07293501d95d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-06-27 19:27:12 +08:00
Olivier De Cannière 6ac4833a51 qml-tool: Treat all arguments passed after "--" as positional
The argument "-a" passed after "--" was being interpreted as the -a
option of the qml tool itself instead of being passed along to the qml
program as a positional argument.

Fixes: QTBUG-136120
Pick-to: 6.9 6.8 6.5
Change-Id: I602aea84e4766abeb47adce0f739f12315a70b24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2025-04-23 16:00:07 +02:00
Fabian Kosmale 6e75f50634 qml tool: Explictily register types
We are sporadically seeing weird failures on macOs that the types from
the module are not available. This could not be reproduced reliably, but
we suspect that the linker might discard the (static ctor invoking the)
registration function.

Avoid this by calling it explictily.

Change-Id: Ic405dd5f226af3580efe7dd5d8202a6a263a367e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-02-12 05:36:23 +01:00
Laszlo Agocs d4d18dbeaa Mention d3d12 in qml tool help text
It works since 6.6 regardless, but the help text had no mentioning of it
at all.

Also use the nicer "opengl" instead of "gl" (both are accepted by
QSG_RHI_BACKEND anyway)

Pick-to: 6.7 6.6
Change-Id: Ibf6de9411d8641d244b8750fd7a015781a9297b1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2024-03-14 11:41:59 +01:00
Ulf Hermann ff8c6222e4 Fix some compile errors when compiling with -no-gui -no-qml-debug
Change-Id: I33254477ad4535c898d1091b1275cc4d9a3de5d4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-01-17 15:36:27 +01:00
Shawn Rutledge e5007fcc43 qml tool: Use QCommandLineParser::process() rather than parse()
This handles the --version, --help and --help-all options.
Apparently there's no other way to handle --help-all, because
addHelpOption() adds two options but only returns one of them.
Amends bb6602bca2

Fixes: QTBUG-100678
Pick-to: 6.2 6.5 5.15
Change-Id: Iddd1ba2dae975d7256935d8d357e2f3ac6c013d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-05-16 11:48:14 +02:00
Ulf Hermann c6aa66b163 qml: Straighten out configuration QML module
Use qt_add_qml_module correctly, apply a standard resource path, and
move the files into the same directory as the module. Use upper case
file names for the (re-usable) container definitions and lower case file
names for the configuration entry points. This way we only need one
directory and therefore only one QML module.

Change-Id: Ic45dd0e8866f8f62bbaa639b6f138e9a75e05863
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-05-08 17:10:01 +02:00
Ulf Hermann 0d10fcbb0f qml: Construct QQmlApplicationEngine only when we need it
Otherwise we leak a lot of memory if any of the exit() calls is
triggered.

Change-Id: I338abe2ef63217e6b80ffc2f8fe65d9cac03d994
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-27 10:06:11 +02:00
Laszlo Agocs e936e466a5 qml tool: Fix incorrect mapping of --transparent to MSAA
Change-Id: Ief9f12c1b3dfab928b110278c1d49abb1028efe0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-03-17 12:12:52 +01:00
Jan Arve Sæther 10c33ed110 bin/qml: Fix broken handling of --translation commandline argument
The QTranslator was destructed right after it was loaded because it was
inside a scope

Pick-to: 6.5
Change-Id: I8c9d1604652f18f7d15aa7a0045f580cd8a25063
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-08 15:07:51 +01:00
Laszlo Agocs 36f0cb435e Bring QSurfaceFormat configurability to qmlscene's level in the qml tool
Restore the --transparent and --multisample options.  Also make the
default QSurfaceFormat setting universal (no need to tie it to the
option of forcing a core profile context), and prevent the warning
that is printed when the default surfaceformat is changed after the
application is already created with AA_ShareOpenGLContexts set. This
involves having to handle the relevant arguments manually early on,
not through QCommandLineParser.

All this matches the qmlscene behavior.

NB qmlscene requests 16 samples with --multisample which is completely
pointless in practice. Use the common 4 now.

Change-Id: I671e5f22846a715675ea936bb7cf2a31a849dc28
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-02-07 19:23:13 +01:00
Paul Olav Tvete 37f2c169a5 qml tool: Disable shader caching by default
When shaders are generated dynamically, such as with QtQuick3D, cached
shaders may get out of date if the QML file is changed.

Change-Id: I2c5484765e30da5c13fd175a9fcbad2473d55e62
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-02-07 18:23:13 +00:00
Ulf Hermann 1e3bf94b25 qml: Fix object counting
We're not actually interested in whether an object is a window, and we
don't really care how many objects are created. The only thing we need
to know is whether at least one object is alive after all files have
been processed.

Pick-to: 6.5
Fixes: QTBUG-110112
Change-Id: I8d79359f3fb7ec5a54545dc5858cf310b0f52935
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-23 10:08:24 +01:00
Marc Mutz c2d490a238 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-10-07 23:38:56 +02:00
Marc Mutz 958cd3ee10 Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-07 23:38:48 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
Ulf Hermann 9575b54a4e qml: Don't mangle the settings URL
If you do QUrl::fromLocalFile() on a file name starting with ":" you get
a rather curious URL.

Change-Id: I07d35e792b87a66fffc9c992462d92a4c0c8040d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 08:59:55 +01:00
Shawn Rutledge 08ee029ed8 qml: Deprecate the --dummy-data option
[ChangeLog][QtQml][qml] The QML Runtime tool's --dummy-data option
is now deprecated, because context properties are deprecated. This
option will be removed in a future version of Qt.

Task-number: QTBUG-96800
Change-Id: Id6ef8a384f6239ddeebd6c4f84854bbeaf630279
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-09-24 11:32:23 +02:00
Shawn Rutledge a15472716d Teach the qml runtime to load config files by basename
Also, --list-conf will now list the conf files that it finds;
and --verbose will show more information about the path(s) to them.

[ChangeLog][QtQml][qml] The QML Runtime tool's -c / --config option
now can find a directory containing a file called configuration.qml
under QStandardPaths::AppConfigLocation, in addition to being able to
give the full path to the configuration file, as before. I.e. on
Linux you could write a custom configuration into
~/.config/QtProject/Qml Runtime/myconfig/configuration.qml
and then use it via qml -c myconfig somefile.qml. The --list-conf
option will list the configurations that can be found in this way.

Task-number: QTBUG-26366
Fixes: QTBUG-96740
Change-Id: I72798b22255b71b9d4184a67f86b249766b64233
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-09-22 20:39:52 +02:00
Ulf Hermann 19d2e70ad7 qml: Avoid memory leaks when no objects are loaded
Instead of std::exit() use the early return mechanism we already have so
that any existing objects are gracefully destroyed.

Change-Id: Icb197879cc33ab22f07fc1486da44f9ff5b177bc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-08-10 16:00:08 +02:00
Ulf Hermann 3e5855cf74 qml: Don't leak the created objects
Rather, parent them to the watcher. The watcher lives in the main()
function's scope.

Change-Id: I2ac1d14d80d4100756a3ad94b6502d46fda30074
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-21 10:38:43 +02:00
Maximilian Goldstein 0af76a1c5f qml: Enable context sharing by default
The qml utility now uses context sharing by default, as previously done by qmlscene.
It can also be disabled in the same way, by specifying --disable-context-sharing.

This is needed for compatibility with QtWebEngine among other things.

Fixes: QTBUG-85107
Change-Id: I6155d32dfc55b385d33e1c805dae601b9710427e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-03-22 11:26:25 +01:00
Maximilian Goldstein cd074545c3 tools/qml: Implement --core-profile option
Already possible to do the same using environment variables but this ensures greater compatibility with qmlscene
and better ease of use.

Change-Id: I214aec41aad4369f54bca887e91ccb879153c8be
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-19 13:20:42 +01:00
Fawzi Mohamed 6d51f997df Uniformly support shebang
The "qml" tool was the only way of loading QML files that would respect
a shebang line. This is problematic as this way you cannot load such
files programatically using QQmlComponent, limiting their re-use. Common
tools like Qt Creator, but also qmllint, qmlformat, qmlcachegen, etc
would not recognize files with shebangs.

By moving she-bang support directly in the lexer all tools implicitly
support it.
Note that we could just as easily support '#' as extra comment
character along with //, but here we narrowly add support for in
the first line only, as node does (this means that javascript files
using she-bang accepted by node, are now accepted also by qml).

The only tool needing some adjustments is qmlformat, that has to emit
the she-bang again as she-bang and as first line.
Add tests for qmlformat, and sprinkle some she-bangs in the other
tests just to be sure it doesn't affect anything.

Change-Id: I1f6d881c7438bdb23163b5dbe829d59a35d11132
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-02-15 18:22:27 +01:00
Allan Sandfeld Jensen 38088c451d Replace qt_make_unique with std::make_unique
So we can remove it.

Change-Id: I037373f85c696ce04c55920b41377cc9843b0da3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-11-18 11:43:39 +00:00
Shawn Rutledge bae83ce840 Replace deprecated DataLocation with AppDataLocation
Task-number: QTBUG-87037
Change-Id: I1cb6cd15fbb5fe08a0280ed83d01fc1b49249524
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-10-25 09:39:50 +00:00
Tor Arne Vestbø d0eb261836 Remove use of deprecated High-DPI application attributes
Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-09-02 17:17:33 +02:00
Lars Schmertmann e79281533d Add ; to Q_UNUSED and UNUSED_PARAM
This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-26 19:18:03 +02:00
Paul Olav Tvete 83fb4f6743 Clean up QT_CONFIG(opengl)
Accelerated graphics is now possible without OpenGL support. With
this change, a Qt build with -no-opengl can still run Qt Quick with
a Vulkan, Metal, or Direct3D backend.

Fixes: QTBUG-84027
Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-17 17:42:01 +02:00
Laszlo Agocs abaf9bded3 Remove openGLContextCreated signal
No reason to have this in the API in 6.0, and it's already not emitted
at all in dev (because the direct OpenGL code path is now gone from the
render loops)

Some simple GL string printing has been removed from qml/qmlscene. This
opt-in feature has not been useful in practice anyway since QSG_INFO=1
prints the same things.

[ChangeLog][Qt Quick][QQuickWindow] The openGLContextCreated signal has
been removed from QQuickWindow.

Change-Id: Ifb647bbd1e828ebad2b775e8ce5c38723a0cda13
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-10 12:51:53 +02:00
Ulf Hermann 75563fa761 Clean up QQmlFileSelector
The global static map of file selectors is not thread safe. If you add a
file selector to engine A running in thread 1, you cannot at the same
time retrieve the file selector of engine B running in thread 2. Alas,
we only need the static map to discern file selectors from other URL
interceptors, and we only need to do this on QQmlFileSelector::get(),
which we don't use. Unfortunately it is public API, though.

Deprecate QQmlFileSelector::get() and add a different hack to discern
the interceptors for the case that it's still called. Also remove the
duplicate setExtraSelectors() method.

For this to work, we also add a method to QQmlApplicationEngine that
allows us to pass extra file selectors and delay the initialization of
QQmlApplicationEngine's QQmlFileSelector until the first file is loaded.

[ChangeLog][QML] QQmlFileSelector::get() is deprecated. You can use the
new method QQmlAplicationEngine::setExtraFileSelectors() to pass extra
selectors to QQmlApplicationEngine's internal QQmlFileSelector.
Manually created QQmlFileSelectors should be configured immediately
after creation, before they are used by the QQmlEngine.

Change-Id: Ia61a93777dc910b441a03ffb42d35a2a224c0e26
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-19 15:04:55 +01:00
Qt Forward Merge Bot f6808f89a8 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/quick/qquickmousearea/BLACKLIST

Change-Id: I3de2c6377d57f5f9204d2cfc688d50a7a0b4150c
2020-02-21 09:00:37 +01:00
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
Qt Forward Merge Bot 3e758800b4 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/imports/qtqml/plugin.cpp
	src/qml/qml/qqml.h
	src/qml/qml/qqmlmetatype.cpp
	src/qml/qml/qqmlmetatype_p.h
	src/qml/qml/qqmltypeloader.cpp
	src/qml/types/qqmlbind.cpp
	src/quick/items/qquickitemsmodule.cpp
	tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp

Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
2020-02-17 10:21:59 +01:00
Thomas Hartmann 3c24395934 Add QML_CORE_PROFILE support to QML tool
If QML_CORE_PROFILE is defined we use the CoreProfile surface format.
This is required for QtQuick3D.

For consistency we also introduce QSG_CORE_PROFILE.
Adding QSG_CORE_PROFILE also to qmlscene.

Change-Id: I4feee91740162cf36fa2668695b74f5a1279bb89
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-06 11:33:01 +01:00
Thomas Hartmann 6e111f96e3 Add support for file selectors to qml tool
This allows defining file selectors using a command-line option.

[ChangeLog][QtQml][qml] The QML Runtime tool --selector option now allows
defining a custom QQmlFileSelector.

Change-Id: I1be5efd273b2f387df72b1d5057f7281e5c0c156
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-04 06:25:00 +01:00
Qt Forward Merge Bot 9aceff567c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic2cea85917751b89c34768fd80d8b11f5706dd62
2020-01-21 01:00:14 +01:00
Qt Forward Merge Bot 67ac9dead8 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/quick/items/qquickitemview.cpp

Change-Id: Ib9faebdbef5eebb80f4e6aeb5b15b5df7494b157
2020-01-20 09:37:57 +01:00
Friedemann Kleint dbaf9685ca qml: Fix options that need to be set before QApplication instantiation
Move the Open GL and scaling options setting QCoreApplication
attributes into the helper getAppFlags() which already
handles the application type.
Change getAppFlags() to not modify argv which is not necessary
since the parser will accept the options.

Change-Id: Ib2f94f832e6551a938ff0e9bfe27649850d38d1e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-01-15 15:45:08 +01:00
Tasuku Suzuki 88e1dd9e77 Fix -no-gui build on macOS
Change-Id: Ifc520d58fc7294bad5c90e13ac72bb603f6fd33c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-27 18:55:44 +09:00
Qt Forward Merge Bot 9c7121df15 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/imports/qtquick2/plugins.qmltypes
	src/quick/items/qquickitemsmodule.cpp

Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
2019-10-04 11:29:16 +02:00
Ulf Hermann 50e76d84bf qml: Make sure the qml tool deletes its application
Otherwise the shutdown mechanism for debug services doesn't work.

Fixes: QTBUG-78828
Change-Id: I4ede5861a300d5b5007036d71ed84409ec4d450f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-10-02 11:20:05 +02: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
Laszlo Agocs 341ab77080 Add the graphics api independent scenegraph port
Opt in via environment variables:
QSG_RHI=1 -> enable using QRhi instead of GL
QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default
(the default is d3d11 on Windows, metal on Mac, gl elsewhere)

Or force a given rhi backend via the existing
QQuickWindow::setSceneGraphBackend().

Otherwise the default behavior is the same as before, the rhi code path
is never active by default.

-no-opengl builds are supported in the sense that they work and default
to the software backend. However, the rhi code path cannot currently be
used in such builds, even though QRhi from qtbase is fully functional
with Vulkan, D3D, or Metal even when qtbase was configured with
-no-opengl. This cannot be utilized by Quick atm due to OpenGL usage
being all over the place in the sources corresponding to the default
backend, and those host the rhi code path as well. This will be cleaned up
hopefully in Qt 6, with the removal all direct OpenGL usage.

Other env.vars.:
QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer
(assuming the system is set up for this)
QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect
QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too)
QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index
QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index
QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both
merged/unmerged, convert when needed - with some rhi backends this is
implicit)
QSG_RENDER_LOOP -> to override the render loop as usual. The default
with RHI is threaded for Metal, threaded for Vulkan on Windows, basic
for Vulkan on Linux and Android (to be checked later), while the existing
rules apply for OpenGL.

Not supported when running with QRhi:
  - particles
  - compressed atlases (though this is transparent to the apps)
  - QSGRenderNode
  - QQuickRenderControl
  - QQuickFramebufferObject
  - certain QQuickWindow functionality that depends directly on OpenGL
  - anisotropic filtering for textures
  - native text may lack some gamma correction
  - QSGEngine applicability unclear
  - some QML profiler logs may be incorrect or irrelevant

Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-04 10:44:26 +02:00
Shawn Rutledge 8d9a7e47aa qml runtime tool: support alternate conf; add resizeToItem conf
The qmlscene --resize-to-root feature has always been missing from
the qml runtime tool; however it was already possible to add it by
writing a custom configuration file.  Now we support loading different
configurations from resources as well as from the filesystem, and
the first new configuration being added here is resizeToItem.qml
which provides behavior equivalent to qmlscene --resize-to-root.

When the argument given to --config ends with .qml, by convention
it's to be loaded from the filesystem; whereas configurations from
resources are specified without the .qml extension (to make the
command line shorter).

[ChangeLog][QtQml][qml] The QML Runtime tool now has default behavior
matching qmlscene when the root QML object is an Item: it will be
wrapped in a Window which will resize the Item when the Window is
resized.  But you can alternatively use the --config resizeToItem
option, resulting in the same behavior as qmlscene --resizeToRoot:
resizing the root Item programmatically causes the wrapping Window to
be resized.  Behavior can still be customized in other ways using the
--config option with an external QML configuration file.

Task-number: QTBUG-53557
Change-Id: Icdcbbd12258105c33b64634049d735e022dfbd06
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 08:40:45 +00:00
Shawn Rutledge 6a03d300be qml runtime tool: --quiet disables categorized logging too
[ChangeLog][QtQml][qml] The QML Runtime tool --quiet option now
disables categorized logging in addition to qDebug, qInfo, qWarning
and qFatal, except for some early QPA-level categorized logging that
occurs during application construction.  You can still override
specific categories by setting QT_LOGGING_CONF or QT_LOGGING_RULES.

Change-Id: Icf986a7fa9980d07beed308df8f69fcc4da9d771
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 08:40:37 +00:00
Shawn Rutledge 05184f2976 qml runtime tool: group globals and declare static; improve padding
This fixes a few code model warnings.

Change-Id: I0739e19ad5601caa4177f0fd843b1a8d38c936a6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-25 08:40:30 +00:00
Shawn Rutledge bb6602bca2 Use QCommandLineParser in the qml runtime tool
Some advantages:
 - support double-hyphen options as well as the existing single-hyphen options
 - support translation of the usage text

[ChangeLog][QtQml][qml] The QML Runtime tool now accepts command-line
arguments in double-dash GNU style as well as the old single-dash style.

Task-number: QTBUG-53557
Change-Id: I9929c63841272894640abe254efaea9773eee633
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-24 14:49:33 +00:00
Qt Forward Merge Bot 53bd6b8111 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9ef4be23bfe35aa48d4c65d4159e72c527943845
2019-04-19 01:00:04 +02:00
Shawn Rutledge d7b7fed0cd Update the QML Runtime icon
A new one has been drawn; use it on all platforms, not just on macOS.
It is now also used as the default window icon, to be more identifiable
when minimized, etc.  Of course it can be overridden by plugins that
can be loaded from qml.

[ChangeLog][QtQml][qml] The QML Runtime tool now has an updated
application icon and a default window icon.  QtQuick applications
can still use QWindow::setIcon() to override the window icon.

Task-number: QTBUG-70826
Task-number: QTBUG-74662
Change-Id: I8671d0c99f7f4283dbe2dc4c605abb560f7bf1a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-04-17 06:25:10 +00:00