Commit Graph

41232 Commits

Author SHA1 Message Date
Laszlo Agocs
08a601035c rhi: gl: Remove fake uniform buffer offset alignment requirement
Change-Id: I5408e53f90c1c19836c400659bac15a8690c6ae8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2019-09-28 22:13:14 +00:00
Laszlo Agocs
cd5a0bc735 rhi: Always enable debug info printing from manual tests
It can be important to see for example the adapter enumeration that is
printed when qt.rhi.general is enabled. Make it enabled by default in
the tests.

Change-Id: I7bd073781e176d9b17b5386c548e9f8a2e16c10f
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-29 00:12:53 +02:00
Tor Arne Vestbø
72dd9de283 macOS: Avoid automatic resizing of layers by fixing them to top-left
When a layer is resized, e.g. during a window resize, the contents of
the layer may lag behind if the client doesn't fill the layer in
response to the window resize and corresponding expose event.

The default behavior is for Core Animation to stretch the content
to fill the layer, but this results in the content "jumping" back
and forth when the content then picks up the new size and fills
the layer.

Instead we tell Core Animation to fix the content to the top left
corner. If a layer is sized up without a corresponding layer contents
update this will result in missing/transparent pixels in the bottom
or right part of the layer, explicitly showing what the result of
the missing paint is. During debugging we also highlight this area
by adding a magenta background color to the layer.

Conversely, if the layer is sized down we don't need to resize it,
we can just keep the fixed top left position, and the content will
stay in place during the resize. This allows for optimizations
during window resizing, where we don't need to allocate new
buffers if the old buffer is larger than the new one.

Change-Id: I265b57e3a0ddff8bbcda3af5d670cd8c3b00b181
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-28 15:35:14 +00:00
Tor Arne Vestbø
4fade3c3b8 macOS: Resolve layer contents scale based on DPR
Change-Id: I32de4610a2aebbc7e0adcad9bb3440683cae5906
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-28 11:00:06 +02:00
Tor Arne Vestbø
cefd214b1b macOS: Improve layer delegate setup
We should detect the cases where there's already a delegate, and
setting up the delegate before the layer is added makes sense.

Change-Id: I67896cbc96d11ce9a3826fd8aa0e5e104a83a21c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-28 11:00:02 +02:00
Tor Arne Vestbø
fd49d5e315 macOS: Flesh out and clarify layer setup
Change-Id: I10d972254c02de8789e64c8503861d51764a1633
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-28 10:59:58 +02:00
Tor Arne Vestbø
ce8a9c1b01 macOS: Propagate drawRect: dirty bounding rect as fallback
Change-Id: I333e2bfe4a25bfbfebef7b2ec30a600fd441c9a9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-28 10:59:54 +02:00
Tor Arne Vestbø
10780c7b8c macOS: Gather QNSView draw callbacks together
Change-Id: I29881b379481287b4938e47fc06405c918aa39a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-28 10:59:43 +02:00
Kai Uwe Broulik
6883699994 QCommonStyle: Add SP_DialogNoButton case in standardIcon
It is present in standardPixmap but missing from standardIcon resulting in
QMessageBox using the fallback PNG provided by Qt for the "No" button.

Change-Id: If4f14c7de26eb32277cd19a7be75360dba4f4e29
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-09-28 06:53:11 +00:00
Laszlo Agocs
d83995caab Add an i.MX8 (aarch64) device spec
Not much different from i.MX6, apart from switching to aarch64 and the
appropriate tune flags.

[ChangeLog][Platform Specific Changes][Linux] Added a device spec for
64-bit i.MX8 systems (Vivante graphics stack)

Change-Id: I1fe939fca87d5f3031cefbf43fa359aeeaf44752
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-09-28 08:36:12 +02:00
Laszlo Agocs
d8cdf87de6 rhi: d3d11: Make tdr header private
Forgot the _p suffix.

Change-Id: I48225418fd40d45020b016b59578fcc1944d15c0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-28 08:35:59 +02:00
Tor Arne Vestbø
401e81063f Replace use of deprecated API in macOS event dispatchers
Change-Id: I077ba12b406f662ba22b2f2cddf0171963335739
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-28 01:13:11 +02:00
Alexander Volkov
388d539865 doc: Fix variable name in QDBusArgument snippet
Change-Id: I751802d3f9f389e80cbb9aabcdb637d4742d3832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 18:27:17 +03:00
Edward Welbourne
25430f90e6 Fix documentation of qfloat16
Various methods were undocumented and even one that was lacked a \since 5.14

