summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-0116-76/+56
|\ | | | | | | Change-Id: Ic8cdb1c2b7c0a786b1313b6c3a3bf7e9ec288712
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-3015-70/+40
| |\ | | | | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8
| | * 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>
| | * 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>
| * | Windows: Fix QDir::drives() to no longer list ejected mediaFriedemann Kleint2018-09-291-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check using GetVolumeInformation() (modeled after QStorageInfo::ready) within a SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX scope. Remove old #ifdef used for Windows CE. [ChangeLog][QtCore][QDir] On Windows, QDir::drives() no longer returns drives whose media were ejected. Fixes: QTBUG-69029 Change-Id: I2d4a32e9281ccf3c0f2ebfa427122609aa4f327f Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Fix a few overrides in Qt CoreAlessandro Portale2018-09-255-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change removes redundant 'virtual' from function declarations. Clang Tidy's modernize-use-override check reports: warning: 'virtual' is redundant since the function is already declared 'override' CppCoreGuidelines say: C.128: Virtual functions should specify exactly one of virtual, override, or final Change-Id: I9a4bdd6cc041d46ae64b25597ba4f7268ac4c2b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* | | doc: Fix several miscellaneous qdoc warningsMartin Smith2018-09-241-3/+3
|/ / | | | | | | | | | | | | | | | | This update fixes several qdoc warnings for things like incorrect links to section titles, missing enum \value commands, and incorrect \fn signatures. Change-Id: I35ae18810d386a78ffa87d674489c7ad8c5fa215 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Windows code: Fix to prefer ranged-for, as clang-tidy advisesFriedemann Kleint2018-09-021-8/+6
| | | | | | | | | | | | | | Change-Id: Id9bb21855ae832cdbbc456326226ec72b634672e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about else after jumpsFriedemann Kleint2018-09-026-73/+76
| | | | | | | | | | | | | | | | | | Replace by switch() where appropriate, remove else and unindent code or simplify the return value. Change-Id: Ie988b9068a9579ae5a899b3765e43aad480b564e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about (private) class definitionsFriedemann Kleint2018-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | Add override, disable copies where appropriate and use = default for trivial functions. Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove codepaths and checks for unsupported Apple platformsTor Arne Vestbø2018-08-311-19/+13
| | | | | | | | | | | | | | We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3. Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | WebAssembly for QtBaseMorten Johan Sørvig2018-08-302-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-302-20/+24
| | | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-08-221-16/+0
|\| | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qtextengine.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
| * 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>
* | Implement exact match expression builder for QRegularExpressionSamuel Gaist2018-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegularExpression doesn't offer a direct equivalent of QRegExp's exact match. There are several places in the Qt sources that use this feature. This patch implements a small helper function that builds the expression as recommended in the documentation and updates the related code. [ChangeLog][Core][Tools] QRegularExpression now provides anchoredPattern() which is a helper function to build regular expressions used for exact matching. Change-Id: Idbbf142c4c5cb9b62abf8229f4ce85fd4409e5d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Migrate QDir to use QRegularExpressionSamuel Gaist2018-08-192-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The match method still uses QRegExp. This patch updates the code to use QRegularExpression and translates the wildcard patterns to a suitable form for QRegularExpression. [ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for wildcard matching. Note that QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for wildcard expressions. Nevertheless, the tests for QDir return the same results as before. Change-Id: I095959443ac7362f7534e35454eff038061fca82 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-172-7/+12
|\| | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * 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>
* | Modernize the "thread" featureUlf Hermann2018-08-173-6/+4
| | | | | | | | | | | | | | | | | | | | Add it to configure.json and replace all occurrences of QT_NO_THREAD with QT_CONFIG(thread). Add conditions for other features that depend on thread support. Remove conditions where we can use the QMutex and QThreadStorage stubs. Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-08-161-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/plugins/platforms/xcb/qxcbbackingstore.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I4af138ffb2f5306373244523768209e8873b2798
| * Fix qmake build with glibc 2.28Thiago Macieira2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | drop usages of Q_COMPILER_CLASS_ENUMGatis Paeglis2018-08-141-9/+2
| | | | | | | | | | | | | | It is not relevant anymore. C++11 is a hard requirement for a while already. Change-Id: Idb8fbdcd13398cc85fba583f40c2b5c4dc7c4943 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add debug output for single enum flagsAllan Sandfeld Jensen2018-08-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | They have a separate type that we can't recognize directly, but we can check if we can recognize the QFlags<T> form, though we have to add a lot of template-conditions to avoid triggering QFlags static asserts. Change-Id: I00853682c5376dd3cc411ff151f47bce2389e277 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Fix QMetaObject naming of class enum flagAllan Sandfeld Jensen2018-08-111-2/+2
| | | | | | | | | | | | | | | | | | Adds an enumName to QMetaEnum to carry the name of the enum since for flags that doesn't match the name of the Qt type, but is needed if the flag is scoped. Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-073-12/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm 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 tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| * 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>
| * 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>
* | Simplify QUrlPrivate::appendHostJesus Fernandez2018-08-061-7/+3
| | | | | | | | | | | | | | | | Coverity-Id: 191128 Change-Id: I70f2d8b2e0063783851c1520862c2845c8908321 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Robbert Proost <robbert.proost@outlook.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a few overrides in Qt CoreAlessandro Portale2018-08-053-27/+27
| | | | | | | | | | | | | | | | | | Clang-tidy says: warning: annotate this function with 'override' or (rarely) 'final' [modernize-use-override] Change-Id: Ic2304cf35f4132ba1f55714493db93836f8b413d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: Add qustrchr() and use it to speed up the fast URL full decodingThiago Macieira2018-08-031-50/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | The character search in the findChar() static function in qstring.cpp is more efficient than what we had in qurlrecode.cpp and there's no point in duplicating it. It also has a Neon implementation. So make the implementation available for use in QtPrivate::qustrchr(). This also simplifies the implementation. Change-Id: Ib48364abee9f464c96c6fffd152eedd0cd8ad7f8 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge branch '5.11' into devEdward Welbourne2018-07-314-52/+70
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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 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>
| * 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>
* | 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>
* | Logging: Accept .ini files written by QSettingsKai Koehne2018-07-281-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-173-18/+13
|\| | | | | | | | | | | | | | | | | | | | | 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
| * 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>
| * 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>
| * Ownership is unclear, so document it to avoid crashes for usersSune Vuorela2018-07-021-0/+4
| | | | | | | | | | | | Change-Id: I708b04fcdf4f118526317f3aea2401f5dafd2e87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Make sure there's an event dispatcher in QWindowsRemovableDriveListenerThiago Macieira2018-07-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to add the listener, we need to hook into the internal HWND. Creating the QThreadData (thus adopting the thread) and the event dispatcher are ok because they would happen anyway. QFileSystemWatcher works only with the Qt event loop. [ChangeLog][QtCore][QFileSystemWatcher] Fixed a bug that caused addPaths() to crash on Windows if adding a path to be watched on removeable storage, if that addPaths() was called on a thread not created by QThread and no QEventLoop has been created yet. Task-number: QTBUG-69320 Change-Id: If48c5c2e920c433298f1fffd153ee20bea56c62f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Add qbswap for a memory regionThiago Macieira2018-07-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | The compiler was generating some vectorized code for qresource.cpp but it wasn't very efficient. So improve upon it and make use in other places where we read UTF-16BE strings. [ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian that operates on a memory region. Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>