summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-1511-80/+642
|\ | | | | | | | | | | | | | | Conflicts: tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
| * Unify application palette handling between QGuiApplication and QApplicationTor Arne Vestbø2020-01-132-52/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic is now mostly handled in QGuiApplication, with QApplication only dealing with the widget-specific palettes and interaction between the style and the palette. The application now picks up changes to the platform theme and will re-resolve the current application palette appropriately. This also works even if an explicit application palette has been set, in which case any missing roles are filled in by the theme. The palette can now also be reset back to the default application palette that's fully based on the theme, by passing in the default constructed palette (or any palette that doesn't have any roles set). This is also correctly reflected in the Qt::AA_SetPalette attribute. Conceptually this means QGuiApplication and QApplication follow the same behavior as QWidget, where the palette falls back to a base or inherited palette for roles that are not set, in this case the theme. Behavior-wise this means that the default application palette of the application does not have any roles set, but clients should not have relied on this, nor does QWidget rely on that internally. It also means that setting a palette on the application and then getting it back again will not produce the same palette as set, since the palette was resolved against the theme in the meantime. This is the same behavior as for QWidget, and although it's a behavior change it's one towards a more sane behavior, so we accept it. [ChangeLog] Application palettes are now resolved against the platform's theme palette, the same way widget palettes are resolved against their parents, and the application palette. This means the application palette reflected through QGuiApplication::palette() may not be exactly the same palette as set via QGuiApplication::setPalette(). Change-Id: I76b99fcd27285e564899548349aa2a5713e5965d Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Move away from CBOR in QShaderDescription serializationLaszlo Agocs2020-01-135-5/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...but keep support for deserializing for all older versions in order to play nice with existing .qsb files. The usage of binary JSON and then CBOR is a historical artifact: relying on the QJsonDocument (which we generate for purposes unrelated to binary serialization) was a convenient shortcut. However, writing to and reading from a QDataStream instead (which QShader already does) is trivial. In order not to be limited by potential CBOR requirements in the future, take it all into our own hands. Extend the qshader autotest accordingly. Task-number: QTBUG-81298 Change-Id: If0047b659bd6601ca47b5bbbce1b719630cde01e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * rhi: gl: vulkan: Generate barriers between dispatches in a compute passLaszlo Agocs2020-01-134-18/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new float16texture_with_compute manual test demonstrates a case that was not handled correctly before: multiple dispatch() calls in a row storing to and then loading from the same subresource(s). Without the appropriate barriers subtle data corruption issues appear. For Vulkan this also adds better batching for image/buffer barriers when using deferred recording. Also, for OpenGL this fixes the case of updating a buffer or rendering into a texture and then using it for load/store in a compute pass (previously this also lacked an appropriate glMemoryBarrier). Task-number: QTBUG-81217 Change-Id: I7970c445564473f9452662f4b1a20618cb8627a3 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * rhi: gl: Do not issue glMemoryBarrier when compute is not supportedLaszlo Agocs2020-01-131-2/+3
| | | | | | | | | | | | | | Avoid crashing in a < GLES 3.1 and < GL 4.3 contexts. Change-Id: I0f713a527890ec209c967ebb6c5bb3baa77d9a31 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-131-3/+21
| |\ | | | | | | | | | Change-Id: I50f70a789ab1438b40d4408be72c090fa00b801f
| | * Windows QPA: Update documentation on command line optionsFriedemann Kleint2020-01-101-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | Sort alphabetically and add recent relevant options with version information. Change-Id: I10c8cc82ce357775ed68cb811a0c906cd38633a5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-1314-115/+90
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
| * | Remove QShaderDescription::toBinaryJson(), deprecated fromBinaryJson()Ulf Hermann2020-01-103-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binary Json is deprecated and we should not use it. We can already serialize shaders to CBOR. Push the deprecation warning mechanism to the only user of fromBinaryJson(). Change-Id: I1d56157ab92f74eaab49400be647317e7833e35e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Remove use of QImage::alphaChannel()Allan Sandfeld Jensen2020-01-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | A direct logical replacement. Not sure what is going on though or why an inversion is necessary, but logic is unchanged. Change-Id: Id9b5531895371f6467018fa82336aff6238ae126 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | rhi: Add R16F and R32FLaszlo Agocs2020-01-096-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | Can be relevant for Qt Quick 3D shadows, where the shadow map is R16F. Task-number: QTBUG-81268 Change-Id: Ic33e100929e133d1cbe0b062a15697c82536f62a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | rhi: metal: Fix incorrect native res. binding map checkLaszlo Agocs2020-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking for nullptr is insufficient: just because there is an empty map present, it does not mean it is valid. The two cases must be handled identically. This fixes a regression when using QShaders that do not have an associated native resource binding map. Amends 4639660dedceba7c16e1a8110bba16eff30be312 Change-Id: Icb239bf9a9261ed32f2cb7b22c60b608195618fc Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | rhi: Remove ugly fallthroughsLaszlo Agocs2020-01-094-72/+0
| | | | | | | | | | | | | | | | | | | | | The coding style does not actually require this. Change-Id: I2be7cd29c4dabfed2822cd7fb63e597c071e5e15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-01-094-6/+18
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.cpp Change-Id: I4780b25665672692b086ee92092e506c814642f2
| | * QInputDeviceManager: initialize device countsSamuli Piippo2020-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The device counts were used before they were initialized, causing problems e.g. with mouse cursor. Fixes: QTBUG-81207 Change-Id: Ic9dadcaebeb4c4a64bb506e4236d5a9260e0fdbc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Share updates to QGuiApplicationPrivate::app_pal via helper functionTor Arne Vestbø2020-01-092-5/+16
| | | | | | | | | | | | | | | Change-Id: I2f582358efaadcd33b39c52317222322c589423f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Disable support for RasterOpModes in GL paint engineJean-Michaël Celerier2020-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This leads to crashes for instance when displaying a text cursor in a graphics scene. Change-Id: I1b5c884ddb8325a7f5bdbc6027f0fae13f139a1c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-103-5/+14
|\| | | | | | | | | | | Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
| * | Deprecate QJsonDocument methods for converting to/from JSON binarySona Kurazyan2020-01-091-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove the example code for deprecated methods and use CBOR instead where it makes sense. Task-number: QTBUG-81068 Change-Id: Iffb7a4b3d7b16a1e485fc05b3ab2e2468e9e0718 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | Silence deprecation warning about QImage::alphaChannel() in qpixmap.hFriedemann Kleint2020-01-091-0/+3
| | | | | | | | | | | | | | | | | | | | | Amends aa542be4e005b1feedc2e17fd6ca2387bf2fea1b. Change-Id: Id1a256a101cc16fa36d1254d3523cf0732c24045 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-091-3/+3
| |\| | | | | | | | | | Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
| | * Restore High DPI scale factorsFriedemann Kleint2020-01-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default rounding policy to "Round" so that 2 is used for 150% (144DPI) on Windows, as it was in 5.13. Fixes: QTBUG-80934 Change-Id: I0cba986ce6afc9e2737c656000ad854c07844360 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-091-4/+2
|\| | | | | | | | | | | Change-Id: I7be168303fc4fec5892f20f8dcbdf1bdfcd4986f
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-071-4/+2
| |\| | | | | | | | | | Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
| | * QTextDocument: Set the font family to be after the families setAndy Shaw2020-01-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends a1f4321bbba2f3bff24d753ce766be738dbfa61a as the font families should take precedence over the font family set. If the font family is already included in the families then it should keep its placement. Otherwise it should be appended. Task-number: QTBUG-80475 Change-Id: I0049189c88b6879e57619815ec780960e9c0a300 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-0724-376/+81
|\| | | | | | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-063-27/+19
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-063-27/+19
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | | * Fix semi-transparent text on Linux with subpixel anti-aliasingAllan Sandfeld Jensen2020-01-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly optimized rgbBlend function wasn't updated to handle SourceOver compositing when dealing with semi-transparent text color. The extra composition isn't SIMD optimized but short-cut for all opaque colors. Fixes: QTBUG-80982 Change-Id: I88c1e60fd5e80a8c7f9e6b0e7de8248c7c00ebc2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * QTextDocument: Give fontFamily() precedence over fontFamilies()Ulf Hermann2020-01-022-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the singular fontFamily() is given, then this is obviously the one to be preferred over any plural fontFamilies(). Make sure it always ends up first in the list of emitted font families. Change-Id: I1e3b1ba29721c8298b1a0d4a1e1da49ba5b4e7ac Fixes: QTBUG-80475 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | RHI: Remove old native texture APIPaul Olav Tvete2020-01-0617-280/+7
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78570 Change-Id: I8c4850828ac03319ac923a26c2e985883956c286 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Add environment variables for customizing VulkanPaul Olav Tvete2020-01-062-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_VULKAN_INSTANCE_EXTENSIONS to specify additional instance extensions. QT_VULKAN_INSTANCE_LAYERS to specify additional instance layers. QT_VULKAN_DEVICE_EXTENSIONS to specify additional device extensions. These will apply to all QVulkanWindows and everything that uses RHI, including Qt Quick with the Vulkan RHI backend. Task-number: QTBUG-80499 Change-Id: I912495affa987d62a9823d55d06d6a8209f6adc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | | Modernize setAlphaChannel(), and deprecated alphaChannel()Allan Sandfeld Jensen2020-01-052-67/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two methods have been marked obsolete for a very long time, setAlphaChannel() is still convenient though, so this patch modernizes it and removes obsolete from the API, while marking QImage::alphaChannel() as deprecated. They don't work as getter and setter anyway, since setAlphaChannel() actually does an alpha composition. Change-Id: I634d6463f78c42bb9c5fa3df17500ec01bfcac33 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-0436-1116/+1011
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-276-13/+25
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/platforms/xcb/qxcbscreen.cpp src/widgets/accessible/qaccessiblewidget.cpp Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
| | * Don’t reset highDpicaleFactorRoundingPolicyMorten Johan Sørvig2019-12-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Don’t reset highDpicaleFactorRoundingPolicy in the QGuiApplication destructior. This is a static property, independent of the application object lifetime. Change-Id: Ibf55e2a6ea1ae6429fce3f0e9d58323111aac374 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * High-DPI: restore rounding behavior on AndroidMorten Johan Sørvig2019-12-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt 5.14 introduced QApplication::scaleFactorRoundingPolicy, where the default policy rounds the scale factor to an integer, which matches Qt's behavior on Windows and X11. However, Qt has never rounded scale factors on Android. Restore the historical behavior and document the platform difference. Change-Id: I0f8e8fb65e3874338ea290bbb12da350da22f099 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * macOS: Deliver theme changes synchronouslyTor Arne Vestbø2019-12-192-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise the expose event that AppKit triggers will be delivered before we've propagated the theme change, and we fail to draw the UI using the new theme. Change-Id: I502122a2bf02a866d136106d831f0c2a0dfe26f2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Doc: Add since versionPaul Wicking2019-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for QCursor::swap and QOperatingSystemVersion::currentType. Fixes: QTBUG-80854 Fixes: QTBUG-80891 Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Sync implementation of QGuiApplication and QApplication setPaletteTor Arne Vestbø2019-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The two static setPalette methods in QApplication and QGuiApplication should have the same behavior in terms of what signals and events they emit. Change-Id: I54579d490e31f3783e2d4fea689ca799a070ff1d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Let sendApplicationPaletteChange() decide when it needs to exit earlyTor Arne Vestbø2019-12-171-2/+4
| | | | | | | | | | | | | | | Change-Id: I7a8e6c0b54d2a16a17b292a4102e05f743bcbe29 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Remove ApplicationResourceFlags::ApplicationPaletteExplicitlySetTor Arne Vestbø2019-12-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | After 8fb881900c7b it's tracked by AA_SetPalette. Since the latter is publicly observable we remove the internal flag instead. Change-Id: Ie69799f1b45d68017cb9eaab2a9986cc9ac9ca38 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Fix QPainter::drawLines() with cosmetic penEirik Aavitsland2019-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though each line in the array passed to drawLines() should be rendered as an independent line, some state was kept in the cosmetic stroker from one line to the next. This could result in visible rendering errors. Fixes: QTBUG-80834 Change-Id: Ief7bf78eab83ae34459802bff5a57d6beec4a5e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * QTextDocument: compile with QT_NO_PRINTERChristian Ehrlicher2019-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of QTextDocument::print() is not available when QT_NO_PRINTER is defined but the declaration was so when someone is using this function (and QT_NO_PRINTER) a linker error will occur. Fixes: QTBUG-56916 Change-Id: I49aaaa643c4d8587a66fc95733060cea11994872 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | New features for QPdfWriterJordi Pujol Foyo2019-12-194-33/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new API setDocumentXmpMetadata/documentXmpMetadata and addFileAttachment [ChangeLog][QtGui][QPdfWriter] New API to provide external document XMP metadata and attach files to PDF. Fixes: QTBUG-78651 Fixes: QTBUG-78764 Change-Id: Ic0b37e8d12899f907001db469080594c14c87655 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | QWindowSystemInterface: use QBasicMutex and qt_scoped_lockMarc Mutz2019-12-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to use a class-static mutex object here. Use a namespace-static QBasicMutex, port to qt_scoped_lock. Change-Id: Ia9bd3c2fadbf1da25ef79bb393c899b678cbc182 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Liang Qi2019-12-164-3/+4
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-164-3/+4
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | | * Use pkg-config to find libjpegMarius Kittler2019-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I42d877fbca5d746114cc28f8ee4db3e54754cd24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * OpenGL: Fix signature of GLDEBUGPROC in qopenglextrafunctions.hAlexandru Croitor2019-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typedef "QOPENGLF_APIENTRYP" was incompatible to the one in "src/opengl/qopengldebug.cpp" which used "QOPENGLF_APIENTRY". Note the misisng "P " ending. The type is meant to be a function pointer, not a pointer to a function pointer, so remove the extra P. Change-Id: I229b73ca8e7367f88a2b48e2728e615605f02da3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>