Change-Id: I1e65ed1bb9c5b9de06210d7e18af36539aafc4ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 13:56:59 +02:00
Edward Welbourne
72457ed076 Fix doc of QDateTime::YearRange; include its \since 5.14
Change-Id: I2e6c27953ecce95df3ac4868a6d953596ba115f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 13:56:55 +02:00
Laszlo Agocs
fc8d6d3ea1 rhi: gl: Fix not resetting color write bits when switching pipeline
This was visible in the triquadcube test when enabling transparent window
background: the cube on the left was rendered incorrectly because alpha
was not written out due to not setting glColorMask() back to the defaults
when switching to another pipeline.

Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:43 +02:00
Laszlo Agocs
0628932fef Move cache key calculation to QOpenGLProgramBinaryCache
This class will likely be used by the OpenGL backend of QRhi as well.
Therefore, we need to make it more self-contained and independent.

Change-Id: If046ed41e25c70cc9abb45219b451f9179feaa1c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:39 +02:00
Laszlo Agocs
c06627a230 rhi: metal: Eliminate redundant setCullMode and setFrontFaceWinding calls
Task-number: QTBUG-78605
Change-Id: Icc3a9636055b5f45418da28cc05aa02e19370c02
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:28 +02:00
Laszlo Agocs
22d22eb282 rhi: Add a --transparent option to manual tests
This will also cause clearing to 0,0,0,0.

Essential in order to allow fast testing of window transparency
issues in combination with QRhi and the various backends.

Change-Id: Iee2763c1d06f1d3e5d59a9142abaf30fab1dc543
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:12 +02:00
Laszlo Agocs
30e27328e3 rhi: Unify handling of special cases for scissor and viewport rects
With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative
width or height. Everything else is allowed. This is also the semantic we wish to
keep for QRhiViewport and QRhiScissor.

This raises some problems. For instance, when we do bottom-left - top-left
rectangle conversion, the case of partially out of bounds rects needs to be
taken into account.

Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when
the QQuickWindow size is decreased so the content does not fit because that will
then start generating negative x, y scissors for clipping (which is perfectly
valid but the QRhi backends need to be able to deal with it)

Then there is the problem of having to clamp width and height carefully, because
some validation layers for some APIs will reject a viewport or scissor with
partially out of bounds rectangles.

To verify all this, add a new manual test, based on the cubemap one. (cubemap was
chosen because that is an ideal test scene as it fills the viewport completely, and
so it is visually straightforward when a scissor rectangle is moving around over it)

Fixes: QTBUG-78702
Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:05 +02:00
Edward Welbourne
06a7aba731 Fix QCalendar::isValid(): make it const
Spotted in API change review, thanks to Albert Astals Cid.
Also added documentation of this method.

