summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add changes file for Qt 5.9.6Antti Kokko2018-06-011-0/+46
| | | | | | Change-Id: I8f342db47d12a835a8698265c68f3906298e82ad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-163-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>
* QJsonDocument: Validate also zero-length objectsJüri Valdmann2018-05-162-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>
* QJsonDocument: Reject objects containing themselves in binary JSONJüri Valdmann2018-05-162-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>
* QJsonDocument::fromRawData: Fix out-of-bounds accessJüri Valdmann2018-05-164-1/+5
| | | | | | | | | | | | | | | 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)
* macOS + FreeType: Properly distinguish memory fonts from file fontsTor Arne Vestbø2018-05-151-6/+5
| | | | | | | | | | | | | | | | | | In recent macOS versions the descriptor created from the function CTFontManagerCreateFontDescriptorFromData() will contain the NSCTFontFileURLAttribute with a value such as: file://iNmEmOrYcGfOnT_0x101d3c3a0#postscript-name=New Which means we can't use the presence of the kCTFontURLAttribute to determine that we're dealing with a file font. Instead we check for our custom kQtFontDataAttribute first, which is only set for memory fonts. Task-number: QTBUG-68044 Change-Id: Ie87d06b5a9e0e251305200b717f18ef68ccc6abc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 43ea15d01cd491639d8cb5eb85da066f5d0a8571)
* Fix build without features.timezoneTasuku Suzuki2018-05-151-0/+4
| | | | | | Change-Id: I3f8421103afa61baf415636b4dc8cf93fb477bcc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 8f7dcba204d21444cb0bd00f13fc496bb9420484)
* Windows/QSaveFile: Fix locking issues on Dropbox drivesFriedemann Kleint2018-05-143-5/+13
| | | | | | | | | | | | | | | Add a flag to QTemporaryFileEngine causing the file to be opened in non-shared mode, preventing renaming failures caused by the Dropbox driver accessing it. Task-number: QTBUG-57299 Change-Id: Id7afc3559fd15784d4166efbbd057d592b5e0ab2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit fe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6) Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> Reviewed-by: Kai Pastor <dg0yt@darc.de>
* Make sure $$relative_path() uses an absolute path as its first argEdward Welbourne2018-05-044-9/+32
| | | | | | | | | | | | | | | | | Thanks to QTBUG-61373, this qmake function was called with /usr/local/5.10.1 as baseDir, which isn't absolute, leading to an assertion failure. We could raise the error within qmake but it proved easier to simply resolve any non-absolute baseDir using PWD, before trying to use it as an absolute path. Did the same for $$absolute_path(). Documented both. Adjusted the assert that caught this to report any non-absolute path that upsets it. Added simple tests, fixed an existing test. Task-number: QTBUG-66156 Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 58b373c9e3c0a7307e3fbafeb5ad710088b8e685)
* qmake: Don't map Xcode SYMROOT to output directoryTor Arne Vestbø2018-05-031-1/+11
| | | | | | | | | | | | | | | | | | The output directory may be the same as the source directory in the case of an in-source build, but Xcode treats the SYMROOT as a build directory, and automatically excludes it from Time Machine backups, which may result in not backing up sources. Instead we map SYMROOT to an .xcode subdirectory of the output directory, and then use CONFIGURATION_BUILD_DIR to make sure the final build targets end up where they used to. Task-number: QTBUG-52474 Change-Id: I3852ca9088e75ca62fca4c1217b5485175d9436f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7c3053b301a70b04f5ab4ed9c3f3a6c84cb89616) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix crash if QPixmap::defaultDepth() is called when no QGuiApplicationEirik Aavitsland2018-04-192-1/+9
| | | | | | | | | | | This static method can be called before QGuiApplication is created. At that point there is yet no primary screen, so the implementation needs to guard against dereferencing a nullptr. Task-number: QTBUG-67309 Change-Id: I6b7b9e97b1c3c79bf2f9c6d6247c3b10f39f7a55 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 7f782e1fc41ff7694f9bf7434d5a4db0545c0413)
* macOS: Fix standardLocations() returns invalid pathMasashi Fujimoto2018-04-161-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | The file path included in the return value was incorrect when giving the following value to the argument of "QStandardPaths::standardLocations()". - QStandardPaths::AppDataLocation - QStandardPaths::AppLocalDataLocation - QStandardPaths::DataLocation The function to obtain the path to <AppName>.app changed from CFURLCopyPath() to CFURLCopyFileSystemPath() by commit id c0da37a806dc0457636d787331e9f50778ee8b3e. CFURLCopyPath() returns a value with a path delimiter appended at the end, but CFURLCopyFileSystemPath() is not. This is a commit to append '/' to the end of the return value of CFURLCopyFileSystemPath(). Task-number: QTBUG-61159 Change-Id: Icaebdf09d9cdf992d59c16a398dfe666e6225f99 Reviewed-by: Jake Petroules <jake.petroules@qt.io> (cherry picked from commit aebc9023bb0acb9697540b444a6dfae95b762644) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QCoreTextFontEngine: Fix build with Xcode 9.3Gabriel de Dietrich2018-04-121-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) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.9.5' into 5.9Qt Forward Merge Bot2018-04-115-27/+130
|\ | | | | | | Change-Id: Iee7af16c3e26dc7d7f594ebd3876370ac83a1bc8
| * Add changes file for Qt 5.9.5v5.9.5Antti Kokko2018-04-041-0/+122
| | | | | | | | | | Change-Id: I6de04b86f01467c326bf3194fe0bf432d1ee9f9b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QFusionStyle: Fix compilation when qreal is floatAlexander Akulich2018-03-201-4/+4
| | | | | | | | | | | | | | | | Change-Id: I575d348915a7239a40b589012b4e9707bd15d1dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 53f82185e9320e0561d5a424d7145aadc18cca30) Reviewed-by: Yulong Bai <yulong.bai@qt.io>
| * Revert "Set sharedPainter correctly for QGraphicsEffect"Laszlo Agocs2018-03-202-23/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7257862fb2edfab0219d6cd45c83677049404f7d. It has been reported that this patch causes widgets with certain effects become invisible. Task-number: QTBUG-60231 Task-number: QTBUG-66803 Task-number: QTBUG-66387 Change-Id: I9c3c4cf2f17ac639d1aee5489b665aa1e165af16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 00304eac7b1ddd22b971da78aa84c86fe2919359) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * Merge 5.9 into 5.9.5Oswald Buddenhagen2018-03-1437-128/+166
| |\ | | | | | | | | | Change-Id: I327bacd544f874da37c4e0740af0c7854d74a913
| * | Fix QLabel crash if buddy's lifetime is too shortSergio Martins2018-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If buddy is deleted then QLabel will still try to deliver the shortcut event to it, in QLabel::event(), and crash. For this cherry-pick removed all nice-to-haves and only fixed dereferencing the null pointer. Task-Id: QTBUG-66841 Change-Id: Ib6a36a9f99cee31afe1f88eb77f5b6cafb8b1086 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit c082d84d5d7fdbfb64de18f06a8ddbc77f2e6de4) Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | | Fix integer overflow (1 << (' ' - 1))Mikhail Svetkin2018-04-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where integer by default is int32(max is 2147483647) and (1 << (' ' - 1)) will be 2147483648 Change-Id: I790d33bd4e473925d6897dd87cbffdfe8dd7938f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 28f9b35b35e7c9964f22f4e28aac9c6093401900)
* | | Fix integer overflow (1 << 31)Mikhail Svetkin2018-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On platforms where integer by default is int32(max is 2147483647) and (1 << 31) will be 2147483648 Change-Id: I59ccb5344d5ad7d085f01bbc7cebdf6152ff7755 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit f5a624c9b94455bebd7eb8fabbb300c4793fe6df)
* | | Fix typoed integrity conditionKari Oikarinen2018-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 594fe5c4636cb783bb7840efff4171e772ae906a. Change-Id: I0fb5ab79d895cfd9698db9b4a4394481299a7e1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 8b9a9651d6efbd84cda476c47f962ff0a600b234) Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | macOS: Handle NaN mouse event positionsNathan Collins2018-03-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing gestures such as Exposé or Mission Control with the mouse button down, the position of the mouse release event is returned with NaN values. This causes QGuiApplicationPrivate::processMouseEvent to be called recursively and ultimately crash. Task-number: QTBUG-67194 Change-Id: If1536bc4dc2075c498cdd6c5afe57c86bdaac13b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 992f673782ac7b8edea0dc7b4498eb7f970b4ba8)
* | | qstringapisymmetry: Fix XML parsing failing on invalid encodingsFriedemann Kleint2018-03-281-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Evaluating testlib's XML output in COIN would fail with: "XML syntax error on line 7520: invalid UTF-8" for the toLatin1() tests due to some Latin1/UTF8 mixup. Add a helper function to convert the data to plain ASCII. Task-number: QTQAINFRA-1797 Change-Id: I1c64878d4c2a67b8c2689905b5ffe6707b5963c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit d8b143d4b77c45cfe1a40d525be5d0a79a2b07a4) Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | DBus: merge calls to set_source_files_properties() in CMake functionsRolf Eike Beer2018-03-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can handle multiple files at once just fine. Change-Id: I9dcf7b0c72df432f02200ac7f3967f36a408f306 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit 25956a1e7cef0fef39c94638b44c07457b452d00) Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | | Cocoa: Fix isChildNSWindow() for embedded QWindowsMorten Johan Sørvig2018-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e3d21ef0 removed the manual m_isNSWindowChild mode in favor of using m_view.window.parentWindow as a declarative test. However, this test has a false positive if the QWindow in question is a non-child QWindow which is embedded in a foreign NSView/NSWindow hierarchy. In the QTBUG-56589 case m_view.window.parentWindow is some internal window in the Photos app, which is not relevant to the Qt QWindow configuration. Improve the isChildWindow() test: the QWindow must actually be a child QWindow. Task-number: QTBUG-56589 Change-Id: I0e6e262c85f47267a6165e7f98e48264b1e00069 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Avoid of bounds memory reads when scaling and mirroring imagesAllan Sandfeld Jensen2018-03-232-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bounds check we had wasn't complete for mirroring cases. Task-number: QTBUG-65387 Change-Id: I5333912621c1223f83b4f1b95f2b16d12b520bd2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit 1d616e764d33da1d3435ae8ee366f6ea8af71787)
* | | Fix subpixel rendering on Windows/FreeTypeSergio Martins2018-03-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FT_LCD_FILTER_H wasn't defined because we weren't including the header. To fix it just remove the checks, as was done for Linux and assume sub-pixel is there. If it's not then no harm done, it won't use any. Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit fc8fd508165c8e4dcfe0da397b63cf99f15178e3)
* | | Fix restoring geometry of dockwidgetAnna Wojciechowska2018-03-232-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the past if the window with dock widgets was closed in maximized mode, after reopening the dock widget size was different from the original one. It was caused due to consecutive resizes of dock widgets when the window was shown. During resizing dock widget geometry restored from property file was lost. The solution was to keep restored size of dock widgets in QDockAreaLayoutInfo and use as hints for the dock layout engine. Task-number: QTBUG-16252 Change-Id: I94f4e895922063fa51150b68464fea4ddcb1d2a2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | | Windows QPA: Fix potential crash in leave event handlingFriedemann Kleint2018-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check for window != nullptr. Amends af5c8d04fb0c9ddda58925e4862e857c78a5e563. Task-number: QTBUG-67101 Task-number: QTBUG-57864 Change-Id: I2bbbbe514fc494fd569d0932d508c53c0544f665 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 1cb439dc948d6e610da49331184f0a660ef57b4e)
* | | Bump versionOswald Buddenhagen2018-03-191-1/+1
| | | | | | | | | | | | Change-Id: I0c3e663c3db80e912335d3e672f3393cba6dfc92
* | | Revert "Blacklist tst_QWindow::testInputEvents on Windows"Liang Qi2018-03-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fdddb3a4814f588e3ee87a6c1a0a6791f6ef0298. After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10 (msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The failure is gone. Task-number: QTBUG-66798 Task-number: QTBUG-66216 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 8edc08ef78202f42f373efc6f0814744b01eac9a) Change-Id: I932ccc2cc93954c006fbc863bc4ec53824afa8aa Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Revert "Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 on ↵Liang Qi2018-03-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows ci" This reverts commit a0db55040d21d17b1bba2ab406cb51c0f3a671aa. After b85b272c26810e54a4ceb0707cf4569f87517b67, Windows 10 (msvc2017-x86) is tested on Windows 10 (msvc2017-x86_64). The failure is gone. Task-number: QTBUG-66756 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit f7630bcc510861811cc7f2cb6656b4683c3c26c4) Change-Id: I65caac13bfcaa8b6fecdab7671b26d3d385949d1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | sub-attaq example: Fix crash with software Open GLFriedemann Kleint2018-03-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether an Open GL context could be created, else fall back to raster. Task-number: QTBUG-64797 Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 59343eef7dce58b1c167250b59b5f0a68428aa14)
* | | testlib: Silence all Qt logging in selftestsTor Arne Vestbø2018-03-142-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise random debug messages from Qt might mess up the expected vs actual results. Task-number: QTQAINFRA-1631 Change-Id: I855d31274f8261f8b125df23409353f7101be0e4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 3ae03c3585df7247f5699eeaa70e1bedf47f6d5b)
* | | moc: Don't error our when parsing "using namespace __identifier(...)"Andy Shaw2018-03-142-0/+4
| |/ |/| | | | | | | | | | | | | | | | | | | This follows on from a2322519929bd36a90422dccc0310b8230729197 which covered a similar instance of this. As with that change, we should not abort the compilation, just ignore it. Task-number: QTBUG-63772 Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 0da3ebd9940a214cc7ea292d13cd86967cd89a66)
* | QHeaderView: fix inconsistent saved state, ignored during restoreDavid Faure2018-03-092-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens because QTreeView disconnects QHeaderView's _q_layoutChanged slot (!). So the stretching of the last section, done in _q_layoutAboutToBeChanged, invalidated total length, but didn't recalculate it (since that's done in _q_layoutChanged). As a result, length was inconsistent, and saveState would save that, and restoreState() would early-return, not doing anything. Let's just ensure length is always consistent, so we don't depend on the complex issue of whether _q_layoutChanged should be called or not. This an adapted backport of 4a04eea4f4 from 5.11, the unittest shows that c0e45ae851 is missing in this branch though. Change-Id: I4137a19e0a6fdf820dd53fb55e858d1d04a2c113 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* | Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 on windows ciLiang Qi2018-03-051-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-66756 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a0db55040d21d17b1bba2ab406cb51c0f3a671aa) Change-Id: I4e49d610aad1a6a668035916c3879130d7a2d7df Reviewed-by: Liang Qi <liang.qi@qt.io>
* | QHeaderView: Fix crash in layout about to changeThorbjørn Lund Martsum2018-03-022-2/+5
| | | | | | | | | | | | | | | | | | | | Before there was a risk looking up e.g index -1 if there were no visible sections in layoutAboutToChange. Change-Id: Ic911e4292e8e8c4892fef1c0f34cf7dccaad2bac Task-number: QTBUG-65478 Reviewed-by: David Faure <david.faure@kdab.com> (cherry picked from commit e8425f9e52c9df0ce0fbf122adff3ef6930f9961)
* | Blacklist tst_QWindow::testInputEvents on WindowsKari Oikarinen2018-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Multiple recent failures on Windows 10. Task-number: QTBUG-66798 Task-number: QTBUG-66216 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io> (cherry picked from commit fdddb3a4814f588e3ee87a6c1a0a6791f6ef0298) Change-Id: I774d1196eec8e4befbab87d03c43b5378bf4859d Reviewed-by: Liang Qi <liang.qi@qt.io>
* | Modernize use of 'http' featureUlf Hermann2018-03-0133-126/+101
|/ | | | | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Task-number: QTBUG-66606 Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 1a0b4b9f26e16532cc3d5532e25d886426ce994e) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix build when ftp feature is disabledPasi Petäjäjärvi2018-02-281-0/+1
| | | | | | | | | Configuring Qt with -no-feature-ftp cause build to fail. Task-number: QTBUG-66624 Change-Id: I47f1cdc400702d0211a9f620c8606983f08fa70c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 02eb264aa2db20fac479a749c39044cc9ed304b2)
* unify windows mkspecs: define c++ flags explicitlyAlexander Shevchenko2018-02-274-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | with 40e87491 merged, 'QMAKE_CXXFLAGS' variable in 'win32-g++' toolchain became defined via 'QMAKE_CFLAGS'. the similar can be found in 'win32-clang-msvc' and 'win32-icc' toolchains too. this works for now, because such definitions just duplicates code from includes, like 'gcc-base.conf', 'msvc-desktop.conf', etc. but it would became broken, if changes would be applied to 'QMAKE_CXXFLAGS' definitions in that includes, prior to the redefinitions in 'win32-*/qmake.conf' toolchains. thus 'QMAKE_CXXFLAGS' definitions in 'win32-*/qmake.conf' toolchains should not depend on 'QMAKE_CFLAGS' and be done explicitly. in order to apply this change correctly to 'win32-icc' toolchain, its 'QMAKE_CFLAGS' variable should become dependent on definitions in the includes, similar to 'win32-clang-msvc' and 'win32-msvc' toolchains. Change-Id: I5e820e44a769a590ba63f70dcb3a115311093311 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 7ff3032b22cacd38390d164cb2c1a232c1979bab)
* Bump copyright yearJani Heikkinen2018-02-271-1/+1
| | | | | | | Task-number: QTBUG-65810 Change-Id: Ib6f87a126f64c2e4b2e924b97af4c2b2d10dd29e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 89053e224f296a19c107ea7925539d5125dac5c0)
* Update Unicode CLDR third party documentationKai Koehne2018-02-261-7/+11
| | | | | | | | | | [ChangeLog][Third-Party Code] Clarified use of "Unicode Common Local Data Repository (CLDR)" in the documentation. Also updated SPDX license name / ID. Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit f93d732dd17e35757d8ba554dfbecc0d4dd89e25) Change-Id: I0aabf005fca351981d8092efa4344efa33b4a3c6
* Document use of Unicode Character DatabaseKai Koehne2018-02-262-1/+19
| | | | | | | | | | [ChangeLog][Third-Party Code] Documented use of "Unicode Character Database (UCD)" in Qt Core. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 2442328393c516406d19c5fdc4065daa90b78369) Change-Id: I1bb12b9bf9a3ddfc105146291b29cec305ebe3a2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* fix installation of resources for example sourcesAlexander Volkov2018-02-221-1/+1
| | | | | | | | | | contains() interprets the regexp as being implicitly anchored, so the leading part of the path needs to be explicitly matched. Change-Id: I1efa07dc99bb2db1717d2a66621899e23c144164 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> (cherry picked from commit 22d3eeebb0a011a61104de2eb635a3ecf26b58e2)
* QHeaderView: Preserve settings on layoutChange with empty modelChristian Ehrlicher2018-02-222-0/+95
| | | | | | | | | | | | | | | Do not clear the settings of QHeaderView during layoutChange when the model is empty and the section count did not change. This will not work when a section is moved or a section is replaced with a new one during layoutChange. But since layoutChanged is also called on sorting, this patch ensures that the settings are not cleared in this case. This restores the behavior to the same as before 5.9.4. Task-number: QTBUG-66444 Task-number: QTBUG-65478 Change-Id: I39989cfd45b42e58f49d18ec014d3a941cadb6c9 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> (cherry picked from commit 9395f35cb18725995910531ca8b09f1d84efa96c)
* QHeaderView: properly restore hidden section size on layoutChanged()Christian Ehrlicher2018-02-222-3/+12
| | | | | | | | | | | | During (re)storing the sections within layoutChanged handling, the hidden section size was not properly stored which lead to a section size of 0 when the section was unhided afterwards. Task-number: QTBUG-66413 Task-number: QTBUG-65478 Change-Id: I0b714c7e0530a1eae82b3bb0e0dc80ed576522d0 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> (cherry picked from commit c0e45ae851c96dfebdebfd1e85b7b7eee6540bd1)
* opengl: Bail if cached shader fails to loadAntonio Larrosa2018-02-222-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLProgramBinaryCache::setProgramBinary() should check GL_LINK_STATUS after glProgramBinary(), but doesn't. In practice, this means that SDDM is a white screen, and KDE is just a gray task bar. So far, Qt tries to check this using its internal ::link() function. But in case the cached binary fails to load, Qt currently attempts to link the inexistent program, resulting in a zero-length, fixed pipeline shader. Checking this already in ::setProgramBinary() makes the call to ::link() superfluous, so we remove that as well. Done-with: Max Staudt <mstaudt@suse.com> Done-with: Michal Srb <msrb@suse.com> Done-with: Fabian Vogt <fvogt@suse.de> Task-number: QTBUG-66420 Change-Id: Iabb51d0eb2c0c16bde696efff623e57d15f28d82 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit fa091640134b3ff99a9eb92df8286d15203122bf)