summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move FreeType font engine/database to QtGuiTor Arne Vestbø2020-05-2725-27/+38
| | | | | | Task-number: QTBUG-83255 Change-Id: If6be7057d6bd25b34acd99e18658744161985ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add a QPropertyAliasUlf Hermann2020-05-273-10/+399
| | | | | | | | | | | | A property alias is the equivalent of the "alias" keyword in QML. It provides the same API as QProperty, but redirects any access to the QProperty it was initialized with. When the original property is destroyed the binding becomes invalid and ignores any further acccess. Task-number: QTBUG-84370 Change-Id: I0aef8d50e73a2aa9e7703d51194d4c5480573578 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Never include windows.h directly in Qt codeLars Knoll2020-05-272-2/+2
| | | | | | | Please use qt_windows.h instead, so we avoid having min/max defined. Change-Id: Ic1b29666c427bf24556da5494af45ee5953ae827 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix various offset issues with DirectWrite font engineEskil Abrahamsen Blomfeldt2020-05-271-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 318a991907b6c08f52786160bafea1e30d3ad9bd and its follow-up commit beede51bca1a43befe42499ad784af57d2450162. This fix was incorrect and caused regressions elsewhere (QTBUG-84357) The issue in QTBUG-71928 (offsets on emojis) turned out to be much simpler: The emojis are expected to be drawn without any margin, but since we retrieved the margin for A32 there would be a mismatch between the margin used for positioning and the actual margin in the returned QImage from the font engine. Passing the correct margin in bitmapForGlyph() fixes this. But reverting these fixes reintroduces a clipping bug when using software rendering in Qt Quick: QTBUG-80180. This needs to be addressed in Qt Quick. It also exposes an existing issue with positioning in Qt Quick NativeRendering: QTBUG-84454. In addition, it caused an assert when running with ClearType disabled, which turned out to be because we were using the A32 margin in the A8 case in the DirectWrite engine. This was also the cause of QTBUG-50024 before, which is now also fixed. However, it also needs to work with Qt Quick, where the text is currently offset by margin * dpr and glyphs are clipped with the software renderer, possibly because of the offset in position. Task-number: QTBUG-71928 Task-number: QTBUG-84042 Task-number: QTBUG-80180 Task-number: QTBUG-84454 Fixes: QTBUG-84357 Fixes: QTBUG-50024 Pick-to: 5.15 Change-Id: I2c8f9f9e7dfb34d492e9833a02fa0c93e6a19513 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do a proper convert from [0-65535] to [0-255] on QColor integer readsAllan Sandfeld Jensen2020-05-271-29/+30
| | | | | | | | | We need to divide by 257 and round to undo our setter. Pick-to: 5.15 Fixes: QTBUG-84168 Change-Id: I55d2a8d1d05125d9560309cd77459cc94a92030f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove deprecated QProcess methodsVolker Hilsheimer2020-05-272-187/+3
| | | | | | | | | | | | | Add default parameter for arguments in start, startDetached, and execute for better source compatibility with Qt 5.15. This has the risk of then hiding incorrect calls to the previous overload taking a single "command" strings if code is ported from pre-5.15 or ignores deprecation warnings. This is acceptable, given that the alternative is that all calls to these functions would require a default constructed QStringList as the second parameter. Change-Id: I1ba4df97ac4894d007da5083c8359015d784ddbb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QTextMarkdownImporter: allow nesting text span formattingShawn Rutledge2020-05-271-0/+2
| | | | | | | | | | | | | | | The bold+italic combination indicated by ***triple stars*** requires this; but it enables combinations of italics, bold, strikeout, anchor text (and associated link formatting), image alternate text, and inline code formatting (monospace). A code span overrides the formatting from surrounding spans (which might be a bug to fix in another patch, if we compare to how md2html formats code nested in bold-italics for example), but the format stack restores state when any char format span ends. Task-number: QTBUG-81306 Pick-to: 5.15 Change-Id: I289556fa53de400eb50a4d159b9b344eafc517da Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QRhiVertexInputAttribute : Add unsigned int formats for vertex inputInho Lee2020-05-277-5/+80
| | | | | | Task-number: QTBUG-83173 Change-Id: I640cd1fe74227d2cc96672d6c7aaac93e1930bcd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QProperty: Support multiple observersUlf Hermann2020-05-274-17/+32
| | | | | | | | | Previously, only the first observer would get notified. Also, make sure that the notifiers are always retained when switching between bindings and values. Change-Id: I9c25c0f2e288dac3a335b68e618f7ddeb44be25a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QProperty: Apply coding style and avoid warningsUlf Hermann2020-05-271-1/+1
| | | | | Change-Id: I14efdb293a4be39b3849b34bd8013fdab016ce7e Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Update QColor::operator== documentationAllan Sandfeld Jensen2020-05-271-2/+6
| | | | | | | | | We also compare exact encoding, not just the same values in RGB. Pick-to: 5.15 Fixes: QTBUG-84436 Change-Id: Ia50be17864ee42cf1f6d44dd2cad27daca317faa Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Don't queue events in QFutureWatcher when pause is requestedSona Kurazyan2020-05-272-26/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When QFutureWatcher (or QFutureInterface) is paused, it doesn't mean that it will take effect immediately: the pending tasks may still be in progress and keep reporting results. At the moment QFutureWatcher will queue those events and report only with the next resume. This behavior is wrong, QFutureWatcher should not decide when to report events, the sender should decide when is the right time. There's no benefit in reporting already happened events with delay. Because of this, even the pause event itself was being reported after resume. Fixed the behavior by removing the logic of queueing events when the state is set to "paused". It seems unlikely that the users of QFutureWatcher rely on reporting events with delay. [ChangeLog][Important Behavior Changes][QtCore] QFutureWatcher will not immediately stop delivering progress and result ready signals when the future is paused. At the moment of pausing there may be still computations that are in progress and cannot be stopped. Signals for such computations will be still delivered after pause, instead of being postponed and reported only after next resume. Fixes: QTBUG-12152 Change-Id: I9f0b545ac096578c52cc72d60575c018c01e3368 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* moc: handle include directives in enumsFabian Kosmale2020-05-271-0/+10
| | | | | | | | | | | | When including files, moc inserts a MOC_INCLUDE_BEGIN and MOC_INCLUDE_END token into the token stream. Those are already handled in the toplevel Moc::parse function, but parseEnum lacked support so far. Pick-to: 5.15 Fixes: QTBUG-80578 Change-Id: I35c8fd959347d94af20090b3a505dd9e6bfaff88 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMimeDatabase/xml: use xmlstarlet instead of xmlEric Lemanissier2020-05-261-2/+2
| | | | | | | | some distributions (eg Ubuntu) don't provide xml executable, but only xmlstarlet executable Change-Id: Icc801ded8d4ec1ec4d1dab93289a2365f8cd9cbd Pick-to: 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix wrong default font sizes after changing scalingFriedemann Kleint2020-05-261-1/+21
| | | | | | | | | | Use the ForDpi versions of retrieving non clientMetrics. Pick-to: 5.15 Task-number: QTBUG-82267 Change-Id: I434f6980c47258bfe40d38723d3f66d71217e186 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Document how to use CMake for Qt TestLibKai Koehne2020-05-265-30/+19
| | | | | | Task-number: QTBUG-73058 Change-Id: I6e29a83a1346ea0d2f94fcf445e1de9c07072aa6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document how to use CMake for Qt XmlKai Koehne2020-05-267-82/+24
| | | | | | Task-number: QTBUG-73058 Change-Id: I2d19670016c9aef5e96d74b2b7e22c675058f30c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document how to use CMake for Qt ConcurrentKai Koehne2020-05-264-4/+20
| | | | | | Task-number: QTBUG-73058 Change-Id: I11398c5837b45ccacb9232609317213133ef20ea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Don't change the implementation of a method depending on QT_USE_QSTRINGUILDERLars Knoll2020-05-261-23/+13
| | | | | | | | | | | | | | | | | | | | | | | This is rather evil and caused crashes in static builds, when library and application where compiler with different settings of the QT_USE_QSTRINGBUILDER flag. The reason is that the implementation of QStringDecoder::operator() was different (and returning different data) with or without the setting. The compiler would thus create two very different versions of this method in different .o files. When linking the app, one of the implementations would be chosen, leading to crashes in places where the other one was expected. Fix this by only providing the QStringBuilder enabled version of the methods. They return a temporary object that's converatable to a QString/QByteArray anyway. Make sure that qdoc shows a simple signature. As a drive by fix a compile error in a code path that didn't get hit so far. Change-Id: I312fa564d0bc6b464f2b4466de1d53841f7b7b0f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Initialize variableLars Knoll2020-05-261-1/+1
| | | | | | Change-Id: Ibcccd93fd4654a087c323fde08dbadb64d22156c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Document how to use CMake for Qt OpenGLKai Koehne2020-05-267-97/+23
| | | | | | Task-number: QTBUG-73058 Change-Id: I8ba85fbba533c882ef63c56c1b9f20becfb36ebc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Remove mentioning of qmake from Qt PlatformHeaders documentationKai Koehne2020-05-261-1/+1
| | | | | Change-Id: I902df9c7803e593000c2e0f9cc3ccf1505899886 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document how to use CMake for Qt PrintSupportKai Koehne2020-05-267-73/+21
| | | | | | | | | | Move the details on how to build after the index page. Remove mentioning of the central include. Instead, mention the CMake functions to use. Task-number: QTBUG-73058 Change-Id: Ibf5952530c3b86915c9fb6562f7d9e0b010720ee Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document how to use CMake for Qt SQLKai Koehne2020-05-266-83/+21
| | | | | | | Task-number: QTBUG-73058 Change-Id: I07fa128853531ec09852647436d9302abac1c12c Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Document how to use CMake for Qt DBusKai Koehne2020-05-267-77/+21
| | | | | | Task-number: QTBUG-73058 Change-Id: Ibe0779d109682cc41e21783a3ba5fa5130d5ff7f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Document Qt 6 changes for QHash, QMultiHash, QSetKai Koehne2020-05-261-0/+47
| | | | | Change-Id: I9a83d33f05d7c3e5d23399129dfac45a1cb0d6ad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add 'Qt Core Changes in Qt 6'Kai Koehne2020-05-262-0/+46
| | | | | | | | | Skeleton to document changes to Qt Core in Qt 6. Task-number: QTBUG-71036 Task-number: QTBUG-84051 Change-Id: I2720beffb934121258331efd9eeb91c07d40a5bf Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove ANGLELaszlo Agocs2020-05-26784-270736/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This marks the end of EGL and OpenGL ES support on Windows. The concepts of -opengl dynamic, -opengl desktop, QT_OPENGL=software, etc. remain unchanged, with the exception of the disapperance of everything ANGLE related. CMake builds now work identically to qmake on Windows: they default to 'dynamic' OpenGL on Windows, unless -DINPUT_opengl=desktop is specified. On Windows, Qt 6 is expected to default to the "dynamic" OpenGL model by default, just like Qt 5.15. This can be changed by switching to "desktop" OpenGL, which will link to opengl32 (publicly, so other libs and applications will do so as well) and disallows using another OpenGL DLL. The "dynamic" mode is essential still because the fallback to a software rasterizer, such as the opengl32sw.dll we ship with the Qt packages, has to to work exactly like in Qt 5, the removal of ANGLE does not change this concept in any way (except of course that the middle option of using ANGLE is now gone) When it comes to the windows plugin's OpenGL blacklist feature, it works like before and accepts the ANGLE/D3D related keywords. They will then be ignored. Similarly, requesting QT_OPENGL=angle is ignored (but will show a warning). The D3D11 and DXGI configure time tests are removed: Qt 5.14 already depends on D3D 11.1 and DXGI 1.3 headers being available unconditionally on Win32 (in QRhi's D3D11 backend). No need to test for these. [ChangeLog][Windows] ANGLE is no longer included with Qt. Dynamic OpenGL builds work like before but ANGLE is no longer an option. OpenGL proper or an alternative opengl32 implementation are the two remaining options now. Attempting to set QT_OPENGL=angle or Qt::AA_UseOpenGLES will have no effect on Windows. Fixes: QTBUG-79103 Change-Id: Ia404e0d07f3fe191b27434d863c81180112ecb3b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add a property to QSFPM to show children of accepted itemsGiulio Camuffo2020-05-262-8/+80
| | | | | | | | [ChangeLog][QtCore][QSortFilterProxyModel] Add a 'autoAcceptChildRows' property to always show children rows of accepted rows. Change-Id: I2402469ece438179d0f19888b9775cc27cf5c749 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix QTabBar crash with offscreen platform pluginFilipe Azevedo2020-05-261-0/+2
| | | | | | | | | The offscreen implementation does not have a QPlatformNativeInterface implementation. Pick-to: 5.15 Change-Id: Ife4f296f52c307a2fab90de2cdc1ef0cc7796385 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix deprecation warning by not going through QCharVolker Hilsheimer2020-05-251-2/+2
| | | | | | | | | mValue is a QByteArray, so no need to expand data to UTF16 just to compare it to a Latin1 character. Change-Id: Ib3c8770867cd5509bb4c2ac5e45aabca577b3bba Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix typo in documentation of QPlatformWindowMichal Klocek2020-05-251-2/+2
| | | | | | | | | QOpenGLWidget has backing store and does not really fit into doc's context. Change it QOpenGLWindow. Change-Id: I7f92e49497b8cc35d322b607c865c2914672ace3 Pick-to: 5.15 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* RHI: Introduce QRhiTexture::RG8VaL Doroshchuk2020-05-256-0/+41
| | | | | | Change-Id: I58f35b2629bd6464f08cba66e852215472fcbe2a Fixes: QTBUG-84384 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix RHI-GL mapping of DXT3/5 compressed texture format identifiersEirik Aavitsland2020-05-251-2/+2
| | | | | | | | DXT1 is BC1, but DXT3 is BC2 and DXT5 is BC3. Change-Id: Icb0ea4cc9efeab2453343753e9fda7f825c9b8d1 Pick-to: 5.15 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* xcb: Fix comments' indentationAlexander Volkov2020-05-253-3/+3
| | | | | Change-Id: Ic0a3e65dd1abc907f1941590ab042f785d90d91c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* allow definition of SP_LineEditClearButton in cssMartin Koller2020-05-252-0/+6
| | | | | | | Added the new css property lineedit-clear-button-icon Change-Id: I4596b923eb34325a73d0a80b72d963fd6204ea26 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Change QString::toIntegral_helper to use QStringViewLars Knoll2020-05-252-26/+25
| | | | | | | This implicitly makes it use qsizetype for the length. Change-Id: Ib39a5a8dd71e48b45179079f7c7fe5e4edbdb5eb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Cleanup header fileLars Knoll2020-05-251-104/+0
| | | | | | | | | Remove dead code Change-Id: I315f9ae2f098b1a7b72d7cd24161325822c62edd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QVncScreen: fix crash on disconnect client did not request cursorRolf Eike Beer2020-05-251-0/+3
| | | | | | Change-Id: I758c79d87bd239b6fde9bae4e97c5b31450fa813 Pick-to: 5.15 5.12 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* wasm: set status codes from network operationLorn Potter2020-05-252-9/+20
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-83991 Change-Id: Ie1e88189bee8b6a9dc6cb2a721777a5e1032307a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix heap crash when making multiple network callsLorn Potter2020-05-252-20/+23
| | | | | | | Pick-to: 5.15 Task-number: QTBUG-83991 Change-Id: I354934b53799f3eeb958395932bed18289b1e279 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows: Fix wrong DPI used in font size after changing scalingFriedemann Kleint2020-05-253-12/+15
| | | | | | | | | | | | | | | | | QWindowsFontDatabase::defaultVerticalDPI(), which was used for converting the point sizes was missing an updating logic for scaling changes. When implementing it, it turned out that the value obtained from GetDC(0) does not adapt to scaling changes. Remove the function and set it from the screen manager directly to the DPI of the primary screen. Pick-to: 5.15 Task-number: QTBUG-82267 Change-Id: If05ebc893fe78a9461500aba97f2dc127cdf4406 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QItemSelectionModel: simplify QItemSelectionRangeChristian Ehrlicher2020-05-232-31/+1
| | | | | | | | Simplify QItemSelectionRange by removing the unneeded user-defined functions - the compiler can generate them by it's own. Change-Id: I49c00f937df98bb1ad18057b7bae7a0e06919909 Reviewed-by: David Faure <david.faure@kdab.com>
* QListWidget: remove unused memberChristian Ehrlicher2020-05-231-1/+0
| | | | | | | Remove the 'dummy' member - it's not needed since ages. Change-Id: I4869cf9153c892ea065340335ff7accd529a79c6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Models: remove version check for clearItemData()Christian Ehrlicher2020-05-236-24/+1
| | | | | | | The version checks for clearItemData() are no longer needed now. Change-Id: I5052188fb96cf637128662f3442d339820f0f41d Reviewed-by: David Faure <david.faure@kdab.com>
* QSslCertificate: overhaul ASN.1 datetime parsingGiuseppe D'Angelo2020-05-222-45/+60
| | | | | | | | | | Instead of manual string splitting (EW!), use QDateTime parsing. Moreover, X.509 certificates *must* have a valid start/end date. In case of parsing failure, reject the certificate. An autotest for this last case is coming in a separate patch. Change-Id: I934bf9e6a4a92e4befdb3b0f9450f76f67bad067 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-2230-122/+34
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Licenses: Remove reference to change in Qt 5.4Kai Koehne2020-05-2210-30/+20
| | | | | | | Qt 5.4 is not documented anymore since quite some time. Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* RHI: facilitate compressed atlas textures in gles2 backendEirik Aavitsland2020-05-224-5/+29
| | | | | | | | | | | | | | | Since glCompressedTexImage2D() does not allow zero data, it could not be executed during texture build. Instead it would be done during the first subresource upload. This made atlasing clumsy, since one had to introduce a fake upload of the full texture size before the subtexture uploads. This commits lets the gles2 backend deal with that instead. Introduces the UsedAsCompressedAtlas QRhiTexture::Flag for opting in to this behavior. Task-number: QTBUG-78582 Change-Id: Ib6e4ea637c62cc8a51bd9a4a06e59882f335f2a7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* RHI: Store texture handle as 64-bit intEskil Abrahamsen Blomfeldt2020-05-226-26/+22
| | | | | | | | | | | | | | | | | | When storing a void* pointer to the texture handle, we had to ensure that the variable would exist until the build phase, which is error prone and caused errors in QQuickWidget because we copied the texture ID from the FBO into a local variable before passing it into QQuickWindow::setRenderTarget(). The reason for using a void* was that we cannot know the width of the handles in the different backends, but we do know that they are 64-bit at maximum, so instead of storing potentially dangling pointers, we just make it a 64-bit integer and cast it back and forth in the backends. Task-number: QTBUG-78638 Change-Id: I7951e24351ddb209045ab6197d81eb1290b4da67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>