Change-Id: I2ef2c526a98b571a3cb3bb5f93d1952b1b0d63a9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-09-26 09:53:23 +00:00
Friedemann Kleint
dc042c6dee Windows: QSysInfo::prettyProductName(): Improve version formatting
For Windows 10 and higher, the SP version and major/minor versions
are not relevant any more; the release id (displayed by the winver
tool as "Version" should be displayed instead. Add helpers and
change the output accordingly.

For Windows 7, output the build number.

[ChangeLog][QtCore][Windows] QSysInfo::prettyProductName()
now returns a version including the Windows 10 release id or Windows 7
build number respectively, resembling the version string displayed by
the winver tool.

Change-Id: Ia783272a0da234d2f7ff35c4a9a6fc296da277e0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-25 17:15:29 +02:00
Tor Arne Vestbø
fc4a6b0b97 Fix rpath on UIKit systems
Change-Id: I0b35c32f3730dc15d868b10489abeda909bbe926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-25 15:39:10 +02:00
Tor Arne Vestbø
9a1eb86f3d macOS: Prevent warnings about object files without any symbols
Change-Id: Iafe976bdd27da0476b2e6bb6d84db8ca34aa0a62
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-25 15:39:02 +02:00
Allan Sandfeld Jensen
d512f5ac3a Handle returned bitmap glyph when not requested
Add back code to handle bitmap glyphs returned when we did not request
a bitmap glyph. This is a can happen on some configurations where
bitmaps are not suppressed.

Fixes: QTBUG-78116
Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-25 14:46:36 +02:00
Christian Ehrlicher
70c053ee68 QAbstractSpinBox css: properly honor spincontrol-disable-on-bounds
The css style 'spincontrol-disable-on-bounds' was not properly honored
within QAbstractSpinBox::initStyleOption() because the affected widget
was not passed to QStyle::styleHint(). Therefore QStyleSheetStyle did
not find the correct render rule.
Fix it by passing 'this' as third argument to QStyle::styleHint().

Fixes: QTBUG-18008
Change-Id: Iabcebf0b83143f45309b4e7066bccb8d20bd0419
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-23 18:39:08 +02:00
Tor Arne Vestbø
1d1ed01711 Xcode: Ensure there's always a CFBundle[Short]Version[String] set
Leaving it empty resulted in errors from Xcode when compiling the app.

Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-09-23 16:02:59 +00:00
Shawn Rutledge
da46ea92e5 doc: add a note to QFileSystemWatcher about files saved by re-creation
Fixes: QTBUG-46483
Fixes: QTBUG-53607
Change-Id: I434f177b35689d55aa1deea360bf7e6ae009ad68
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-09-23 17:33:52 +02:00
Edward Welbourne
22742c5f21 Include missing shbang line in executable shell script
Change-Id: I802665c89fcac9e07e745cf6dce1a04404ae764d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-23 16:31:48 +02:00
Laszlo Agocs
b8d8e0dfbb Follow platform plugin change wrt layer size
Have to set the drawableSize ourselves.

This is not yet fully correct in the sense that does not ensure
what the platform plugin patch tries to enable, namely atomic frames
when it comes to the drawable size. Going to fix that up in separate
patches, maybe it will need some QRhi API changes as well so won't
mix that in here.

Change-Id: I47a3816930bc6a87a2c96d4a6c4c85b2577147dc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-23 15:10:13 +02:00
Edward Welbourne
35aec918c1 Rearrange tst_QNumeric's tests for infinity and (quiet) NaN
Separate quiet NaN from infinity and expand the nan-with-payload test
to a general test that bits outside the exponent don't break qIsNan().
Generally test more thoroughly and systematically.
Tests for signalling NaN shall follow.

Change-Id: Ib35dabacc8ebcc9a0761df38f6f419f0398d0e20
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2019-09-23 14:57:48 +02:00
Liang Qi
2dfeea921b Avoid unused parameter 'grab' warnings
Android (5220042 based on r346389c) clang version 8.0.7:

src/plugins/platforms/android/qandroidplatformwindow.h:68:35: error: unused parameter 'grab' [-Werror,-Wunused-parameter]
    bool setMouseGrabEnabled(bool grab) override { return false; }
                                  ^
src/plugins/platforms/android/qandroidplatformwindow.h:69:38: error: unused parameter 'grab' [-Werror,-Wunused-parameter]
    bool setKeyboardGrabEnabled(bool grab) override { return false; }
                                     ^

Change-Id: I4d8a18d5e3bfbc13c05b47f0cdfe10370673e359
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-09-23 14:04:38 +02:00
Tor Arne Vestbø
0642ca3528 macOS: Don't update Metal layer's drawableSize automatically
Like our other rendering code paths, the Metal path should allow the user
to resize their surface when they see fit. This is the case today with
e.g QBackingStore::resize() and QOpenGLPaintDevice::setSize().

[ChangeLog][macOS] The drawableSize of Metal layers is no longer updated
automatically on window resize or screen change. Update the size manually
in response to resizeEvent(), or at the start of each frame, as needed.

Change-Id: I9ed6d4326d0e0a3f4e3c63984d3b193e8bb77cae
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-23 13:59:00 +02:00
Tor Arne Vestbø
04dcc902eb macOS: Handle backing property changes in a single place
Change-Id: I70d57632a1756f74249f64d4d4c405cb3120a179
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-23 11:46:29 +00:00
Allan Sandfeld Jensen
6db83e2584 Fix crash with gamma-corrected text blending disabled
Change-Id: I7e3ca78278bf8bf2dda44711eb57d64aa6f455ce
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-23 10:47:50 +02:00
Mårten Nordheim
895a786827 Fix crash when using signaldumper and sender is deleted
Testlib's signaldumper functionality would crash inside
testlib as it dereferenced the sender after it was deleted.

Change-Id: I6013b75b0a121e2768429d8a3cf0339a940314f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-23 08:27:18 +00:00
Liang Qi
4f757e0757 Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-23 09:31:06 +02:00
Liang Qi
6572650641 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
2019-09-23 08:35:49 +02:00
Laszlo Agocs
60e20abf19 Add a RPi4 device spec
[ChangeLog][Platform Specific Changes][Linux] Added a device spec for
Raspberry Pi 4 (32-bit, V3D)

Change-Id: Idea889842a89dcc74705f1bb9559953dadc07251
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-09-22 15:49:40 +00:00
Allan Sandfeld Jensen
d0d18b0645 Handle transparent pen color in fast text path
Switches the text blending to be SourceOver as that is
much more common than Source, and means we can now handle
semi-transparent text colors there.

Task-number: QTBUG-72165
Change-Id: I7b3aedb22412e6fb6f60197596b37f26c6008784
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-22 17:15:26 +02:00
Shawn Rutledge
bc35941dbb Add QQuickMultiPointTouchArea as a friend of QTouchEvent
QQuickMultiPointTouchArea needs to understand whether a stationary
touchpoint has relevant property changes, to decide whether to emit its
updated() signal. Amends 217dd1b3b0

Task-number: QTBUG-77142
Change-Id: I85e031820bef9d687369b7d67a57c67fe2875b4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-22 14:25:15 +02:00
BogDan Vatra
ec0e9f29df Android: Fix loading of plugins
In 5bb178c479, the Android platform plugin was moved from
platforms/android to platforms/. The unforeseen consequence of this was that the plugin
loader for plugins/platforms would now find it, whereas before it would be ignored. It
would therefore be detected as the appropriate plugin, but since it was intended to be
loaded as a static plugin, loading it dynamically would fail.

Instead of fixing the static plugin loading, we remove this hack.

Fixes: QTBUG-78440
Change-Id: Idcb6c075fdebaf67644f32a59d7aaf0d1c0bbe20
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-22 14:25:11 +02:00
Andy Shaw
ac5e198db4 Add SQLite specific documentation when specifying a database name
Fixes: QTBUG-67847
Change-Id: I3c640233526260b596e8224dc48f713a3f0cff56
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-21 11:29:58 +02:00
Andy Shaw
9b6179cf95 Ensure all children of a widget get updated when a stylesheet changes
Before, only the direct children would get an update when the
stylesheet changed, any children below that would be unchanged.

Fixes: QTBUG-77006
Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-09-21 01:09:51 +02:00
Eirik Aavitsland
b8a911fbeb QPainter: Avoid leaking memory on unbalanced save/restore
If a QPainter ended without all saved states having been restored, the
state stack would leak memory.

Fixes: QTBUG-77843
Change-Id: I760904d6391de24a4867be54fa1bebf76be14ba7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-09-20 13:01:14 +02:00
Joerg Bornemann
f155c40fdc Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-20 12:42:25 +02:00
Leena Miettinen
51f1428d3c qmake: Replace WinRT with UWP in the qmake Manual
Remove info about Windows Phone, which is no longer supported.

Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-20 09:44:00 +02:00
Paul Wicking
e9190eda1a Doc: Remove broken example snippet from Q_ENUMS
The code snippet is used by both Q_ENUMS and Q_ENUM. Therefore,
remove the example snippet from Q_ENUMS documentation, as it is
obsolete. Also, move recommendation to use Q_ENUM in new code to the
very top of Q_ENUMS' documentation.

Fixes: QTBUG-63203
Change-Id: I12a9f45e0b3bd75dfe98e1ecbc45e299a688b80c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-09-20 09:07:50 +02:00
Joerg Bornemann
73f880d393 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/makefile.h

Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
2019-09-20 08:20:47 +02:00
Christian Ehrlicher
6234286925 tst_QTreeView: cleanup
Cleanup QTreeView autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations / replace with QTRY_foo() calls
 - use override
 - use QStyledItemDelegate

Change-Id: I0e2d023254ed9f6f5d94cebf4d4358351cc4c3e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-19 18:06:22 +02:00