summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix to crash in QWindow::event when delete this called on closeEventMiika Pernu2020-06-101-2/+6
| | | | | | | | | | | | | | | Starting from Qt 5.11 QWindow::event is called after QDialog::closeEvent which would cause a crash if "delete this" was called on closeEvent. The commit that changed this was e0b5ff4ad583befbecbcbe462998e3ed80899531. Added a check before QWindow::event call utilizing QPointer to prevent the function call in case object is destroyed by a user in close event handler. Change-Id: I64a4a0f3271714e55bf7e806177f0d8b39b67fa3 Fixes: QTBUG-84222 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 036c3c19e7da5f1a280750d3c68a0cff38678029) (cherry picked from commit 710777d5d32ef13f2037cfe58e40ff2343355759) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* macOS: Respect window type when determining main window statusTor Arne Vestbø2020-06-101-4/+2
| | | | | | | | Fixes: QTBUG-84405 Change-Id: I3fc6b15b07a81e7e7e417a5767c2853083c13516 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 1cd7cbf6179692fc824dc3ba15580372493a4355) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge 5.12 into 5.12.9Paul Wicking2020-06-058-2137/+3075
|\ | | | | | | Change-Id: I604e23045b115966e06d966f25724b3f72b313d8
| * sqlite: Upgrade to 3.32.1Andy Shaw2020-06-045-2134/+3057
| | | | | | | | | | | | | | | | | | | | | | The patches applied are now removed as they are all included in v3.32.1 [ChangeLog][QtSQL][sqlite] Upgraded to v3.32.1 Change-Id: Ib5b26fb36d7ca49c1108a96097a48fe5b797f291 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 915549f6ed02581242cb98c474a622288ca0fb35) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * QVncScreen: fix crash on disconnect client did not request cursorRolf Eike Beer2020-06-041-0/+3
| | | | | | | | | | | | | | Change-Id: I758c79d87bd239b6fde9bae4e97c5b31450fa813 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit c4b172b7f0158fccf6d0ac1a72081d0749410b1b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Do not fully initialize QIconLoader when setting the fallback themeAlbert Astals Cid2020-06-032-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need this because without this patch you get bugs both if you call QIcon::setFallbackThemeName before creating the QGuiApplication and if you call QIcon::setFallbackThemeName after creating QGuiApplication Why do you get a bug if you call QIconLoader::setFallbackThemeName before creating the QGuiApplication: * QIcon::setFallbackThemeName calls QIconLoader::instance * QIconLoader::instance calls QIconLoader::ensureInitialized * QIconLoader::ensureInitialized calls systemThemeName * systemThemeName asks the current QPlatformTheme for its QPlatformTheme::SystemIconThemeName * But since we're calling this before creating the QGuiApplication there is no current QPlatformTheme yet, so systemThemeName is set to empty, which is obviously not what we want Why do you get a bug if you call QIconLoader::setFallbackThemeName after creating the QGuiApplication: * QGuiApplicationPrivate::init calls QGuiApplicationPrivate::createPlatformIntegration * QGuiApplicationPrivate::createPlatformIntegration sets the current QPlatformTheme and at the end of the very same function uses QIcon::fromTheme * Since we haven't called QIconLoader::setFallbackThemeName yet there is at least one icon lookup that doesn't take the fallback theme we would like to have into account This patch makes it so calling QIconLoader::setFallbackThemeName before creating the QGuiApplication works. The only thing we want to do from QIcon::setFallbackThemeName is set the internal m_userFallbackTheme, it doesn't care about doing further initialization of QIconLoader, if it's done, great it's done, if it is not initialized yet, great it will be initialized later when someone actually tries to use the QIconloader. So it's OK for ensureInitialized() to return early if there is no platform theme yet, because it will be called again later. Fixes: QTBUG-74252 Change-Id: I65268fc3d3d0bd282d76c76cf75e495bcc9d1a30 Done-with: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit add92a551cf601b5c9e074046326f95ccc38062e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Update the qt_attribution.json for SQLiteAndy Shaw2020-06-051-2/+2
|/ | | | | | | | | | This got forgotten when SQLite was upgraded to v3.32.1, so this amends e10e989ce83027f2f620bb6948be4948f3c91e76 Change-Id: I75799b6c55bc39c4cc050b5eb18a99d9f197410c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 542e7da817b1b0204ab6e8fdac802949e161cce5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* bmp/ico decoder: fail early for unsupported bit depthsEirik Aavitsland2020-06-022-2/+10
| | | | | | | | | | | All the normal bit depths are supported, so no point in trying to go through the decoding code path for others. Avoids wide bitshift warning for claimed depths > 32. Change-Id: I61b72dbbf9558ca28db46f8168339f8174e56997 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 6a2224fd58414a78957104dd654f697c4b2eaa1d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* gif image handler: check for out of range image sizeEirik Aavitsland2020-06-021-0/+13
| | | | | | | | | | Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: Ic556d4fbcb6b542fc110d10e48dac1a880e60697 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 2b7b75f721b6786a6dc35e2f9b693bb2e2dfac01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Gif decoder: avoid undefined values in enumEirik Aavitsland2020-05-301-1/+2
| | | | | | | | | | The gif standard allocates 3 bits for the disposal method, but values 4-7 are unused. Change-Id: I0f70b3f87b4cd8e98140c3da476702a22ebe93a9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 30571068b203a9d950030b31ee84f08f2f6fc04d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect global variable g_pointIdMap with mutexesRainer Keller2020-05-262-0/+7
| | | | | | | | | | | | | | | The evdev touch handler is thread based and calls QWindowSystemInterface::handleTouchEvent. The global variable in qwindowsysteminterface.cpp is used without being protected by mutexes which causes data loss and crashes when multiple touch screens are used. Fixes: QTBUG-63584 Change-Id: I8b5bb04cc517fab96ac428b2bd2bc128b2ca1a54 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 23d73208524d3ab2166121d08594da88e6b4460b) Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Direct Write Font Engine: Fix leaking IDWriteFontFace instancesFriedemann Kleint2020-05-201-2/+3
| | | | | | | | | | Patch as contributed on bug report. Fixes: QTBUG-84265 Change-Id: I73d73cf7d1b46944767750bf0f0c727c7b00b1d7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 26100ccb83ec9c4a2ee192170f1952956dd569d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QLinkedListData: Move Q_CORE_EXPORT from class to shared_nullThiago Macieira2020-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes no difference for the IA-64 C++ ABI nor for MSVC until MSVC 2019 16.6. But it does with 16.6, where the std::atomic constructor becomes non-trivial, which makes QtPrivate::RefCount non-trivial, which makes QLinkedListData non-trivial. Before this change: User code \ Qt MSVC <=16.5 MSVC >=16.6 MSVC <=16.5 works works MSVC >=16.6 fails works With this change, they should all work. The list of symbols exported should not change either, so linking against a Qt compiled with MSVC <=16.5 should continue to work. [ChangeLog][MSVC] Fixed a compatibility issue found when linking code compiled with version 16.6 to a Qt compiled with 16.5. Fixes: QTBUG-81727 Change-Id: If79a52e476594446baccfffd15ee771397467f8b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 7af5619836cb3bd2eca87fd10b81674c9e201e76) Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* Windows: Update the hasFrame setting when changing window flagsAndy Shaw2020-05-191-0/+1
| | | | | | | | | | | | Since changing the window flags can make it frameless or have a frame then it should ensure that the hasFrame setting is updated accordingly when the window flags do. Change-Id: I7bf4995d7967623b117426d8750e63fa97967e2c Fixes: QTBUG-84029 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 60ec350bc79d562c0611bc31e8655729272c31d6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNetworkReply: Fix SSL configuration handlingFriedemann Kleint2020-05-182-4/+7
| | | | | | | | | | | | | Use QT_CONFIG consistently and enclose sslConfigurationImplementation(), setSslConfigurationImplementation() and ignoreSslErrorsImplementation() within QT_CONFIG as well. This enables a build of Qt for Python with -no-feature-ssl. Fixes: PYSIDE-1302 Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 5436a6f3e0a9e7ef7ed51fc5b304e1f81eaed960)
* Fix llvm-strip/readobj parametersBogDan Vatra2020-05-181-2/+2
| | | | | Change-Id: I3add593d8ad8791d694f157849e72dd26a6dc4ca Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Avoid format conversion in backing store texture uploadAllan Sandfeld Jensen2020-05-151-43/+49
| | | | | | | | | | Use glPixelStorei where possible Fixes: QTBUG-84189 Change-Id: Iadf039b5c6d8e7b6bb11d031a94683343dee0dc6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 01b2ea83aa0e8e1d624f6c25d78bb5184cd35483) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix crash when running QtCore: Stack is misaligned on x86-64Thiago Macieira2020-04-301-1/+5
| | | | | | | | | | | When our ELF entry point function is started by the kernel, the stack is aligned at 16 bytes. However, the stack is expected to be off by 8, due to a preceding CALL instruction which didn't exist. This cauases a crash further down as the compiler may generate aligned stack access. Change-Id: I1496b069cc534f1a838dfffd15c9dc4ef9e3869e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 932805807123833bb8f5ae9abda7e946f48d9f0c)
* Always open a submenu on the same screen where the parent menu isShawn Rutledge2020-04-271-2/+11
| | | | | | | | | | | | We've seen submenus opening on different screens in different scenarios, but probably there's never a sensible reason to do that. QWidgetPrivate::setScreenForPoint() can often give incorrect results in multi-screen desktop configurations; this is a way of avoiding that. Task-number: QTBUG-76162 Change-Id: I895696c6858ad953258c84b21117beea4c4fc01d Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit c068edcecf6876c7b57abbe302ad8b1347e4445e)
* sqlite: Fix CVE-2020-11656Andy Shaw2020-04-212-1/+80
| | | | | | | | | | | | | This was taken from d09f8c3621d5f7f8 and b64674919f673602 in SQLite, ref: https://www3.sqlite.org/cgi/src/info/d09f8c3621d5f7f8 https://www.sqlite.org/cgi/src/info/b64674919f673602 [ChangeLog][QtSQL][sqlite] Fixed CVE-2020-11656 Fixes: QTBUG-83652 Change-Id: I99bd59dc10b753ff19822c902dff1fc339d330a8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 3e6089b695489d5ba513723230a54b4b5e8349ae)
* sqlite: Fix CVE-2020-11655Andy Shaw2020-04-212-0/+31
| | | | | | | | | | | | This was taken from 4a302b42c7bf5e11 in SQLite, ref: https://www3.sqlite.org/cgi/src/info/4a302b42c7bf5e11 [ChangeLog][QtSQL][sqlite] Fixed CVE-2020-11655 Task-number: QTBUG-83652 Change-Id: I5ead78d9ee63aa0f12f1c1014c79373728569f30 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 441ea6be15f68f46ecee2365a7e7ee7dd6f11ff3)
* OpenSSL: handle SSL_shutdown's errors properlyTimur Pocheptsov2020-04-176-7/+36
| | | | | | | | | | | | | | | Do not call SSL_shutdown on a session that is in handshake state (SSL_in_init(s) returns 1). Also, do not call SSL_shutdown if a session encountered a fatal error (SSL_ERROR_SYSCALL or SSL_ERROR_SSL was found before). If SSL_shutdown was unsuccessful (returned code != 1), we have to clear the error(s) it queued. Unfortunately, SSL_in_init was a macro in OpenSSL 1.0.x. We have to resolve SSL_state to implement SSL_in_init. Fixes: QTBUG-83450 Change-Id: I6326119f4e79605429263045ac20605c30dccca3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 8907635da59c2ae0e8db01f27b24a841b830e655) (cherry picked from commit 8ddffc6ba4f38bb8dbeb0cf61b6b10ee73505bbb)
* Merge "Merge remote-tracking branch 'origin/5.12.8' into 5.12"Qt Forward Merge Bot2020-04-146-82/+174
|\
| * Merge remote-tracking branch 'origin/5.12.8' into 5.12Qt Forward Merge Bot2020-04-146-82/+174
| |\ | | | | | | | | | Change-Id: I3c060326bf24f31dda0fd6dd9ebf278da4c2fe46
| | * Handle exceptions when accessing android clipboardv5.12.8Mike Achtelik2020-03-311-50/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some circumstances android throws an exception or returns null, when trying to access the clipboard. Fixes: QTBUG-80689 Change-Id: I92c134e2a002fc648ff966e15a19eb3307c428a1 Reviewed-by: BogDan Vatra <bogdan@kdab.com> (cherry picked from commit 287b570ad5c00eb491f86eab0c4b8d3f6d96f666) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Fix build with macOS 10.15 and deployment 10.12André Klitzing2020-03-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | io/qfilesystemengine_unix.cpp:1420:9: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new] if (futimens(fd, ts) == -1) { ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h:396:9: note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0 int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)); ^ io/qfilesystemengine_unix.cpp:1420:9: note: enclose 'futimens' in a __builtin_available check to silence this warning if (futimens(fd, ts) == -1) { ^~~~~~~~ Change-Id: Ib52adf7b1ec4f1057d8cb260a00da509429cfaed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2f030c2cf3fe368be217c0e0b157e050d1c27afc)
| | * iOS: Remove assert when doing GL rendering in the backgroundTor Arne Vestbø2020-03-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-76961 Change-Id: If2212601dbb867dd7ceb826b867bb24d302f86df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit b7aaee002677caf411190bbc6ea7f18a28a71360)
| | * Add an expansion limit for entitiesLars Knoll2020-03-252-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recursively defined entities can easily exhaust all available memory. Limit entity expansion to a default of 4096 characters to avoid DoS attacks when a user loads untrusted content. [ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now limit the expansion of entities to 4096 characters. Documents where a single entity expands to more characters than the limit are not considered well formed. The limit is there to avoid DoS attacks through recursively expanding entities when loading untrusted content. Qt 5.15 will add methods that allow changing that limit. Fixes: QTBUG-47417 Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit fd4be84d23a0db4186cb42e736a9de3af722c7f7) Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * macOS: Flush sublayers via separate IOSurface backingstoresTor Arne Vestbø2020-03-252-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing sublayers via QImage copies of the root IOSurface was causing performance regressions due to the constant allocations of new images each frame. We now re-use the QCALayerBackingStore implementation for sublayers, which gives a dynamic swap-chain. We're still paying the CPU cost of the copy from the root backingstore to the layered backingstores, as well as the memory cost, but at least improves the situation. We do not try to be smart and paint directly into the sublayers, as that would leave the root backingstore stale, potentially causing glitches when views are repositioned. Investigating this is left for future work. Fixes: QTBUG-82986 Change-Id: I758a3d8e1e40e2ed4fe6bc590a4a5a988d87a3a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Refactor OpenWFD QPA plugin for INTEGRITY Snapdragon 820 ADPKimmo Ollila2020-04-142-53/+65
|/ / | | | | | | | | | | | | | | Add wfdBindSourceToPipeline call to enable vsync and also call OpenWFD resource cleanup APIs in destroyNativeWindow. Change-Id: I5dd5cbf66c0863624ec848f11a32c232fbe32cff Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* | CBOR support: prevent overflowing QByteArray's max allocationThiago Macieira2020-04-104-35/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QByteArray doesn't like it. Apply the same protection to QString, which we know uses the same backend but uses elements twice as big. That means it can contain slightly more than half as many elements, but exact half will suffice for our needs. Change-Id: Iaa63461109844e978376fffd15f9d4c7a9137856 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 783d574b932288b61f915b28d5b7b9c5a979f58e) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QCborValue: apply a simple optimization to avoid unnecessary allocationsThiago Macieira2020-04-102-28/+29
| | | | | | | | | | | | | | | | | | | | | | If the map or array is known to be empty, we don't need to allocate a QCborContainerPrivate. Change-Id: Ief61acdfbe4d4b5ba1f0fffd15fe212b6a6e77c3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f581b041199ba7c825fbffd9110727360d1f2668) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QCborValue::fromCbor: Apply a recursion limit to decodingThiago Macieira2020-04-102-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simple 16k file can produce deep enough recursion in Qt to cause stack overflow. So prevent that. I tested 4096 recursions just fine on my Linux system (8 MB stack), but decided 1024 was sufficient, as this code will also be run on embedded systems that could have smaller stacks. [ChangeLog][QtCore][QCborValue] fromCbor() now limits decoding to at most 1024 nested maps, arrays, and tags to prevent stack overflows. This should be sufficient for most uses of CBOR. An API to limit further or to relax the limit will be provided in 5.15. Meanwhile, if decoding more is required, QCborStreamReader can be used (note that each level of map and array allocates memory). Change-Id: Iaa63461109844e978376fffd15fa0fbefbf607a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 02d595946faa7a21f6aa4109227f7e90db20ae7a) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QCborValue: create a wrapper to set the QCborStreamReader error stateThiago Macieira2020-04-102-6/+12
| | | | | | | | | | | | | | | | | | | | The next commit will need to do so from outside QCborContainerPrivate, where QCborStreamReader::d can't be accessed (private). Change-Id: Iaa63461109844e978376fffd15fa0f6f04081bf2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit b7da66132bdd196c4f0b0e0fdf53f9e3b9a8bdaf) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Windows QPA: Prospective fix for crash occurring when changing screen during ↵Friedemann Kleint2020-04-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | session lock Check on currentScreen in QWindowsWindow::checkForScreenChanged(). Fixes: QTBUG-80436 Change-Id: I19e34b9e2c32c9cfc8e5e5b758783c0ab89d5556 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 6c23f006e07b774b0eef863cccd36a992274ca32)
* | Fix build with macOS 10.15 and deployment 10.12André Klitzing2020-03-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | io/qfilesystemengine_unix.cpp:1420:9: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new] if (futimens(fd, ts) == -1) { ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h:396:9: note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0 int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)); ^ io/qfilesystemengine_unix.cpp:1420:9: note: enclose 'futimens' in a __builtin_available check to silence this warning if (futimens(fd, ts) == -1) { ^~~~~~~~ Change-Id: Ib52adf7b1ec4f1057d8cb260a00da509429cfaed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | xcb: Add support for XdndActionList propertyAlexander Volkov2020-03-264-7/+118
|/ | | | | | | | | | | This allows to pass and receive possible drop actions from other processes, including GTK applications. Fixes: QTBUG-75744 Change-Id: I944edc6fa00f8801a25912e70eb104a647a9fc0e Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit cc1d891b8ed1c4f23183e4b06f46e5840a993e35)
* q_getTimeFromASN1: fix invalid accessTimur Pocheptsov2020-03-191-1/+17
| | | | | | | | | | No sanitizer is needed, just looking at the code is enough. It was wrong. Change-Id: I9df417c137d6b3361c3161865e099a8be40860de Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit ad68ecf1d967f8e60c19c28a2bc23daf15389076)
* Fix CVE-2020-9327 in SQLiteAndy Shaw2020-03-092-9/+225
| | | | | | | | | | This was taken from abc473fb8fb99900 in SQLite, ref: https://www.sqlite.org/cgi/src/info/abc473fb8fb99900 Fixes: QTBUG-82533 Change-Id: I9840e29f19a0b861229987f5b59d8585ba2e55dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 2c1b4e37b936f64d6b52e2bc10ff97184a714b9a)
* xcb: Fix logic for minimized stateJiDe Zhang2020-03-094-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When _NET_WM_STATE_HIDDEN is not contains in the _NET_WM_STATE window property, the window should not be considered to be minimized According to https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html _NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate that a window would not be visible on the screen if its desktop/viewport were active and its coordinates were within the screen bounds. The canonical example is that minimized windows should be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether to display a window in miniature representations of the windows on a desktop. For mutter/GNOME Shell, without _NET_WM_STATE_HIDDEN, window manager will not reply XCB_ICCCM_WM_STATE_ICONIC settings in WM_CHANGE_STATE client message. Task-number: QTBUG-76147 Task-number: QTBUG-76354 Task-number: QTBUG-68864 Done-With: Liang Qi <liang.qi@qt.io> Change-Id: Ic9d26d963979b7f0ef4d1cf322c54ef8c40fa004 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 4f370d36ec5caa02f78545ceee5704d94edf0530)
* Fix QShaderGenerator ES 3+ version declarationPaul Lemire2020-03-091-1/+1
| | | | | | | | The QShaderGenerator would use #version 300 es even if ES 3.1 or 3.2 was specified. Change-Id: I2296ce8e01c732dd64dc1db40caeae83520bd3d3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QShaderGenerator: Allow more expressions in input nodesNicolas Guichard2020-02-281-6/+3
| | | | | | | | | | | | | | | | | | | Currently QShaderGenerator will crash when encountering some expressions in input nodes. For example, this node prototype would make it crash: "VERTEX_COLOR": { "outputs": ["color", "alpha"], "rules": [ "headerSnippets": ["in vec4 vertexColor;"], "substitution": "vec3 $color = vertexColor.rgb; float $alpha = vertexColor.a;" ] } Change-Id: I37abb8099d376843a4cb13228140467dc1b8f60c Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit f9086ebd0198c53e8a811af47e0ff0c84d78eb30)
* Replace usage of std::result_of with decltypeMårten Nordheim2020-02-221-1/+1
| | | | | | | | | It's slated for removal in c++20 Fixes: QTBUG-82240 Change-Id: I7b35c151413b131ca49b2c09b6382efc3fc8ccb6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit fb6acf08bbd7a68d027282251747620b942bd1d6)
* QShaderGraph: don't generate statements with undefined inputsNicolas Guichard2020-02-211-0/+47
| | | | | | | | | | | | | | | | This fixes the shader generation for graphs like this one: Function0 ------> Output0 (with unbound input) Input ------> Function1 ------> Output1 With those graphs, createStatements will not return any statement for nodes Function0 and Output0. Change-Id: Iec32aa51623e176b03ae23e580f06d14df80a194 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 7981dbfaf371a368fbd69e935768b310f42a0e5a)
* QShaderGenerator: Don't crash when a node has multiple outputsNicolas Guichard2020-02-211-28/+39
| | | | | | | | | | | | | | | | | | | | | | | It was already possible to declare a node prototype with multiple outputs, but trying to assign to all those outputs was not possible and instead resulted in a crash. It is now possible to declare nodes like this without crashing: "SEPERATE_XYZ": { "inputs": ["vector"], "outputs": ["x", "y", "z"], "rules": [ { "substitution": "float $x = $vector.x; float $y = $vector.y; float $z = $vector.z;" } ] } Change-Id: I748e77e84c9120dc688c573eee33dc13c6bfbace Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 39994e0705f11afc45e20872b95fb3a6e684c913)
* Fix QShaderGenerator crashing when a node port name prefixed another oneNicolas Guichard2020-02-201-3/+39
| | | | | | | | | | | | | | | QShaderGenerator didn't handle substitutions like `vec4 $color = mix($color1, $color2, $fac);` Note that `$color` is a prefix to `$color1` and `$color2`. For the substitution `QByteArray::replace` was used so if `$color` was handled first and replaced by `v1`, `$color1` and `$color2` were never correctly replaced and instead became `v11` and `v12` which caused a crash later on. Change-Id: Idaf800fdac468f33c323eb722701da5f8eb918d6 (cherry picked from commit 49dbe760e4e0d8a781b5336efdce4748a7d73a33) Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QShaderGraph: Fix statement creation for graphs with dangling branchesNicolas Guichard2020-02-181-5/+12
| | | | | | | | | | | | | | | | | | For graphs like this one: Input ----> Function1 ----> Output \ ---> Function2 (unbound output) We would have generated only 2 statements, for Function1 and Output. This change fixes this by treating Function2 like an output. Therefore it generates 4 statements: Input, Function1, Output and Function2. Change-Id: Iaada40b9b949d771806dd47efad4f7ef2a775b48 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* macOS: Skip NSOpenGLContext flush if window exposed size is out of syncTor Arne Vestbø2020-02-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Some clients such as QOpenGLWidget will end up drawing and flushing during the resize event, which for GL will result in an immediate update on the screen. The problem is that the underlying Core Animation layer, and the window's frame, has not been visually updated yet to the new size, so we end up drawing "ahead" of what the window server is showing the user. Ideally we'd be able to present the GL drawing in a transaction, in sync with the drawing of the window frame, but this API is only available for CAMetalLayer and CAEAGLLayer. As a workaround we detect when the exposed size is out of sync with the window geometry, and skip the flush until the exposed size has caught up. We know this will happen eventually as AppKit will always ask us to display after a resize. Change-Id: I1739ac8878b3fc6820a55dd017ddd170fd5f55d6 Fixes: QTBUG-79139 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit f39230fcac4de01f26945bde16c3a10c5ac74afb) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Tag sub-layer images with color space on flushTor Arne Vestbø2020-02-121-1/+2
| | | | | | | | | | Failing to tag the image results in costly CPU-based color-space conversions. Change-Id: Ib65547f4b99b83e10d3603c27388f50eb4d3840c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit c3c5a58f654537059366ecd3fe9811716bc202d2) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: release semaphore when the pending runnable causes an exceptionKonstantin Ritt2020-02-121-2/+5
| | | | | Change-Id: Ide727dd5ceb987bdd4a093e6ee4f9c6b980f5ded Reviewed-by: BogDan Vatra <bogdan@kdab.com>