summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix integer overflow in very long sections in ELF objectsThiago Macieira2018-09-251-1/+1
| | | | | | | | | | | | | | | The source is an ElfXX_Off, which is an unsigned 32- or 64-bit. That means any section bigger than 2 GB would cause an overflow when we assigned in m_stringTableFileOffset = strtab.offset; Change-Id: Ib47c56818178458a88b4fffd15546bd47a89894e Fixes: QTBUG-70560 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit cb5c24fa26142edaff8fd2c9787dbe45c222b4ff) Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> (cherry picked from commit 9f95f25d2ef3de76d449bc4de5b09e87e9ed537a)
* QCoreTextFontEngine: Fix build with Xcode 9.3Gabriel de Dietrich2018-09-051-1/+1
| | | | | | | | | | | | | | Apple LLVM version 9.1.0 (clang-902.0.39.1) Error message: .../qfontengine_coretext.mm:827:20: error: qualified reference to 'QFixed' is a constructor name rather than a type in this context return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont))); Change-Id: Iebe26b3b087a16b10664208fc8851cbddb47f043 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit dbdd5f0ffbce52c8b789ed09f1aa3f1da6c02e23)
* Fix possible heap corruption in QXmlStreamAllan Sandfeld Jensen2018-09-041-1/+1
| | | | | | | | | | The value of 'tos' at the check might already be on the last element, so triggering stack expansion on the second last element is too late. Change-Id: Ib3ab2662d4d27a71effe9e988b9e172923af2908 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 6256729a6da532079505edfe4c56a6ef29cd8ab8)
* Fix storing of QDateTime timespec for SqliteJoni Poikelin2018-08-171-1/+28
| | | | | | | | | | | | | | | Commit 9e64fc9e1cebf1e11694c4f536881128f5aee288 caused a regression which stored all QDateTime entries as if they were in localtime, which causes them to be offset by the amount of local timezone offset. This is fixed by adding "Z" if the time should be in UTC or using "+/-hh:mm" if it should use fixed UTC offset or specific timezone. Task-number: QTBUG-57138 Change-Id: Ie60905dfb3a517db442b636ca41daf8348753d84 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit 0a5f71c6062d575602ff041fb1b88ec2d8ad92bc)
* Check for QImage allocation failure in qgifhandlerEirik Aavitsland2018-08-091-1/+6
| | | | | | | | | | Since image files easily can be (or corrupt files claim to be) huge, it is worth checking for out of memory situations. Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 2841e2b61e32f26900bde987d469c8b97ea31999) (cherry picked from commit f9324103a0f824de2c5243f07a86e7906b8a8ea6)
* Fix crash in qppmhandler for certain malformed image filesEirik Aavitsland2018-08-091-1/+1
| | | | | | | | | | | | The ppm format specifies that the maximum color value field must be less than 65536. The handler did not enforce this, leading to potentional overflow when the value was used in 16 bits context. Task-number: QTBUG-69449 Change-Id: Iea7a7e0f8953ec1ea8571e215687d12a9d77e11c Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 8c4207dddf9b2af0767de2ef0a10652612d462a5) (cherry picked from commit 805dce07b9797f5f2770a9d2c58d6d381784ca25)
* QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-171-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case contains the binary JSON equivalent of ["ž"] with the modification that the string's length has been set to INT_MAX. In Value::usedStorage this length is used through the pointer d like so s = sizeof(int) + sizeof(ushort) * qFromLittleEndian(*(int *)d); Because 2 * INT_MAX is UINT_MAX-1, the expression as a whole evaluates to 2, which is considered a valid storage size. However, when converting this binary JSON into ordinary JSON we will attempt to construct a QString of length INT_MAX. Fixed by using String::isValid instead of Value::usedStorage. This method already takes care to avoid the overflow problem. Additionally, I've tried in this patch to clarify the behavior of Value::isValid a bit by writing it in a style that is hopefully more amenable to structural induction. Finally, the test case added in my previous patch had the wrong file extension and is renamed in this one. Task-number: QTBUG-61969 Change-Id: I45d891f2467a71d8d105822ef7eb1a73c3efa67a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8e47474baf06b3884e9173302395dd25fc09eba9) Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f24bd1b8183ec9cc4e239dc560072d3896ec61a1)
* QJsonDocument: Validate also zero-length objectsJüri Valdmann2018-05-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The added test case is the binary JSON equivalent of {"a":{"š":null}} with two modifications. First, the length of the string "š" has been corrupted to 0xFFFFFF00. Second and more import, the Base::size field of the inner object has been reset to 0. On its own the first modification would normally trigger a validation error. However, due to the second modification the Value::usedStorage for the inner object evaluates to 0, completely disabling all further validation of the object's contents. Attempting to convert this binary JSON into standard JSON will lead to the JSON writer trying to construct a QString of length 0xFFFFFF00. Fixed by validating also objects with usedStorage == 0. Task-number: QTBUG-61969 Change-Id: I5e59383674dec9be89361759572c0d91d4e16e01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 93e0ff037e3e4d72d404c26b8e957092d5f88652) Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 60a7d578c8add335900d4d1006b3b2c49f141873)
* QJsonDocument: Reject objects containing themselves in binary JSONJüri Valdmann2018-05-171-3/+3
| | | | | | | | | | | | | The added test case is a binary JSON file describing an array which contains itself. This file passes validation even though attempting to convert it to plain JSON leads to an infinite loop. Fixed by rejecting it in validation. Task-number: QTBUG-61969 Change-Id: Ib4472e9777d09840c30c384b24294e4744b02045 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 3fc5500b4f2a8431ac013520e9faf606e893b39a) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 7dcb413858dfea8487c2f44b5c64f160b85cd5a0)
* QJsonDocument::fromRawData: Fix out-of-bounds accessJüri Valdmann2018-05-172-1/+4
| | | | | | | | | | | | | | | | This method takes a pointer+size pair, but begins reading through the pointer without first checking the size parameter. Fixed by checking the size parameter. A new test case is added with an empty binary json file. Although the test does not fail under normal conditions, the problem can be detected using valgrind or AddressSanitizer. Task-number: QTBUG-61969 Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d3935cbd71171e1d8f3742cc3235ca0c38313ec8) (cherry picked from commit 961b8f51a2e8198fce12e8784b1edae6b3f6f67b)
* QWidget: Fix a crash when platform window creation failsFriedemann Kleint2018-01-171-2/+4
| | | | | | | | | Add a check on the platform window to QWidgetPrivate::create_sys(). Task-number: QTBUG-65783 Change-Id: I077882e1cf22ef49bb6f578f7460493ef48c9627 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 9de2ef6f5ab3b21b4e1679e010ee488193cb41e4)
* macOS: Make alpha-based click-trough work againMorten Johan Sørvig2017-12-151-2/+12
| | | | | | | | | | | | | | | | | | | | Commit 3ea04c7d made it so that we always set the ignoresMouseEvent property on the NSWindow, based on the WindowTransparentForInput flag. However, this overwrites the magical secret initial state where click-trough is determined based on window content transparency - setting the property to false makes the window capture all events. Restore 5.5 behavior by not modifying ignoresMouseEvent if we can. Toggling WindowTransparentForInput on and off again is still broken. Task-number: QTBUG-54830 Change-Id: I5f44ce14d9a7dc1713f9efb1ef929e2969838d90 (cherry picked from commit c35fc435950437d3d046b17d06593873d7b82011) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Qt D-Bus: Fix compilation on Windows Embedded 2013Friedemann Kleint2017-12-141-3/+3
| | | | | | | | | | Exclude the code introduced by fecaa6aae83a3ffa8f1fd41c5aa8275a1bfa7c9b for Windows Embedded 2013. Task-number: QTBUG-54726 Change-Id: Iff9d174f798110d2aa28761da7e364ed7bb245f1 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* No debugging and extra env & params processing on sealed packagesBogDan Vatra2017-11-161-148/+153
| | | | | | | | | | | | | A "sealed" package is a *release build and signed* Qt for Android package with no debugging capabilities. By default sealed packages have no debugging capabilities, but the user can force debugging capabilities also on a sealed package. This is useful in corner cases when the user really needs to debug a sealed package. Change-Id: I840526092556067f2659facf1525861bbabe0edd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 4d8ae444c2b15ec7da5ef133aa5ad5a548180e21) Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix build error with macOS 10.13 SDKJake Petroules2017-10-092-13/+2
| | | | | | | | | | | | | Several of these variables/macros are no longer defined. We didn't validate the preconditions on iOS, tvOS, or watchOS, so no need to bother validating them on macOS either. Nor did we check the OSStatus result on any platform anyways. Task-number: QTBUG-63401 Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3 (cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b) Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Revert "QCryptographicHash: make SHA3 calculate SHA3, not Keccak"Thiago Macieira2017-08-311-40/+12
| | | | | | | | | | | | | This reverts commit a647004d9f349e0edc4254dcfe672ccf18f98ea7 (which is a backport of 88a8feeacb9bdaff9ee06164424e407eb904cd10). After the 5.9.0 release, we've found that changing the algorithm is a bad idea. It's true that Qt hasn't calculated SHA-3, but it's calculated something and people may be using it. Keeping a consistent calculation is better for the 5.6 LTS. Discussed-on: http://lists.qt-project.org/pipermail/development/2017-August/030786.html Change-Id: I38341f8155354cc4a776fffd14dfdbcdc7d0f039 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix huge painting artefact of certain dashed linesEirik Aavitsland2017-08-221-1/+1
| | | | | | | | | | | | | | | | The artefacts appeared for square-capped dashed pens when the end of the line fell a tiny fraction into the start of a new dash. At that point in the dashing algorithm, accumulated precision errors in the 'length' variable could make it slightly differ from the actual length between the start and end points of the line fragment. Although both values would be "almost zero", the rasterizeLine() function's square capping would make the error very visible; see the bug report. Fix by calculating the precise length of the last line fragment. Task-number: QTBUG-56969 Change-Id: I7b69c0d465649be61fb87ac7b8348f0c299486ee Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 73573fce295caef35da706a8c8c796ec18e6baf1)
* Fix write and read-write ioctls on certain 64-bit OSThiago Macieira2017-08-141-1/+1
| | | | | | | | | | | | | | | Using int as the operation parameter was wrong. It meant any write or RW ioctls (which have the MSB set) would be sign-extended to 64-bit when calling the native API. Depending on the OS, the upper 32 bits were not cleared prior to comparing with the call number, resulting in unexpected errors. Linux and FreeBSD operated properly; I only got the error on Darwin. Change-Id: Iaf4157b7efa2416d898cfffd14d985af65c1ff89 Reviewed-by: Jake Petroules <jake.petroules@qt.io> (cherry picked from commit feb24153633859502f30bc16b149c78fb1d651b7) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Bump minimum glibc requirement for sys/eventfd.h to glibc 2.8Thiago Macieira2017-08-051-2/+4
| | | | | | | | | | | | | | | | | The file was added to glibc 2.7 along with the functions we need (Added 2007-10-05). But they forgot to install the file until a month and a half later (2007-11-17), which means it missed the 2.7 release (2007-10-19). Note that EFD_CLOEXEC wasn't added until glibc 2.9, so effectively glibc 2.9 is required. Change-Id: I3868166e5efc45538544fffd14d773ba576fb793 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit b22b5141404fe943e64ea7dad094097e8a0fd77d) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use correct DRM event context versionJonathan Liu2017-07-281-1/+1
| | | | | | | | | | | | | | | Explicitly declare which DRM event context version we want to use, rather than just the latest one libdrm supports. New versions may change semantics, or extend the structure, in ways we're unaware of. Stick with version 2, which is the version that introduced page_flip_handler. Change-Id: I1d2066d5ab485ea571f016a8660829f435821c82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 50275fbcaf60ed41bd4486f8239cc7914c8af0f5)
* Use pkg-config for libdrm in eglfs_kms_egldevice backend if possibleJonathan Liu2017-07-191-1/+6
| | | | | | | | | | | | Without pkg-config, /usr/include/libdrm is not added to the include search path so xf86drm.h may be unable to include drm.h. This change is being applied directly to 5.6 because it's not applicable to 5.9 or dev. Those versions of Qt have moved to using QMAKE_USE which will already use pkg-config if available. Change-Id: I875c1e5f1b3cce63fd6b529d9d8ac97fd5bb56e8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* macOS: Don't keep WA_MacAlwaysShowToolWindow windows always on topTor Arne Vestbø2017-06-302-5/+84
| | | | | | | | | | | | | | | | | | | | | | | | | On macOS if an application is no longer active then it will cause any tool windows to hide until the application is active again. For applications that did not want this behavior and thus wanted the tool window to stay visible, the WA_MacAlwaysShowToolWindow flag is available. In order to ensure that this flag is respected, the tool window needs to have its level changed when the application active status changes. Once it is no longer active the window needs to be seen as a normal window, and when it is active then it needs to be set to be a window that is always on top to get the right behavior. Due to various bugs in AppKit we need to explicitly order windows in front during this process, which requires us to then iterate the windows in back-to-front order. For macOS versions < 10.12 there is no way to get an ordered list of windows, so we fall back to using the window creation order. Task-number: QTBUG-57581 Change-Id: If20b4698616707685f83b1378f87593f8169c8c6 (cherry picked from commit 4c346b6e2bfab976bc9b16275b8382aee38aefa4) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Teach QTestLib to read QTEST_ENVIRONMENT to expand blacklist keywordsTor Arne Vestbø2017-06-211-1/+8
| | | | | | | | | | | | Can be used by CI system to set QTEST_ENVIRONMENT="ci", allowing test to be blacklisted only for the CI. Task-number: QTBUG-59564 Change-Id: I7088abb888c179bafc621f11191efbc45c37b179 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 6d49311a5da483190136209dc902969d1ef4a217) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Restore binary compatibility with pre-5.6 qt_handleMouseEventJan Kundrát2017-06-191-0/+6
| | | | | | | | | | | | | | | | | | | An internal, private symbol was changed in beef975f92e42143c464d68afa6b8cd4f7ef7389. However, this symbol was being used by some inline functions in QtTest, and this therefore introduced a BIC. This change simple adds back a symbol with the original signature. I recall seeing this in my own work, and the KDE CI system hits this as well: libKF5KDELibs4Support.so.5.25.0: undefined reference to `qt_handleMouseEvent(QWindow*, QPointF const&, QPointF const&, QFlags<Qt::MouseButton>, QFlags<Qt::KeyboardModifier>)' Task-number: QTBUG-52205 Change-Id: I4e85996850cc436b6a31addca3a8f9829c0c5edd (cherry picked from commit 7f12f94e481d4908ee7b68e2cab8263b7476b054) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix namespaced build using harfbuzz-ngThiago Macieira2017-06-161-0/+3
| | | | | | | | | | | | harfbuzz-ng doesn't link to Qt libraries, but uses the Qt headers for some types. With CONFIG -= qt, we don't get QT_NAMESPACE set, which leads to linker errors later. Instead of setting QT_NAMESPACE, ask qversiontagging.h not to tag the headers. Change-Id: Ie585843cfb684bc3b6e3fffd145e7e438ae7c6bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> (cherry picked from commit 091e61b3525c700ce4198086bbd0d95a59fcb31f) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix crash when calling QWidget::grab() on a QOpenGLWidgetSérgio Martins2017-06-081-2/+4
| | | | | | | | | | | | | | | By avoiding unneeded nested QPainters. Crash was: ASSERT: "s" in file /data/sources/qt/qt5/qtbase/src/gui/painting/qpaintengine_raster.cpp, line 2239 s was nullptr because the inner QPainter had called updateState(0), which is then dereferenced by the outer QPainter. Task-number: QTBUG-61036 Change-Id: I7aad648f805f1abac4d38dfbefa2292da8b52af4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 0265a23bb02b68534bb3c86514cc93bc45a7444f)
* Translate the adjusted deviceWindowRect with an adjusted offsetAllan Sandfeld Jensen2017-06-081-1/+7
| | | | | | | | | | Otherwise the mismatched device pixel ratio will lead to incorrectly offset blitting. Task-number: QTBUG-59017 Change-Id: Iccbe9cd9704bccbceda4c8dafe87435b68b5cf3e (cherry picked from commit dd8313d5be4fe4dd0defdf3eb78e2b47f0e2f20e) Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* define QT_NO_EXCEPTIONS reliably when using ClangR.J.V. Bertin2017-06-052-1/+16
| | | | | | | | | | | | | Clang's definition of the __EXCEPTIONS macro is inconsistent across platforms. When compiling for Darwin, Clang 3.6 and newer will set the token when exceptions are enabled in either C++ or ObjC. This change adds the reliable check described in the Clang 3.6 release notes to ensure that QT_NO_EXCEPTIONS is defined when required. Task-number: QTBUG-61034 Change-Id: I8205793c1501a4243b14d8642fe1f16d2df69be4 (cherry picked from commit 6e97d091e4d30566c14cf726f44d9e17f819c2c2) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* HiDPI: Scale mouse position on enter eventBłażej Szczygieł2017-05-221-1/+2
| | | | | | | Task-number: QTBUG-60892 Change-Id: If800ecaadc5b19c10a954658ece484f30b7f313f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 53335315ff11752dc0f731adb1c2d5a0f6281b25)
* Remove some more register keywordsMarc Mutz2017-05-091-2/+2
| | | | | | | | They're deprecated since C++11 and removed in C++17. Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b92267cd4c4a7c88aab950ad519943d85add1da2)
* QHash/QMultiHash: fix operator==Giuseppe D'Angelo2017-05-092-10/+49
| | | | | | | | | | | | | The existing QHash::operator== does not work when the same keys appear in different order between the two hashes being compared. However, relying on iteration order on a QHash is (as usual) a bad idea and one should never do it. Task-number: QTBUG-60395 Change-Id: Ifb39a6779230e26bbd6fdba82ccc0247b9cdc6ed Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit dbd55cdaf367bdc9d6774bcb9927cbe19f18065f) Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* ANGLE: Improve error handlingOliver Wolff2017-05-057-55/+477
| | | | | | | | | | This patch backports ab4fd98fac0cbc30cfc578a06c068519ee2df2e1 from ANGLE proper. It greatly improves error handling in important places and thus avoids crashes. Task-number: QTBUG-48970 Change-Id: Idcdc54396731323ebf4587b73b3360d5f3d17506 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QOpenGLWidget: Fix UB (invalid cast) in ~QOpenGLWidgetPrivateDyami Caliri2017-05-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QOpenGLWidgetPrivate destructor calls reset(), which accesses the Q-pointer. Calling Q_Q(Class) while still inside the private class's destructor is wrong due to the cast in q_func() which is undefined behavior at that stage. Here is the UB report: qopenglwidget.cpp:548:5: runtime error: downcast of address 0x000016d0e200 which does not point to an object of type 'QOpenGLWidget' 0x000016d0e200: note: object is of type 'QObject' 00 00 00 00 10 30 32 0f 00 00 00 00 40 e2 d0 16 00 00 00 00 80 7b 42 0f 00 00 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' 0 QOpenGLWidgetPrivate::reset qopenglwidget.cpp 656 0x607e667 1 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 570 0x60982ab 2 QOpenGLWidgetPrivate::~QOpenGLWidgetPrivate qopenglwidget.cpp 569 0x6098516 3 QScopedPointerDeleter<QObjectData>::cleanup qscopedpointer.h 54 0xcbf7058 4 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer qscopedpointer.h 101 0xcbde858 5 QObject::~QObject qobject.cpp 1042 0xcb94792 6 QWidget::~QWidget qwidget.cpp 1701 0x5e173f7 7 QOpenGLWidget::~QOpenGLWidget qopenglwidget.cpp 946 0x608d72b 8 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58237b6 9 ImagePreviewComponent::~ImagePreviewComponent imagepreviewcomponent.h 16 0x58238c6 Change-Id: If13932ac657afb9d1358ac82ab911a05e96cfbcd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 32f8cbae90d7d5f5a23a645b39a2f1a29d378af8)
* QUrl: fix IDN conversion when the ACE form is invalidThiago Macieira2017-05-041-9/+36
| | | | | | | | | | | | | | | | | We guarded against the Unicode form being invalid and did not produce an encoded form. But we did not guard against proper Punycode sequences that decode to forms that had not passed the proper Nameprep stage. So check for that and, if it fails, just keep the label in the form we found it in (it's valid STD3 anyway). [ChangeLog][QtCore][QUrl] Fixed a bug that caused certain domain names that look like Internationalized Domain Names to become corrupt in decoded forms of QUrl, notably toString() and toDisplayString(). Task-number: QTBUG-60364 Change-Id: Iadfecb6f28984634979dfffd14b833142cca8d0d Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 9e2c6899e0a07edf525945a182d2537086441268)
* QUrl: fix IDN whitelist checking when the TLD is in UnicodeThiago Macieira2017-05-041-2/+2
| | | | | | | | | | | The whitelist is kept in ACE form, so if the TLD came in Unicode, we need to run ToASCII before we can check the whitelist. This is slightly inefficient because we'll run the same operation later in this domain. Change-Id: Iadfecb6f28984634979dfffd14b831f37b0f4818 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> (cherry picked from commit 21dd5d314a75c09250448e5d59dfb9af88c0f7d5)
* [doc] QSet: fix return type of insert()Marc Mutz2017-05-041-1/+1
| | | | | | | | | It's an iterator, not a const_iterator. Let QDoc figure out the correct one. Change-Id: I7ddd1568adbf811b801c170794465ba14ceed05e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 47cf309190a3cc833f935397fc0db7cfbcddbc44) Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use gdbserver command from a safe placeBogDan Vatra2017-05-021-42/+11
| | | | | | | | | Removed support for old QtCreator versions (pre 3.5) Change-Id: I5ec0e965c09c8a76810144b133af3395e32fddfa Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit c76918b2b21c25d927dca8f8911349a15f22a1e2)
* Improve QStringBuilder docsMarc Mutz2017-04-181-8/+20
| | | | | | | | | | | - Mention you can build QByteArrays, too - Nicer list of types that can be used, separate for QByteArray and QString Change-Id: Ia91445f0cb4872bab12a55f4812c283e9c38dba4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 11ed95ac9c12ee2b20b5c6f6be68d0b6387c0e70)
* Fix build with libdrm >= 2.4.78Thiago Macieira2017-04-181-5/+5
| | | | | | | | | | | drmEventContext has grown by one pointer, so the build fails with an error about a member without initialization. qeglfskmsgbmdevice.cpp:147:5: error: missing initializer for member ‘_drmEventContext::page_flip_handler2’ [-Werror=missing-field-initializers] Change-Id: I0e1a09998253489388abfffd14b6014b1ddc90e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 34d2fd14979198dc0fcc07f73581ece9540c4b72)
* QVariant: fix docs regarding QUuidMarc Mutz2017-04-141-3/+5
| | | | | | | | | - toUuid(): QUuid is a built-in type, so use type(), not userType() - canConvert()/toUuid(): QUuid converts to and from QString Change-Id: I5262ff7ab093040cb943b6ab9cfffe95491d2b9b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 9d1203bf02abec8b5ab73c4c8a81eb4627336ad8)
* QMatrix4x4: fix aliasing problem in operator*=Marc Mutz2017-04-141-1/+2
| | | | | | | | | | | | When multiplying a QMatrix4x4 by itself, we were clobbering the very matrix we read from. Employ read-caching to avoid this aliasing problem. [ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct result even if the RHS and LHS are the same object. Change-Id: I8534d56cfdd62c336577125127f05173fcec2873 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit 5662234afaf23d88e1f3fa4bee2a59b61bd0c267)
* Cocoa: Unbreak app activation on macOS SierraMorten Johan Sørvig2017-04-122-10/+18
| | | | | | | | | | | | | | | | | | Previously, we would activate the application during QCocoaIntegration construction, which means at QApplication creation time. This now seems to interfere with application startup on macOS Sierra, where the application window ends up in an unfocused state. Move application activation to applicationDidFinishLaunching, at which point the Cocoa runtime should be completely initialized. Do this for 10.12+ only to avoid regressions/ test failures on previous versions. Task-number: QTBUG-57044 Change-Id: If6248753236d7473db2b8513dba0368901f3f4cf (cherry picked from commit 2c9dc93696f32b798b872f931c102329d0ba7155) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Android: Fix crash at exitBogDan Vatra2017-04-112-14/+16
| | | | | | | | | | | | We need to remove and release the surface imediately, otherwise setSurface might be called after the object is deleted. Task-number: QTBUG-59818 Change-Id: I3a09e3de1ceecc22d8d7a48e2fc1cfe40cf09f0a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Mathias Hasselmann <mathias.hasselmann@kdab.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io> (cherry picked from commit 6c4cbd4122edf8b78f34778400d485b11da98404)
* QMap: fix UB (invalid cast) in QMapData::end()Thiago Macieira2017-04-111-2/+4
| | | | | | | | | | | | | | | | | | The end() pointer, like in all other containers, is a sentinel value that must never be dereferenced. But unlike array-based containers, end() in QMap is not "last element plus one", but points to a base class of Node, not a full Node. Therefore, the casting from QMapNodeBase to QMapNode must not be a static_cast, reinterpret_cast is required. libstdc++-v3's red-black tree had the exact same problem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60734 Change-Id: I43f05fedf0b44314a2dafffd14b33697861ae589 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> (cherry picked from commit 75cdf654bcc192ba73a8834e507583a59140e7e4) Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QtWidgets: Fix white text color on tabs on macOS for non-macOS stylesBłażej Szczygieł2017-04-111-3/+2
| | | | | | | | | | | | Apply white text only for macOS style. Amends 2c0033983bc53e906eab3f4b2fae836ff8472713 Task-number: QTBUG-59784 Change-Id: I9e66e929699efd715ed4565394f1aba763aeb32a Reviewed-by: Jake Petroules <jake.petroules@qt.io> (cherry picked from commit 2fbc1432025dd478cf9e940e3c2a1952b218c6dc) Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* doc: fix variable name in QDBusArgument::beginMap() exampleRolf Eike Beer2017-04-101-1/+1
| | | | | Change-Id: I77731a4c8479a4db46b981993d72f28eb19f7594 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add gradle wrapper to Qt & update default Andriod gradle pluginBogDan Vatra2017-04-109-2/+1268
| | | | | | | | | | We need to add gradle wrapper to Qt because it was removed from latest Android SDK. Adding it to Qt, will give us more control and will save us from pain in the future. Task-number: QTBUG-59237 Change-Id: I6419876f8be11c0feeac448b228a46f811065264 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 12a0e1b4f8c0e66b373b11b83956d1fa292c7ac4)
* Fix menu position when highdpi scalingMorten Johan Sørvig2017-04-071-2/+3
| | | | | | | | | | | | | | | | | | | Certain display and scale factor configurations would cause menus to pop up in incorrect locations or not be shown at all. This was due to QDesktopWidget::screenNumber() having a toNativePixels(QRect, QWindow) call which requires that QWindow::screen() returns the correct screen. Break the circular dependency by converting coordinates the other way for the intersection test: transform screen geometry to device independent coordinates. Task-number: QTBUG-58329 Change-Id: I5ff2a5b14296ddbf7d8ddca11420988aae6cc0bd (cherry picked from commit 5e76cb16924a42cb020786f45cc3494dd5836c5c) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QCryptographicHash: make SHA3 calculate SHA3, not KeccakGiuseppe D'Angelo2017-03-311-12/+40
| | | | | | | | | | | | | | | | | | | | The SHA3 family is a modified version of Keccak. We were incorrectly calculating Keccak (and even *testing* Keccak!), but claiming it was SHA3. To actually calculate SHA3, we need invoke Keccak on the original message followed by the two bits sequence 0b01, cf. §6.1 [1]. [1] http://dx.doi.org/10.6028/NIST.FIPS.202 [ChangeLog][QtCore][QCryptographicHash] QCryptographicHash now properly calculates SHA3 message digests. Before, when asked to calculate a SHA3 digest, it calculated a Keccak digest instead. Task-number: QTBUG-59770 Change-Id: Iae694d1a1668aa676922e3e00a292cddc30d3e0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 88a8feeacb9bdaff9ee06164424e407eb904cd10)
* QCryptographicHash: fix documentation of the supported algorithmsGiuseppe D'Angelo2017-03-311-1/+2
| | | | | | Change-Id: Idfa7843ef8a8e3410ae0a8cf5311b8b598299730 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit cd9e850f9e9620a8bafec964efad8098443be7f1)