summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Add "qt_" prefix to asciiToDouble and doubleToAscii functionsThiago Macieira2018-08-034-16/+16
| | | | | | Change-Id: Ie01831ddac5446fdbdeefffd154688839acbe838 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QCborValue diagnostics: Properly escape stringsThiago Macieira2018-08-031-5/+71
| | | | | | | | | I'm intentionally not testing improperly-paired surrogates, since those can't be encoded in CBOR. Change-Id: I0d3cc366baaa49f3ad28fffd154240287ce34c22 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLogging: make QRegularExpression objects static constGiuseppe D'Angelo2018-08-031-3/+3
| | | | | | | To avoid recompiling them multiple times. Change-Id: Ie4766be3bbaa536bf22b0eaacc430055fe4651cd Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Fix non-existing QRandomGenerator::generate32() function in docsAlex Blasche2018-07-311-3/+3
| | | | | | | | The function does not exist. QRandomGenerator::generate() is the equivalent function Change-Id: I5d65f2913fc5a9e60004d206733993254885a5e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge "Merge branch '5.11' into dev" into refs/staging/devEdward Welbourne2018-07-3117-67/+156
|\
| * Merge branch '5.11' into devEdward Welbourne2018-07-3117-67/+156
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp src/plugins/platforms/windows/qwindowstabletsupport.h src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/styles/qstylesheetstyle.cpp tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Done-With: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
| | * 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>
| | * Windows: Don't output a warning when sHGetKnownFolderPath failsAndy Shaw2018-07-181-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the rare case where the known locations for the standard paths are not known (such as when an application is used without a user logged in), it will output a warning to indicate this. In the case of the GenericConfigLocation, this can mean that it will hang due to the fact that QLoggingCategory is looking for that location too before it can output anything. Therefore, the warning output is removed so that if this part fails it doesn't cause it to hang as a result. Change-Id: I4f189361899bd1f868292f30c09fbe50982d2288 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * Linux: Bypass glibc's broken open() implementationThiago Macieira2018-07-172-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glibc 2.21 and earlier have a bug that leaves the mode parameter unset when O_TMPFILE is used. So we bypass the glibc implementation and go directly for the syscall. We do this only for 32-bit x86, since of the current, modern platforms, it's the only one that passes parameters on the stack. Technically speaking, the glibc bug applies to all platforms, but it turns out that on all others, it appears to work. By doing this, we have two minor differences: 1) open() is a cancellation point, but syscall() isn't 2) if anyone tries to intercept open() calls via LD_PRELOAD, they're not going to catch Qt's. [ChangeLog][QtCore][QTemporaryFile] Worked around a bug in the GNU C Library versions 2.21 and earlier (used on Linux) that caused temporary files to be created with permissions 000. Task-number: QTBUG-69436 Change-Id: I20fd00e600264ff98c6afffd1540dceea89fa91f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix qtbase build for MSVC 2017 15.8Thomas Miller2018-07-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fixed breaks caused by MSVC 2017 15.8 introducing the __cpp_enumerator_attributes define. Change-Id: I78144f8f49a7352e574dee379155bd47d8d6d896 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QCborValue: move the toDiagnosticNotation() function to its own fileThiago Macieira2018-07-305-225/+336
|/ / | | | | | | | | | | | | | | | | | | If we ever need to add QCborValue to the bootstrap library, it's unlikely that we'll need this part. And by splitting it, I can make the code handle more cases, that hadn't been properly handled before. Change-Id: I2f630efbbce54f14bfa9fffd154160c0ad893695 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | canonicalFilePath: treat ENOTDIR as a case of file not existingEdward Welbourne2018-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | There is no such file, if one of the "directory" components of its path is not, in fact, a directory. Added a test for non-existent file (specified to give empty canonical file path) as well as a test for a file in a sub-directory of a known file. The former incidentally tests for QTBUG-29402, fixed long ago. Change-Id: I60b80acc0f99f0a88cdb1c4d191af7384f3a31c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFSFileEngine::filename(): convert if/else-if chain to a switchEdward Welbourne2018-07-301-13/+16
| | | | | | | | | | | | | | | | | | Makes clear that this is what it is; and ensures we'll get compiler warnings if someone adds a new entry to the FileName enum without code to handle it here. Change-Id: I36e383066728cefcc75e0a760e36222cebd1dff0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Actually truncate when asked toEdward Welbourne2018-07-302-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Unix, we wouldn't even *try* to truncate if the file was open for appending. The combination may be an eccentric choice but - at least when it's combined with reading - I can imagine use-cases for it; and we should (at least try to) deliver what we're asked for, even if we can't think why anyone would want it. So actually enable truncation when asked to. Amended some tests to check this works and corrected the QIODevice documentation of mode flags (which misdescribed the special case that implies Truncate). Removed special-case code, to apply truncate when writing but not reading, since it's been made redundant by the pre-processing of mode done in QFSFileEngine::processOpenModeFlags(). [ChangeLog][QtCore][QFile] When opening a file, if Truncate is asked for, or implied by other flags, it shall be attempted, regardless of what other options are selected. We previously did this on Windows; now we do so also on Unix (even when appending). Task-number: QTBUG-13470 Change-Id: I1e08d02cfbae102725fccbbc3aab5c7bf8830687 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QLocale: cache the QLocalePrivate for QLocale::system()Thiago Macieira2018-07-301-1/+6
| | | | | | | | | | | | | | Change-Id: I6d0bf78d02d166307f864f1f83a3b600ef6a9b0b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QCborValue: Disable support for spaceship operatorThiago Macieira2018-07-293-5/+5
| | | | | | | | | | | | | | | | | | __has_include(<compare>) is not the correct way to detect this feature, since that's a library header and may be provided by an implementation (libc++) before the compiler supports the syntax. Change-Id: I80aae0d068974d83b6c0fffd1544c8e558e2446b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Logging: Accept .ini files written by QSettingsKai Koehne2018-07-282-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For keys, QSettings escapes all characters outside of [-a-zA-Z0-9_.] by using percent encoding, and changes '/' to '\'. That is, settings.setValue("qt.*", true) will be written to an .ini file as qt.%2A=true This means that QSettings can not be used to write general-purpose qtlogging.ini files. Fix this by applying the reverse transformation method from QSettings when reading in the .ini file. [ChangeLog][Logging] Qt will now accept qtlogging.ini files written by QSettings. Task-number: QTBUG-69548 Change-Id: I55b7a8b433291268dc6855901f72b1c04f8ee6d3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: Support IPv6 addresses with zone idRobbert Proost2018-07-271-23/+38
| | | | | | | | | | | | Task-number: QTBUG-25550 Change-Id: I37ec02b655abe2779aa11945e20550ce00e43723 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Improve output of Q_ENUMAllan Sandfeld Jensen2018-07-261-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have the named keys and not just integer values, we can output something unambiously that closer match how the enums should be used. Output of enums without proper metadata is left unchanged Before: QSurfaceFormat::ColorSpace(DefaultColorSpace) QPainter::CompositionMode(3) After: QSurfaceFormat::DefaultColorSpace QPainter::CompositionMode(3) Change-Id: I537e879ba8b5c555b2aae9ba831facc88d430443 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | corelib/tools: add qMakeArray() APIMikhail Svetkin2018-07-252-0/+180
| | | | | | | | | | | | | | | | | | | | This function can be used to create std::array without the need to explicitly provide the size of array. It also has a specialization that allow to generate sorted array at compile time. Sorted array can be beneficial for example in binary search. Change-Id: Ifc7e06e451812fce2ab94293959db5e9cc038793 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | formatQEnum: deal with enum class typesShawn Rutledge2018-07-241-1/+1
| | | | | | | | | | | | | | | | | | The enum class doesn't get treated as an int automatically, the way that a plain enum does; so there's a silly compile error which this cast fixes. Change-Id: I21b56337e4f724e4de1819e22bc93e9af23c51ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QHash: Remove reference to Qt3's QDict implementationhjk2018-07-241-3/+2
| | | | | | | | | | | | | | | | | | | | While it is still formally correct, it does not add much value anymore. Change-Id: I32431e3e73f3ca662dc4beb754f53449692c56a9 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | prune dead codeOswald Buddenhagen2018-07-231-1/+0
| | | | | | | | | | | | | | msvc2013 is not supported any more. Change-Id: Idca32f77e1b97a219d8bb4571cfd41e7334ac84e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce QScopeGuardSérgio Martins2018-07-214-0/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | A RAII style class which calls a function at end of scope. Example usage: auto cleanup = qScopeGuard([] { <my cleanup code> ; }); [ChangeLog][QtCore] Introduced QScopeGuard. Task-number: QTBUG-62894 Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove a deprecation warning coming from QRegularExpressionGiuseppe D'Angelo2018-07-211-2/+1
| | | | | | | | | | | | | | The flag is deprecated. Change-Id: Idfd7c31278032ee96b27f3f447a97ecfdd8051af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add QTextStream operators for QStringViewFriedemann Kleint2018-07-202-0/+16
| | | | | | | | | | Change-Id: I72d597fa21521a04b7f7c0e41bd45ee9dabb6222 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update the Qt version tagging to adapt to expected Qt 5.16Thiago Macieira2018-07-181-1/+10
| | | | | | | | | | | | Change-Id: I61ecce6b1324410bbab4fffd153d5d362d4429bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update TinyCBOR to 1b233087a6e6b6be297e69bfcce5ed36f338c91dThiago Macieira2018-07-181-22/+5
| | | | | | | | | | | | | | | | From the fork at https://github.com/thiagomacieira/tinycbor Change-Id: I117816bf0f5e469b8d34fffd153dc88683051208 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | qlibrary_unix: work around compile bug in gcc5.4Mikhail Svetkin2018-07-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC5.4 generates incorrect code. The QString object which is passed by value to f-lambda, has been corrupted by the time this lambda returns. Accessing this object causes memory corruption. The same can be reproduced with std::list and std::string Task-number: QTBUG-69394 Change-Id: I22522d2ddd1d5226de0aff378133d18391e370de Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Thiago Macieira2018-07-1713-56/+52
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-1713-56/+52
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| | * ELF parser: fix off-by-one errorThiago Macieira2018-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know why Arvid subtracted 1 when he wrote this code. But it was wrong. Fortunately, the section size was not used afterwards, but the next commit will. Change-Id: I117816bf0f5e469b8d34fffd153dc8383b00b94a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * QPluginLoader: limit the amount of memory used when scanning pluginsThiago Macieira2018-07-145-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using actual memory allocation, limit to 64 MB, not the full file size. On most systems, the memory map technique will work, so this won't even be tried. In any case, we don't need the fix for the OOM situation that was applied in commit e211ab76d766878b4dbe88901b9a7a4a70ce7332. As for the memory mapping technique, this commit limits the allocation to reasonable values given the virtual memory addressing space. Half a gigabyte is probably acceptable on 32-bit systems, where there should be a contiguous space for the OS to allocate the file in. This commit also fixes an overflow when converting from qint64 of the file size to ulong (32-bit on 32-bit platforms and on Windows). For 64-bit systems, we currently limit to 1 TB. Change-Id: I117816bf0f5e469b8d34fffd153dc1705a8eedc4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Doc: Remove reference to Unicode 4.0Kai Koehne2018-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's unclear when the reference to Unicode 4.0 standard got added - it certainly predates the qt 4 git repository. Anyhow, nowadays we're using later versions, and it doesn't make much sense to highlight one specific version here. Instead, use the correct technical term - UTF-16 code unit. Also I added a 'correspond _to_', which sounds more common to me. Task-number: QTBUG-56699 Change-Id: I4bdcd9060cb2b11521638019c15ef7ab67aa768b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Correct Unix QStorageInfo's QStorageIterator::next()'s loop logicEdward Welbourne2018-07-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop was accepting any line with at least three entries, but the code that then used this line needed four entries. At the same time, the loop's check had to be repeated, in rearranged form, after the loop, to handle some failing cases. Restructuring the loop, and demanding at least four entries, fixes all of this, although care must be taken about the virtual file-system lying about .atEnd(). [ChangeLog][QtCore][QStorageInfo] Fixed a bug on Android that could cause QStorageInfo to skip some filesystems (if the mount table is a virtual file and contains any short lines) or crash (if the mount table contains any 3-field lines). Change-Id: I1c2674372d0d0b7d16937de4345a910bc7d6e0ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Johannes Rosenqvist <xeroc81@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * QFile::copy(): don't trust the old file metadata cacheThiago Macieira2018-07-121-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, let's just use sendfile(2) in a loop until it returns 0, which indicates EOF. [ChangeLog][QtCore][QFile] Fixed a regression in QFile::copy() that caused the original file not to be copied entirely if it was modified outside of this QFile object between the last time we checked its size and the copy() call. Note this is not a prevention against race conditions. Task-number: QTBUG-69417 Change-Id: Id59bdd8f1a804b809e22fffd15406c8aa31f4a1e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Add missing init()-if-dirty in two of ICU's QCollator::compare()sEdward Welbourne2018-07-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both delegate to the one that did do the if dirty: init() check, but only after they've tested whether d->collator is set, which it might not be when dirty. Change-Id: I77533d6d32c4a8c9b42797c77003e50f5820775a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix QStorageIterator where the last line in /proc/mounts is skippedJohannes Rosenqvist2018-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android systems QStorageIterator uses /proc/mounts to parse mounted volumes. For every call to QStorageIterator::next() a check was done to see if we had reached EOF with atEnd(), but didn't take account of the last call to file.readLine(), which might contain a valid entry. [ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused the last entry in the mtab file to be ignored on Android. Task-number: QTBUG-60215 Change-Id: I064452002922c72ffa1c8954fec5f28738c42bae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Doc: Extend description of Qt::Key_ClearPaul Wicking2018-07-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add information about to which physical key this virtual key code is commonly mapped. Task-number: QTBUG-68497 Change-Id: I467516ad0c731efb48b62fe64d723acd7c38f2b1 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>