Just the basics for now. Start moving away of the assumption
of default backend = direct OpenGL, but limit the amount of
RHI-specific details for now. This should be sufficient
for the first preview in 5.14.
Change-Id: I94e80d5fbed1269f7e8911284c28ac5fbc858be7
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
QRhi will not do this for us. Also handle mipmap filtering correctly
in this regard.
This will fix rendering on WebAssembly.
Change-Id: I93a77b7c42bb43c59dfb7748f9fdbd7aa55f39bb
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
This change adds a new -cmake-output command line argument to
qmlimportscanner which outputs its result in a format which is
consumable by CMake.
This change also adds a new CMake package called Qt5QmlImportScanner.
It provides a function called QT5_IMPORT_QML_PLUGINS()
which is useful for projects that use a static build of Qt and which
also use QML plugins.
Calling it with the target name of your application does the
following:
- Runs qmlimportscanner at configure time to find out which QML /
QtQuick plugins are used by your project
- Links the imported QML plugins into the target
- Links the static dependencies of the QML plugins into the target
- Generates a .cpp file that initializes imported QML plugins,
which is subsequently compiled and linked into the given target
When Qt is built in a shared library config, the introduced function
is a no-op.
[ChangeLog][CMake] Added ability to import static qml plugins with
CMake builds using the new QT5_IMPORT_QML_PLUGINS function.
Task-number: QTBUG-38913
Change-Id: Ib9b9a69654eab13dfbe12d10f5cb28ba3c307d1b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
It's an anti-pattern.
Even though we don't expect other threads to destroy the last QSP
while we use the pointer obtained from QWeakPointer, play it safe
and use QWeakPointer idiomatically: as a non-owning reference, to
be converted to an owning one for the duration of our use of the
payload object.
Add an assertion that explains why we don't expect expired weak_ptrs
here.
Amends 0f035c0ad7.
Change-Id: Ia39ef5fa243e0e73110aae13da35f4f2ada73a73
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Requiring full function definitions as signal handlers has two
advantages:
1, We don't need a custom parser that magically recognizes properties
which would otherwise be an error in other components.
2, The user is forced to specify the full signature of the handler,
including any parameters. This helps when the functions will
eventually be compiled to C++
The old behavior is retained, generating a warning if any of the magic
bindings are still set in a Connections element. Only if no magic
bindings are found, the functions are connected. This is because there
might be functions named onFoo in old-style Connections elements and
silently connecting those to any matching signals would be a change in
behavior.
Change-Id: I8c78d8994fdcddd355fe822cde9a0702dc8c75de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The (gl) condition is clearly an oversight, the branch should be taken
if either gl or rhi are valid.
Change-Id: Ieb0a9aeec996f8940716f9fdafe90525b60fc248
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Mostly resource path issues. It also seems to be some issues with the
default folder of FolderListModel on Android.
Change-Id: I8260775afd53bfe33977a9571d37009703774ae8
Task-number: QTBUG-77335
Task-number: QTBUG-73512
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The test assumed that QFont::pixelSize always retured -1.
QFont::pointSizeF might also be -1.
Change-Id: Ia00ecdd897fc15de533bdfb34716d568c5c4c6c2
Task-number: QTBUG-73512
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Mostly fixes to the usual resource paths.
In addition, we now put the special file with UTF-8
I18nType?????.qml typename in a resource file on Android, which actually
works.
Task-number: QTBUG-73512
Change-Id: I1835b5d358c14fbb3f6dfc954de03594f7fed621
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Memory allocation is now handled by QMetaCallEvent.
Change-Id: I78a2145af6cf93de5e9d71d6b943841f67183fa8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
TestHTTPServer needs to convert QUrl to QStrings while also keeping
the resource information. (QUrl::toLocalFile() only converts to a local
file.)
Change-Id: I548a83f4db190efc89251a8335a52595829c5887
Task-number: QTBUG-73512
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
qmljs is not available on Android, so we skip the test
Change-Id: I93655fcbcaa405edf35846a93ef1467d651a62d7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This autotest is blacklisted as it is deemed flaky.
Task-number: QTBUG-77389
Change-Id: I3561c98f0248507755f99fd7b6fe24c3d24cb522
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
... in documentation links and in implementation, now that they have
been added. The doc links to QPlatformTheme::MouseDoubleClickDistance
and QPlatformTheme::TouchDoubleTapDistance were dead ends because
of those being private; and user code needed a way to read the values.
So now there is new API in QStyleHints.
Fixes: QTBUG-76944
Change-Id: I86bce4c7fe08c9da33745a4eed450757b3a30b03
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When changing scene, the stroke vertices were left with uninitialized
stroke colors when the item is re-attached to the scene. Marking the
shape data as overall dirty and triggering a polish ensures that the
data is kept in sync.
Change-Id: I3f472734a97908e6e8f6e58230c0c53dcc041868
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Fixes: QTBUG-77332
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This patch partially reverts the 5.15 related #ifdefs from commit
f38e071f5b. Those were introduced without
any test coverage and our own modules (qtquickcontrols 1 and 2) were not
tested with it or adapted. The change of behavior breaks our own
existing code.
Task-number: QTBUG-33444
Change-Id: Ie9823638c1a02281798b725f745b15e622f837c5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
See also c3059391fea326b7115cf038ecdad8e820a0c2d5 in qtbase.
Change-Id: I30d4e7349fa7d7604f9ef90692cd7749cd6728bc
Task-number: QTBUG-73512
Reviewed-by: Liang Qi <liang.qi@qt.io>
The code using QSignalMapper relies on dynamic property inspection,
and therefore can't use the lambda syntax for capturing the int value.
Since there is only one sender object, replace QSignalMapper with a
simpler mapper class, which emits the mapped signal by passing the
saved member value.
Task-number: QTBUG-76491
Change-Id: I6e8e527b1a92d39a1711d85c203df704c293d294
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Follow up to the 5.13->dev merge where the lack of the qt5 submodule
update made it impossible to use the new color argument.
Also implements the color argument for the rhi variant of the glyph
cache.
Change-Id: Ie6c6ba3d647335eb6173d0c9f7fbe3a4ed6b1f24
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The plugin is not tested in any form in CI, and some of the internal
changes in the RHI patch has some consequences here as well. Adapt
as necessary. Have not tested the plugin in practice but it compiles
now.
Change-Id: I482fa34802d0bd4d44570f852298c1227cf0bb71
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Required with Metal. Drawables and various system resources get
autoreleased and there is no pool to handle these on the SG render
thread by default.
This may present a slight perf hit in debug builds due to
QMacAutoReleasePool doing smart but - for us - unnecessary stuff
every time (so in our case, every frame) but will do for now.
This complements the QRhiMetal change for not holding onto the
drawable when skipping the present. The pool is essential then
to prevent nextDrawable from starving and so blocking.
Task-number: QTBUG-76953
Change-Id: Iaf803a0e20504d6b349d3564eda1677868fb29ef
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This was visible on X11 only because there beginFrame() happened
to fail once or twice with out-of-date swapchain when there were
a lot of resizes in a row. Handle this case correctly by waking up
the main thread as appropriate.
Change-Id: I67dc18522e1c05070267fd355095324f48259276
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It failed to show the content of the file that had an error if the file
was embedded as a resource.
Change-Id: Ib8e0627919fa1f7956588ac80179adb8539df0e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The bug is really in QQmlImportDatabase::setImportPathList(). It was
missing the same conversions that was done in
QQmlImportDatabase::addImportPath(), so it failed to use a resource path
as a import path because it did not convert ":/foo" to "qrc:/foo".
We therefore just use addImportPath() to ensure the paths are converted
properly.
Before this, several autotests in tests/auto/qml/qqmllanguage failed on
Android, since they were calling QQmlEngine::setImportPathList() where the
list had resource paths.
Task-number: QTBUG-73512
Change-Id: Idc64f5ad20ec665df7cb57ea1c346bc0975c3b0d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Should load from resource on Android...
Task-number: QTBUG-73512
Change-Id: I29f74e896000aeb2b42e27dd739c505d7838b605
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
- Do not warn about parent access in unknown components
This avoids false positive warnings when an imported component could not
be found (or when it actually was not imported).
We still warn about the component which could not be found, so the user
is still informed that something is not right.
We also still emit a warning when we know the properties of a component,
and parent is not one of them.
- Do not recommend the use of parent to address the root components
properties. For this to work, we would need to know whether the root
component reparents its children or not. Moreover, id lookups are
actually faster than parent lookups.
Change-Id: I83d0e71e4bf20d34a3e6d836c2b123b2bf0d416e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
- Fix the case where multiple unqualified accesses would be mapped to
the same signal (wrong in all but one cases), as the event parameter
has the same name and we were using a QHash. Fixed by using QMultiHash
and searching for the matching signal handler (by location)
- Recommend arrow functions for single line event handlers
Change-Id: I3cbb85fe0e49b454908ca03b4c86318ef02e364c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This would break importing older versions of a module, as we would try
to locate a singleton which does not exist in this version.
Fixes: QTBUG-77102
Change-Id: I78be1ec111d2be26a14b2a94bbf743cf6238cddd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Extends grammar to support generator functions in QML components and
adjusts codegen accordingly
The corresponding test case must be blacklisted in tst_qmlmin, as qmlmin
cannot handle yield statements
Fixes: QTBUG-77096
Change-Id: I47d45dd56289cdf073b41932a585259d3052de04
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>