summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Scale seconds by a thousand to get millisecondsEdward Welbourne2018-10-021-2/+2
| | | | | | | | | QTimeZonePrivate::dataForLocalTime()'s handling of times in a spring-forward gap added offsets in seconds to values in milliseconds. Supply the missing factor of a thousand. Change-Id: Ic32d87675f902e1c7fd85025fb70c8272a4f2db2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QUrl::matches for when removing authority parts (other than host)Thiago Macieira2018-09-291-8/+8
| | | | | | | | | | | | | | | | | | | QUrl::RemoveAuthority is RemoveUserInfo | RemovePort | 0x10, so the condition if (options & QUrl::RemoveAuthority) would match if any of the other bits for the username, password or port were set, which meant we would skip the host comparison. Ditto for username and RemovePassword. [ChangeLog][QtCore][QUrl] Fixed a bug that caused QUrl::matches to incorrectly compare two URLs with different hostnames or different usernames as equal, if certain QUrl::RemoveXxx options were passed. Change-Id: I015970a03b874898bba7fffd155856ab9d6cb1be Fixes: QTBUG-70774 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QCommandLineParser: Ensure that an option text ends with a newlineAlexander Akulich2018-09-281-1/+5
| | | | | | | | | | | | | | Before this change we inserted newline only if an option has a description and ended up with an arbitrary long line with all options. [ChangeLog][QtCore][QCommandLineParser] Fixed a bug that caused the help output to show two options or more in the same line if the options didn't have a description. Task-number: QTBUG-70174 Change-Id: Id54b9ae13ee596869e4dc14e09301aea19eed2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: fix log output patternLuka Modric2018-09-271-3/+1
| | | | | | | | | | Remove hardcoded android log pattern as this is already part of the message to match behavior on other platforms. Task-number: QTBUG-69450 Change-Id: I529b550114a2164beafe305f8392891c4ead88f0 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Modernize the "filesystemwatcher" featureLiang Qi2018-09-2714-62/+32
| | | | | | Change-Id: If030b56ad97e047d89d442629262b4839df306d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Modernize the "datestring" featureLiang Qi2018-09-2410-49/+52
| | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Modernize the "textdate" featureLiang Qi2018-09-244-18/+19
| | | | | | Change-Id: Ic0b6f13e17c301ed66d6a8297c242086c94ac87d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Export qt_open64 from QtCoreThiago Macieira2018-09-241-1/+1
| | | | | | | | | | Other libs use qcore_unix_p.h. qopenglprogrambinarycache.cpp:function QOpenGLProgramBinaryCache::load(QByteArray const&, unsigned int): error: undefined reference to 'qt_open64(char const*, int, unsigned int)' Change-Id: I44e7d800c68141bdaae0fffd155675d15eded2e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
* Clarify docs regarding the states of a QFutureWatcher with no future setAndy Shaw2018-09-241-3/+5
| | | | | | Task-number: QTBUG-55554 Change-Id: I49b475a95d8ee65864cfa6d1024cb17cfe648b43 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix integer overflow in very long sections in ELF objectsThiago Macieira2018-09-151-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>
* Merge remote-tracking branch 'origin/5.11.2' into 5.11Qt Forward Merge Bot2018-09-091-4/+4
|\ | | | | | | Change-Id: I2fa26fa061cbf5d2bded203a299a19b7d1c31d0a
| * Doc: Fix typos in QRectF documentationPaul Wicking2018-08-271-4/+4
| | | | | | | | | | | | | | | | | | Add missing 's'. Fixes: QTWEBSITE-823 Change-Id: I1acd3b7ae18982248bf3402fa5943ee95c1efdbe Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | QString: Fix snippet explaining "non-spaced numbered place markers"Andre Hartmann2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snippet tries to explain the advantage of str.arg("Hello", QString::number(20), QString::number(50)); over str.arg("Hello").arg(20).arg(50); which only makes sense, if str contains the same formating sequence, namely "%1%3%2". That also matches the belonging comment. Amends 8481500f639e3d5e2259db57847a2e7068e30650 Task-number: QTBUG-44044 Change-Id: Ic2595107bc599c6d244ebf88184a5cc5569ed4f1 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Move the literal code blocks to a separate fileVenugopal Shivashankar2018-09-032-15/+17
|/ | | | | | | | It's easier to override the code blocks this way. Change-Id: I98d40626a94fdb70a95c50332c2da141e9277070 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* _q_interpolate<T> is unsafe with unsigned template argumentsLuca Beldi2018-08-221-1/+13
| | | | | | | | | _q_interpolate<T> subtracts 2 arguments of type T, for unsigned types this can cause wrapping around Task-number: QTBUG-57925 Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Remove duplicate thread-safe documentation from logging macrosKai Koehne2018-08-201-16/+0
| | | | | | | | qdoc now handles \threadsafe also for macros, so we can remove the explicit \note. Change-Id: Iabeb7f69d237e7024a4f584adc516951b06d752b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Cast away -Wclass-memaccess warnings in QVarLengthArray methodsEdward Welbourne2018-08-201-3/+3
| | | | | | | | | | | | With g++ 8.2.0, I get warnings when a QVarLengthArray<QString> calls remove() or prepend(), as some tests in tst_QVarLengthArray do, as they call memmove() "writing to an object of type ‘class QString’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead"; which may indeed be a good argument for not using QVarLengthArray<QString>, but its own tests do. Change-Id: I4f8a64948b32a54e67a285df4ec7788f60739ffb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QSortFilterProxyModel inserting at bottom of source modelLuca Beldi2018-08-171-2/+2
| | | | | | | | | | | | | | | | Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel the row will be inserted in the source model at position proxy->rowCount rather than at the bottom. This causes insert at apparently random positions in the source. [ChangeLog][QtCore][QSortFilterProxyModel] QSortFilterProxyModel::insertRows(row,count,parent) with row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model rather than at the row QSortFilterProxyModel::rowCount of the source model Task-number: QTBUG-58499 Task-number: QTBUG-69158 Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d Reviewed-by: David Faure <david.faure@kdab.com>
* QUrl: Make sure we do reject URLs for which IDNA nameprep failedThiago Macieira2018-08-162-7/+12
| | | | | | | | | | | | | | qt_nameprep() already reset the string to its original length to indicate failure, but we didn't handle that in qt_ACE_do(). So make it have a return value whcih makes it easier to handle that case and do handle it. [ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames contained unassigned or prohibited Unicode codepoints to report isValid() = true, despite clearing the hostname. Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d Reviewed-by: David Faure <david.faure@kdab.com>
* MSVC: add support for 64-bit POPCNT on 32-bit machinesThiago Macieira2018-08-161-3/+6
| | | | | | | | It's just adding the count of each half. Change-Id: I9868946ceaf74002bde1fffd154b29908319007f Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* doc: Add missing override and remove redundant virtual for snippetsAlexander Volkov2018-08-1612-22/+22
| | | | | Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* [macOS] Fix lower bound when searching for previous transitionsErik Verbruggen2018-08-141-1/+1
| | | | | | | | | The lower bound shouldn't be the smallest (positive) value representable by a double, but the *lowest* (finite) value. Task-number: QTBUG-69862 Change-Id: Ia66610e3c0f8d9643c329714607f5af573206fd8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix possible heap corruption in QXmlStreamAllan Sandfeld Jensen2018-08-131-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>
* Glib dispatcher: use default priority for timersSune Vuorela2018-08-131-1/+0
| | | | | | | | | | | | | | | | For some reason, the GLib event dispatcher was lowering the priority for timers compared to other events like for example socket events. the IDLE priority is for "Do this later when you are not busy", and that is wrong for generic timer events. See also https://bugs.kde.org/show_bug.cgi?id=230184 Task-number: QTBUG-48344 Change-Id: Id337a8f0c7fad3ebd5e5fa49d7831a0001ea9010 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QSysInfo: fall back to /usr/lib/os-release if the /etc one is missingThiago Macieira2018-08-081-4/+13
| | | | | | | | | | | | Turns out that there are two files and while a lot of distros symlink one to the other, some distros lack the one in /etc. [ChangeLog][QtCore][QSysInfo] Fixed QSysInfo::productType() to properly detect some Linux distributions that ship with a minimal /etc. Change-Id: Ia741b559c24d46c78fb2fffd1548cab414037220 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qmake build with glibc 2.28Thiago Macieira2018-08-082-3/+11
| | | | | | | | | | | | | | We haven't yet run the configure checks to see if statx and renameat2 are present in glibc, so this fails when we redefine the structures and functions. linux/stat.h:56:8: error: redefinition of 'struct statx_timestamp' bits/statx.h:25:8: note: previous definition of 'struct statx_timestamp' qfilesystemengine_unix.cpp:110:12: error: 'int renameat2(int, const char*, int, const char*, unsigned int)' was declared 'extern' and later 'static' [-fpermissive] Change-Id: Ia741b559c24d46c78fb2fffd1548a792d22e3368 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* QString: Fix documentation for toDouble() and toFloat()Andre Hartmann2018-08-061-2/+2
| | | | | | | | The character 'g' is only a valid format when converting numbers to strings, but not other way round. Change-Id: Ie772886e7a45a5067c0a3e4eaa3a6ccef8e69426 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QObject: do allow setProperty() to change the type of the propertyThiago Macieira2018-08-041-1/+2
| | | | | | | | | | | [ChangeLog][QtCore][QObject] Fixed a bug in setProperty() that caused a property change not to take effect if the old value compared equal using QVariant's equality operator, but the values were not strictly equal. Task-number: QTBUG-69744 Change-Id: I00e04a465fcf4fc1a462fffd1547885861a07a64 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Doc: Clean up Qt::ApplicationAttribute docsPaul Wicking2018-08-031-33/+35
| | | | | | | | | | | | | | | | * Remove () from links to QGuiApplication link names. The link targets QGuiApplication, and the syntax Q(Gui)Application to suggest both QGuiApplication and QApplication seems unnecessary, as QApplication derives from QGuiApplication anyway. * Move added in version line to the bottom of each entry that contains said line for consistency. * "was added in" > "has been added in" Task-number: QTBUG-56077 Change-Id: Ife93acb7936ff9f0d3af2f2f456ad0db95419797 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Doc: Increase precision in description of convenience typedefsPaul Wicking2018-08-031-1/+1
| | | | | | Task-number: QTBUG-53856 Change-Id: I57917bb311d1d93e0903f2b3e021cc4db0f0d05e Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* Windows: Implement Qt::WindowStaysOnBottomHintFriedemann Kleint2018-08-031-2/+6
| | | | | | | | | | | | Set the Z-order to HWND_BOTTOM in that case. Add a doc note stating that it only works for frameless or full screen windows. Task-number: QTBUG-53717 Change-Id: I7abf219a88aac715c51d27d925504da9e91b56f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QProcess::startDetached: Fix behavior change on WindowsJoerg Bornemann2018-08-032-5/+13
| | | | | | | | | Do not overwrite stdout/stderr by default, but only if requested. This restores the behavior of QProcess::startDetached of Qt 5.9. Task-number: QTBUG-67905 Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Improve documentation of QString::indexOf that take QRegExpAlbert Astals Cid2018-08-011-8/+0
| | | | | | | | | | They said "By default, this function is case sensitive" but this makes no sense when you're using a regexp for searching, the regexp is case sensitive or not by itself, QStringList does not influence that. Change-Id: I7446cb52a9f915c6551af6046ce89cbc8bab96ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix conditions for dup2 in QProcess::startDetachedJoerg Bornemann2018-08-011-7/+5
| | | | | | | | | | | The channel pipes are only set up if the channel's type is Redirect. Fix the conditions accordingly. This amends commit 7ad55ca6. Change-Id: Ie8a800fbe2bf9f5f6709b14ba03133b80e9b4bef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QDeadlineTimer: Fix documentation typoAndre Hartmann2018-08-011-2/+2
| | | | | Change-Id: If8f7766ca0698a3defdf9c59c44fb02a8a5b3b62 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Update signals and slots introduction pagePaul Wicking2018-07-311-22/+26
| | | | | | | | | | | Use this as context in connect to functors/lambdas. Add description of the use of context in connects. Update the simple example to make it slightly less confusing for (new) readers. Task-number: QTBUG-69483 Change-Id: Ibbbe98c4282cea4ebd860b1d174871559b7f195b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Link from QLocale to where date-time formats are explainedEdward Welbourne2018-07-312-0/+16
| | | | | | | | | | | QLocale has various methods that deal in date-time formats, which may be supplied as strings; but does not document the form of a format string. That's documented in QDate, QTime and QDateTime, so link to them for the details. Task-number: QTBUG-23307 Change-Id: I6347d80a87dc03f6a4065e3d5bf4d535f05af93f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QJsonDocument: Make emptyObject an objectJüri Valdmann2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed QJsonObject has no data payload, it is only a pair of null pointers. So, when it becomes necessary to 'materialize' such an object, a special global emptyObject constant is used as the substitute payload. There is a small problem with this global constant though, namely that it's is_object flag is unset. In other words, the emptyObject is not an object, but an array. Fix by setting the is_object flag on emptyObject. The example code in the bug report QJsonObject parent; QJsonObject child; parent["child"] = child; // 1 child = parent["child"].toObject(); // 2 child["test"] = "test"; // 3 runs into this problem on line 1. Inserting the default-constructed child means inserting a copy of emptyObject. On line 2 a pointer to this copy of emptyObject is retrieved and cast to an object. But it's not an object, it's an array, so things go wrong hereafter. Specifically, on line 3, two inserts are performed, one from operator[] and one from operator=. Each insert increments a compaction counter. The second insert triggers compaction (QJsonObject::insert calls Value::requiredStorage calls Data::compact) and compaction branches based on the is_object flag. Replacing line 3 with child.insert("test", "test"); causes the example to appear to work since compaction is not triggered and the JSON serializer does not look at the is_object flag. Still, any further insert() calls would trigger compaction and memory corruption. Task-number: QTBUG-69626 Change-Id: I8bd5174dce95998bac479c4b4ffea70bca1a4d04 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean before copying any QCollatorEdward Welbourne2018-07-261-2/+11
| | | | | | | | | This avoids the hazard of both (if on separate threads) trying to init() at the same time, if they were dirty before cloning. Task-number: QTBUG-69361 Change-Id: Iabb06942c074ba073ca58fd0de509d1db15c1093 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Check against copying the husk left by a moveEdward Welbourne2018-07-261-1/+2
| | | | | | | | | | | | | The copy-assign operator tests against other.d being NULL but the copy-constructor didn't. This can only matter if the value being copied has been moved from, so we could probably replace with an assertion in practice, but we should at least be consistent. Amended test to check this case too; and verified new test crashes without this fix. Change-Id: I46872a677775944bbdf6a9112e719873e574ae60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix the fix for mmap() overflow checkThiago Macieira2018-07-251-4/+3
| | | | | | | | | | | | | | | | The code I introduced in 4ee74257940e2ed21b653b986ad02a746e8438a6 only dealt with systems that reasonably used a 64-bit off_t parameter. Turns out that we don't turn on largefile support on 32-bit Android, which meant that the fix caused a regression. [ChangeLog][QtCore][QFile] Fixed a regression that caused QFile::map() to succeed or produce incorrect results when trying to map a file at an offset beyond 4 GB on 32-bit Android systems and on some special Linux configurations. Task-number: QTBUG-69148 Change-Id: I2c133120577fa12a32d444488bac3e341966f8d7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix MSVC builds with /Zc:wchar_t-Timur Pocheptsov2018-07-251-0/+2
| | | | | | | | | | | | 208c71768 introduced a problem for our users, who build on Windows with /Zc:wchar_t-, which makes wchar_t a typedef for the type 'unsigned short', preventing them from switching to more recent versions of Qt. While MSDN recommends against this option, we can add more #if-ery to avoid compiler's bailing out on a constructor's redefinition. Task-number: QTBUG-65101 Change-Id: I62a1d9b2572f3d4b1f70bcbc3e52e795b1944558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix QUrl::setPath documentation, remove default TolerantModeMikhail Svetkin2018-07-241-1/+1
| | | | | | Change-Id: I97f6ce5fdaba3364aab3203974a3a3d4f92c8899 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Let QDir::absoluteFilePath() use isAbsolutePath() for resource pathsEdward Welbourne2018-07-231-36/+60
| | | | | | | | | | | Using QFileSystemEntry::isAbsolute() broke handling of resource paths. Extended QDir::absoluteFilePath() tests to cover absolute resource path and some UNC variants also resolved in the same fix. Amend existing filePath tests to use drives where needed. Task-number: QTBUG-68337 Change-Id: I4f02cf67828ad93e562857118f8442037f18bab7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add since version for QJsonDocument::toJson()Paul Wicking2018-07-231-0/+1
| | | | | | | Task-number: QTBUG-69527 Change-Id: I10df9cc2d6fa2080e07d68b78c6220500f459380 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
* Doc: Correct typo from decoded to encodedPaul Wicking2018-07-211-1/+1
| | | | | | Task-number: QTBUG-62081 Change-Id: Ia07b43445661d66ef0e8fe51d8d022bd5d803327 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Remove erroneous comma in snippetPaul Wicking2018-07-201-1/+1
| | | | | | Task-number: QTBUG-51719 Change-Id: I0621b872642aa8ad14f6af4bf1b9588450dfbb64 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: Add since version for QJson method and enumPaul Wicking2018-07-192-0/+2
| | | | | | | | | QJsonValue::toInt() introduced in 5.2, 7372c6cf9d4 QJsonDocument::JsonFormat introduced in 5.1, 4bb5566632e Task-number: QTBUG-69527 Change-Id: Idb9df959f82fe7061e0afe2109f1ca34a4451a5f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Extend description of ShortcutOverride eventPaul Wicking2018-07-191-0/+6
| | | | | | | | | | Better late than never. Task-number: QTBUG-533 Change-Id: Ieb68d510f75553a6aa0a6e9046c11e3a34b8815f Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Plugins: fix crash if the binary JSON data contains invalid sizeThiago Macieira2018-07-194-11/+33
| | | | | | | | | | | | | | Eight bytes into the Binary JSON header there's a 32-bit little-endian size, which qJsonFromRawLibraryMetaData uses to determine the size of the stored metadata. That value is passed as a size to QByteArray, which means certain values could cause crashes due to being too big or via sign-extension in 64-bit. [ChangeLog][QtCore][QPluginLoader] Fixed an issue that could cause a crash when certain damaged or corrupt plugin files were scanned. Change-Id: I117816bf0f5e469b8d34fffd153dc5425cec39a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>