Also improve (docs and runtime checks) and test the minimum set
of required data to create a graphics pipeline.
Task-number: QTBUG-78971
Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The joys of "level - Specifies the mipmap level of the texture
image to be attached, which must be 0." for glFramebufferTexture2D
in OpenGL ES 2.0.
Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Use only APIs that are in GLES 3.0.
glMapBuffer() is an old OES extension, stop bothering with that.
Not the least because ANGLE claims supporting it and then fails the
map. (not that we care much about ANGLE, but, for instance, the qrhi
autotest is run with ANGLE configurations as well in the CI, so have
to still take care of it for the duration of Qt 5.x)
Change-Id: I29140402cedffe0430f920ee0c061673257c3aa1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
...and make the Null backend able to deal with these, for RGBA8 textures
at least. Naturally it is all QImage and QPainter under the hood.
Also fix a bug in the OpenGL backend, as discovered by the autotest:
the size from the readback did not reflect the mip level.
Task-number: QTBUG-78971
Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The interesting part here is that sending messages to a null
object is valid in Objective-C, so without an explicit check it
is not necessarily straightforward to discover that we do not
have working rendering. (because the application won't just
simply crash)
Do the right thing now and return false like other backends do.
Task-number: QTBUG-78994
Change-Id: I0d3c4a49a3fc78f9149f8af4fe67d581e74daae7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This also marks the beginnings of significantly extending autotesting
of the resource and rendering functionality in QRhi.
Also involves fixing up the buffer operation lists like we did
for textures before. This is to ensure updates and reads on the
same batch execute in the correct order. So just have two lists:
one with buffer, one with texture operations.
Also simplify the struct layouts. No need for those inner structs
with many duplicate members. This reduces the size even, since using a
union was never an option here. Also switch to a VLA, the size is around
253 KB per batch.
The Null backend now keeps track of the QRhiBuffer data so it can return
valid results in readbacks.
Task-number: QTBUG-78984
Task-number: QTBUG-78986
Task-number: QTBUG-78971
Task-number: QTBUG-78883
Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
CONFIG(cross_compile) implies CONFIG(force_bootstrap). The latter is
errorneously used within qt_tracepoints.prf and to decide when
tracegen is to be build.
For the tracepoints, we just need to check if etw/lttng trace points
are enabled.
For tracegen, we don't need to check anything - it doesn't depend
on etw or lttng, it is just a code generator similar to moc or rcc
and should be handled like these tools.
Change-Id: I3784b37db10680efd0ed7ee7860059bdf62b4118
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Properly return an invalid frame when calling jumpToFrame()
with a non existent frame number.
Fixes: QTBUG-79029
Change-Id: Ic40f4a6de3106fab42c0bb6c961194be47b04e31
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Fixes runtime warnings that got triggered by change
c2d2757bcc.
Change-Id: I50620b179de8608f45d6f2ef053eeb8b1e10ae43
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
QString::fromAscii() is deprecated since 5.0 but still tested.
So suppress deprecations for its code.
Change-Id: Ic048a843c43551021da39a16d94c3222201573dc
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This ensures that also linker commands like -pthread are returned.
Fixes: QTBUG-77159
Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
since declarations in gssapi.h are marked as deprecated.
Fixes: QTBUG-78810
Change-Id: I241ae4913f362f6e9219438e9bfe7a63dfc91b7c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:
QIODevice::write device not open
Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If two widgets are on top of each other, and the top widget disappears
in response to a press or release that is followed by a double click,
then the widget at the bottom only receives the double click event.
This is a sequence of events that the application developer that choses
to build such a UI has to take care of.
Change-Id: I440efd2cac01631de8995abf9a9fb76815de8f9a
Fixes: QTBUG-61173
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This powers a QQuickWidget and we also need to reset the context if we
get a context loss event.
Change-Id: Id8b7112606670985860069c2bb11cf141b3ac723
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
If the user specifies a font family in their application that doesn't
exist in the system, or one that uses the localized family name, we
will end up resolving the family alias for all fonts in the system,
which typically adds 600-800ms of startup time. Let the user know
when this happens.
Change-Id: Id8d6f55028e37f681ec4a686df25d33240b5a30f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Change-Id: Ieb7fa19e8bdd98f5283f7f6d8751e6532c8e0fc4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This variable was ignored for iOS projects, because the generated
Makefile includes xcodebuild.mk that defines its own default target.
Export PRE_TARGETDEPS to the Makefile before including xcodebuild.mk
and use it there for the dependencies of the generic build targets.
Fixes: QTBUG-41325
Change-Id: I5faa82e05570974b5a844ae95b0a012c3badc64a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
By default we disable screen blank and hide the cursor. This is something
inherited from Qt 4. Then reset to some default values when exiting.
This is not ideal when the system is configured with kernel parameters
like consoleblank=0 or vt.global_cursor_default=0.
So have a way to skip all tty voodoo. On systems where relevant,
one can now launch with QT_QPA_PRESERVE_CONSOLE_STATE=1 set.
[ChangeLog][Platform Specific Changes][Linux] Added an environment
variable QT_QPA_PRESERVE_CONSOLE_STATE that can be used to prevent
Qt from altering the tty screen and cursor settings when running
with platforms like linuxfb and eglfs.
Task-number: QTBUG-61916
Change-Id: I0e84e53f2d5fca992a7d26d0280ba35e30523379
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Sometimes when setAlignment is called, the text stops rendering
correctly at some point. Adding relayoutDocument call to setAlignment
fixes the problem.
Fixes: QTBUG-78728
Change-Id: Iab1cf161f0c8d700804448733338c813b5bf9762
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
And add a test for it so it can no longer happen in any current or
future implementation.
Change-Id: I3214aa90595e291b1e1c66befe185cfe1ea7bc6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
out of switch/case - can help in case some NSControl is using autorelease
and an application is calling drawControl too often.
Fixes: QTBUG-78761
Change-Id: I2b55d533f52db16703dcc965920f4316fdf76734
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Using desktop GL with this graphics card causes crashes e.g.
when using Qt WebEngine.
Fixes: QTBUG-58772
Change-Id: I90e12aab4475c17be262e391ff0989cebf0b3ec4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
ICC 19 barfs on the TextCodecsMutexLocker class because it doesn't
have a user-provided default ctor:
../../corelib/codecs/qtextcodec.cpp(543): error #854: const variable locker requires an initializer -- class TextCodecsMutexLocker has no user-provided default constructor
[...]
But the class doesn't have members that would delete the
implictly-declared default ctor, so no user-provided default ctor
should be necessary:
The only member is the result of qt_unique_lock(), which is
std::unique_lock, which does have a default ctor.
We conclude that this is a compiler bug, and work around it with the
introduction of a user-provided default ctor.
Fix brace placement as a drive-by.
Fixes: QTBUG-78844
Change-Id: I1f5a326afd68138fbebad506ba9aa1926f1afb85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's added automatically when some languages such as Japanese are
the active input language/keyboard, which results in UIKit triggering
the edit menu for any tap in the UI, regardless of whether it hits
the focus object or not.
Adopting the protocol is a much larger effort and needs to be
coordinated so that we still support text interaction on iOS
versions pre 13.0.
Even with this patch the UITextSelectionView will still blink
its own cursor, which doesn't seem to sync up with the UITextInput
protocol's view of where the cursor is.
Fixes: QTBUG-78496
Change-Id: I61500ad7ab9c8577f71188c0c99ead39465e3839
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Screen refresh rate might not be just integer but with decimal part
like, for example, 59.97 Hz. Fix calculation from raw xcb data and its
store type as it is qreal already for QScreen::refreshRate API.
Task-number: QTBUG-73911
Change-Id: Ia0494e953176c2854f0ed42c4498a29cfef16106
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
- Fix indentation
- Fix empty name returned for WinRT.
- Remove duplicated string "Version" for Windows 10
Change-Id: Ia093006a6f8d8c88257d6b4e31afa37510dc6037
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Some parts of the new QTextDocument table border logic depend on the QCss
namespace which is not available with -no-feature-cssparser.
Change-Id: Ib8396894dc35872f22c634e1d6c38968d3dd4756
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QLocale::uiLanguages() on the system locale uses whatever the system
locale's query(QSystemLocale::UILanguages,...) returns. On Android,
this is just a list of locales. However, for non-system locales, we
also include some results of removing likely sub-tags from the locale
name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN
added to it; however, if the system locale is zh-Hans-CN, the shorter
forms are omitted. So post-process the system locale list in the same
way, albeit tweaked to avoid duplicates and rearranged so that we can
insert likely-adjusted entries between what they adjust and what
followed it.
Added QLocalePrivate::rawName() in the process, since it looks likely
to be useful in other contexts (and I needed its value): it just joins
such tags as are non-Any. This, however, uses QByteArrayList, so added
that (it's small) to the bootstrap library and qmake.
This follows up on commit 8796e3016f.
[ChangeLog][QtCore][QLocale] The system locale's UI languages list now
includes, as for that of an ordinary locale, the results of adding
likely sub-tags from each locale name, and of removing some, where
this doesn't change which locale is specified. This gives searches for
translation files a better chance of finding a suitable file.
Fixes: QTBUG-75413
Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Is't been deprecated since Mac OS X 10.5.
Task-number: QTBUG-74872
Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Instead of forcing the user to cast:
QCFType<CFFooRef> foo = (CFFooRef)CFFunctionReturningCFTypeRef());
We can do it for them, since we already know the expected type:
auto foo = QCFType<CFFooRef>(CFFunctionReturningCFTypeRef));
Change-Id: I994d5d6530f220288b4bfd6ab16eae9f159ce3ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Disambiguates between the QString and CFStringRef overloads.
Change-Id: I55a7121cd7449b4adc081f6bb7e29736e7af4442
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][qmake] The syntax 'LIBS += -frameworkFoo', or
'LIBS += "-framework Foo"' is no longer supported. Use the
canonical 'LIBS += -framework Foo' instead.
Change-Id: I50fd02dbfa155a0b95859734486a92bd448e87c2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Change-Id: Iedbe0e9363b6bd97071b38aa1d4546777b34139d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Commit f66c1db16c introduced Q_NAMESPACE_EXPORT and cmake automoc
needs to be told to trigger moc creation for headers using that.
The default value for this variable, from cmake's
Modules/CMakeGenericSystem.cmake is
set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE")
But it makes more sense to set this here than in upstream cmake, anyway,
given that changes to this list happen here in qtbase.
Change-Id: I07c85fd0bb5e03e98df7687a8663e28620e1fdb6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The base WindowSystemEvent has had an eventAccepted flag since 2014.
Change-Id: Ia0aa795083cd98ece83a4c1cc010d3a25e2489fd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>