summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QJsonDocument: Avoid overflow of string lengthsJüri Valdmann2018-05-161-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-161-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-161-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-162-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)
* 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>
* Fix crash if QPixmap::defaultDepth() is called when no QGuiApplicationEirik Aavitsland2018-04-191-1/+7
| | | | | | | | | | | 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-113-6/+8
|\ | | | | | | Change-Id: Iee7af16c3e26dc7d7f594ebd3876370ac83a1bc8
| * 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-201-2/+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-1434-128/+109
| |\ | | | | | | | | | 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)
* | | 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)
* | | moc: Don't error our when parsing "using namespace __identifier(...)"Andy Shaw2018-03-141-0/+3
| |/ |/| | | | | | | | | | | | | | | | | | | 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-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | QHeaderView: Fix crash in layout about to changeThorbjørn Lund Martsum2018-03-021-2/+4
| | | | | | | | | | | | | | | | | | | | 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)
* | 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)
* 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>
* QHeaderView: Preserve settings on layoutChange with empty modelChristian Ehrlicher2018-02-221-0/+24
| | | | | | | | | | | | | | | 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-221-3/+7
| | | | | | | | | | | | 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)
* Windows QPA: Fix accessibility being triggered by IMEFriedemann Kleint2018-02-211-0/+1
| | | | | | | | Add missing break. Change-Id: Ib17e348e64379abded41f6c044de59f9ee1dd8fc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 27b8e97e4f478211b0da7b4352f0ce3f4557ce12)
* Fix expected signature from Connman Scan methodPekka Vuorela2018-02-201-1/+1
| | | | | | | | | | | Resulted in errors on app startup: Unexpected reply signature: got \"\", expected \"a{sv}\" Connman technology interface documents Scan as void, results gotten with other api. Change-Id: I6f2961685af7e1ef0559e1b6d89245231404899c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Add WFD_DEVICE_CLIENT_TYPE attribute for INTEGRITY S820Am ADPKimmo Ollila2018-02-191-5/+19
| | | | | | | | | | | This is needed to be compatible with latest Qualcomm BSP releases. This patch also makes it possible to select HW layer via QT_OPENWFD_CLIENT_ID and QT_OPENWFD_PIPELINE_ID environment variables. Change-Id: Ie795b21afc61a1de7c1d0b52cdb30a754e3f8266 Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QFusionStyle: fix the checkbox rendering in low DPI settingsYulong Bai2018-02-191-15/+20
| | | | | | | | | | | | | | | Fixed some regression of checkbox's size brought in by c9f68a5. Using qreal and QRectF to avoid the round error accumulation of sizes in low dpi situations. Tweaked the look of the check mark. Task-number: QTBUG-66343 Change-Id: Iad84f2f4503b53faf078ad52e13b6fbe88267426 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit ea21b36836abd6c2bb6d139c9d4b8149acdc4785) Reviewed-by: Liang Qi <liang.qi@qt.io>
* QGuiApplicationPrivate::processDrag(): Add assertJesus Fernandez2018-02-151-1/+2
| | | | | | | | | CID 186303 (#1 of 3): Dereference after null check (FORWARD_NULL) var_deref_model: Passing null pointer w to sendEvent, which dereferences it. Coverity-Id: 186303 Change-Id: If398165858b91508ccdf4be0c239d6bb104d78fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix GCC 8 warning in qvariantanimationVille Voutilainen2018-02-141-1/+1
| | | | | | | qtbase/src/corelib/animation/qvariantanimation.cpp:451:13: error: cast between incompatible function types from ‘QVariant (*)(const QRectF&, const QRectF&, qreal)’ {aka ‘QVariant (*)(const QRectF&, const QRectF&, double)’} to ‘QVariantAnimation::Interpolator’ {aka ‘QVariant (*)(const void*, const void*, double)’} [-Werror=cast-function-type] Change-Id: I5398316adaa0f12fbbdfdb200fd796de284821ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix GCC 8 warning in qurlrecodeVille Voutilainen2018-02-141-2/+2
| | | | | | | | qtbase/src/corelib/io/qurlrecode.cpp:514:86: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QChar’ from an array of ‘const ushort’ {aka ‘const short unsigned int’} [-Werror=class-memaccess] memcpy(appendTo.begin() + origSize, begin, (end - begin) * sizeof(ushort)); Change-Id: Ide78a4144d6bc63342c3c4334cc97fe73c5167bd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Silence GCC 8 warnings in QStringVille Voutilainen2018-02-141-4/+4
| | | | | | | | qtbase/src/corelib/tools/qstring.cpp:3539:67: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘class QChar’ from an array of ‘short unsigned int’ [-Werror=class-memaccess] memcpy(uc, d->data() + copystart, size * sizeof(QChar)); Change-Id: Ic601bed1a1f9e1b6f0ac1f9e58f1dcadb50ad724 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Silence a GCC 8 warning in QIODeviceVille Voutilainen2018-02-141-1/+1
| | | | | | | | | | qtbase/src/corelib/io/qiodevice.cpp:688:60: required from here ../../../include/QtCore/../../../../qtbase/src/corelib/tools/qvector.h:727:20: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingBuffer’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memmove(i, b, (d->size - offset) * sizeof(T)); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I9dc9a17c281b71bf2eb3e89116600ec3ba345d74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build failure when QtNetwork module is not buildPasi Petäjäjärvi2018-02-132-2/+2
| | | | | | | Affected plugins: tuiotouch, vnc Change-Id: Iabf72e3da0a25de0de2a861c69a29b3887ca81c3 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Remove QLibrary code path specific to HP-UX on PA-RISCKonstantin Tokarev2018-02-121-33/+2
| | | | | | | | The only mkspecs that enabled QT_HPUX_LD were removed in ab44ac021de. Change-Id: I9f27f0b487b69c11d19ba76801e3926b7894e6e7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Android: Don't rely on QDir::homePath() to get the application directoryChristian Strømme2018-02-121-2/+13
| | | | | | | | | | | | | | | | | | If the QLoggingRegistry gets called as part of the static initialization phase, it would call into Android's QStandarPaths implementation, which assumed that the HOME env. variable was already set. Since the variable isn't set before main is called, QDir::homePath() returns the root path, which would be cached and always returned. With this fix we now call Android's getFilesDir() directly, which will always return the right path. Since the font locations are also relying on an environment variable being set, we no longer cache that either. Task-number: QTBUG-65820 Change-Id: If45f3d5f0e87b808a62118ae95c31b492885646a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit eadf9e542fcc42597bfe02df065fc4cefa94cd56)
* Make use of our egl convenience code for QNX QPAAdam Treat2018-02-089-295/+159
| | | | | | | | | This fixes various problems that occur because the current egl context assumes OpenGL ES 2.0 and does not support newer versions of ES. Task-number: QTBUG-64306 Change-Id: I81466ba5cf028b47ca5a2ebcdc702167aff655a2 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* Android: Defer initialization of logging rules until qApp constructionTor Arne Vestbø2018-02-072-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android, we load the application library, and its dependencies (Qt), on Android's main thread (thread 0), and then spin up a secondary thread (thread 1), that we call main() on. If any QObject is constructed during loading of the application library or any of Qt's libraries, via static initializers or constructor functions, we will set QCoreApplicationPrivate::theMainThread to thread 0, which will confuse Qt later on when it's being run on thread 1, and will result in a warning during QCoreApplication construction: QApplication was not created in the main() thread This situation can easily lead to a crash as well. Unfortunately logging via qDebug/qCDebug and friends will trigger this too, as they internally use QObject. Fixing the root cause of this is under investigation, but for now we will partially revert fa2a653b3b934783 for Android. The effect is that any qCDebug with a "qt.*" category before qApp construction will turn into a no-op, like it was before fa2a653b3b934783. This patch does not cover the case of a regular qDebug, or a qCDebug with a non-Qt category. Those will still produce the same symptom, as before fa2a653b3b934783. Task-number: QTBUG-65863 Change-Id: I95675731d233244530d0a2a1c82a9578d5599775 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 538b1b50764fb3a1898d425a7155319afbcf3b25)