summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QFSFileEngine: update d->fileEntry after a successful renameAhmad Samir2024-04-201-3/+18
| | | | | | | | | | | | | | | | | | | | | | | Otherwise member methods such as size() could return incorrect info. Add setFileEntry(QFileSystemEntry &&); to reuse a QFileSystemEntry if we have already constructed one. As a result of this, a QTemporaryFileEngine::setFileName() call has become redundant and can be removed; the code it executed is already taken care of: - QFSFileEngine::close(): already called by QTFEngine::rename() a couple of lines above - QFSFileEngine::setFileName(): QTFEngine::rename() calls QFSFileEngine::rename() which in turn updates the `fileEntry` This commit is covered by tst_QTemporaryFile::rename(), i.e. if QFSFileEngine::rename() didn't update the fileEntry, that test would fail. Change-Id: I312f35cf7fdf9b1a8cd0bce5e98ba7a48cf9426e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFSFileEngine: de-duplicate some codeAhmad Samir2024-04-191-17/+5
| | | | | | | | | | | The only difference is the name of the QFileSystemEngine method each one calls. This makes subsequent commits simpler, since now only one function will need to be changed. Change-Id: I1b7d2ceeab0ad98e2ee87b3a64f100ab906f7df5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: remove member FileTime and use QFile::FileTimeAhmad Samir2024-03-211-3/+3
| | | | | | | | | This is probably a remnant from when QAbstractFileEngine was public API since it's been changed to private API, just use QFile::FileTime. Pick-to: 6.7 Change-Id: I60d3d4ff811f95434b81d5ca115f5d43cfff8b15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: add a path parameter to beginEntryList()Ahmad Samir2024-03-171-2/+3
| | | | | | | | | | | | | Change beginEntryList() to take a path parameter, which it passes on to the QAFEIterator constructor; setting the path at construction makes more sense, because typically the path isn't supposed to change during iteration, and this simplifies the code at the call site. Remove setPath(), the last usage in Qt repos was in QtCreator, and that has been ported away from it. Change-Id: I01baa688e0f9b582aacb63d7d98a794276e58034 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: make {begin,end}EntryList() return a unique_ptrAhmad Samir2024-03-171-2/+3
| | | | | | | | Makes ownership clearer. Change-Id: Ibb57ca900ef30b16d48964a977e997ba6705248b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QAbstractFileEngine: remove redundant endEntryList() overridesAhmad Samir2024-03-031-7/+0
| | | | | | | | QAFE sub-classes endEntryList() overrides returned nullptr, which is exactly what the base class implementation does. Change-Id: I2e901647cd087c3b8ba674db6e7b371e620af340 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port to QDirListingAhmad Samir2024-03-031-1/+0
| | | | | | | | | | | Use QDirListing in the Bootstrap build instead of QDirIterator. Drive-by changes: - more const variables - use emplace_back() instead of append() where appropriate Change-Id: Ie1f0d03856e557c4bfabfff38a87edc7da86d091 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFSFileEngine: minor code clarificationAhmad Samir2023-10-211-1/+2
| | | | | | Change-Id: I44f30f827cdb8e841a43ac911327286db051a725 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSystemError: pass errno when calling stdString()Ahmad Samir2023-10-211-11/+12
| | | | | | | | | | | | | | | | | | errno should be queried immediately after a libc function call fails, calling it later on in QSystemError::stdString() may be too late. Part of the goal of this, and similar, changes is removing the default value of the stdString() method's parameter, to signify to users of that method that errno should be stored ASAP if there is an error. If there is any intervening code that may call a system/libc function store errno in a local int var, otherwise use it directly in the QSystemError::stdString() call, which takes by value. Task-number: QTBUG-115199 Change-Id: If3f601a023ed0014e260089771220668dad88be8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QFSFileEngine: fix logicAhmad Samir2023-09-101-4/+2
| | | | | | | | | | Inside the do-while loop the if body is executed if `eof` is true, which means the continue statement is redundant because the while loop condition contains `!eof`, so the do-while body doesn't get executed again after that. Change-Id: If0685eb482f29b88e9c8660886392483a3bd75ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definitionEdward Welbourne2023-03-201-1/+1
| | | | | | | | | | I got tired of being told off by the inanity 'bot for faithfully reflecting existing #if-ery in new #if-ery. Retain only the documentation and definition of the deprecated define. Change-Id: I47f47b76bd239a360f27ae5afe593dfad8746538 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QFSFileEngine: fix overflow bug when using lseek64Ahmad Samir2023-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | QT_LSEEK (lseek64()) returns QT_OFF_T, which is off64_t on 32bit systems. The return from the lseek64() call was being assigned to an int, which meant that if the returned value is > INT_MAX it will overflow and the value becomes -1, and since errno would be EOVERFLOW the code would fail to open the file. Fix the issue by assigning the return value to QT_OFF_T. Thanks to Giuseppe for pointing out the issue in the code review. Found by compiling with -Wshorten-64-to-32. [ChangeLog][QtCore][QFile] Fixed a bug where opening a file in append mode may fail if the file size was bigger than INT_MAX. Pick-to: 6.5 6.4 6.2 5.15 Change-Id: Iad33e3192f37466643a1218d38e5ecc2baaa7dc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicableSona Kurazyan2022-03-251-4/+6
| | | | | | | | | | | As a drive-by, did also minor refactorings/improvements. Task-number: QTBUG-98434 Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* QAbstractFileEngine: Add permission argument to open()Ievgenii Meshcheriakov2021-12-041-2/+3
| | | | | | | | | The new argument allows atomic creation of files with non-default permissions. Task-number: QTBUG-79750 Change-Id: I4c49455b41f924ba87148302c8d0f77f5de0832b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDir: Add support for setting directory permissions to mkdir()Ievgenii Meshcheriakov2021-11-261-2/+4
| | | | | | | | | | | | | | This patch adds an overload of the QDir::mkdir() method that accepts permissions. This allows setting of the directory permissions at the time of its creation. [ChangeLog][QtCore][QDir] Added QDir::mdkir() overload that accepts permissions argument. Task-number: QTBUG-79750 Change-Id: Ic9db723b94ff0d2da6e0b819ac2e5d1f9a4e2049 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QFSFileEngine: code tidiesGiuseppe D'Angelo2021-05-171-2/+2
| | | | | | | Turn a couple of implicit conversions into calls to QFlags::testAnyFlag. Change-Id: I21a0b4c1644986a98a2d0d54ae4b95f9fdc92841 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Implement QFileSystemEngine::createLink() on MS-WinKarsten Heimrich2021-05-121-1/+4
| | | | | | | | | Fixes: QTBUG-74271 Change-Id: I9e414dd16546f65e85b5a1a6c70c40dfa4284a6f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-1/+1
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Unify QFSFileEngine implementations on Windows and UnixVolker Hilsheimer2019-10-311-28/+88
| | | | | | | | | | | | | | | | | The functions for standard file system operations simply delegate to the static functions in QFileSystemEngine, which are then implemented separately for each platform. There is no need for the wrappers in QFSFileEngine to be separately implemented as well. The only noticeable difference between Unix and Windows versions was the clearing of the meta data in QFSFileEngine::remove, which was only done on Unix. This is now also done on Windows. As a fly-by fix, correct the (internal only) documentation about case sensitivity. Change-Id: I274b34d5407fdfff2e0a2157bb5220607740a92a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-301-16/+29
|\ | | | | | | | | | | | | Conflicts: qmake/generators/win32/mingw_make.cpp Change-Id: I2f790bc8572bd22fea01edf7ca74595b29f063eb
| * Move processOpenModeFlags out of QFSFileEngineOliver Wolff2019-07-291-16/+29
| | | | | | | | | | | | | | | | | | | | The same logic is needed for QWinRTFileEngine. To be able to reuse the code, it was moved out of the class. Task-number: QTBUG-77095 Change-Id: If52b2fc8a0f3056d32fc693775565a1c3803b7d4 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Move away from using 0 as a pointer constantAllan Sandfeld Jensen2019-06-071-8/+8
|/ | | | | | | | | Cleans up most of corelib to use nullptr or default enums where appropriate. Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QIODevice::NewOnly and QIODevice::ExistingOnly OpenMode flagsd3fault2018-01-171-21/+35
| | | | | | | | | | | | | | | | When QFile::open is called with the NewOnly flag, the call will fail if the file already exists. As usual, if the file does not exist, it will be created. Like QTemporaryFile, there is a guarantee from the operating system that you are not accidentally creating a new file on top of an older file. When QFile::open is called with the ExistingOnly flag, the call will fail if the file does not exist. The ExistingOnly flag only provides new functionality when used with the WriteOnly flag. For ReadOnly it provides no change in functionality, as ReadOnly by itself already never creates. Task-number: QTBUG-52244 Change-Id: I8e3206728f245f95172c225bf297023fb078fc6d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* doc: Correct remaining qdoc warnings in qfsfileengine.cppMartin Smith2018-01-041-4/+0
| | | | | | | Removed a dupicate qdoc comment. Change-Id: I43214c63bda3dd3ff398b173472306955f8a72b7 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Fix qdoc errors in qfsfilengine.cppMartin Smith2017-12-051-4/+8
| | | | | | | | | | A few parameter types in \fn commands were not qualified with their class name. They had to be qualified because they were in a base class of the class being documented. Change-Id: Ic0b43be689d17a0a539ee977c0db6e20eb05d5fe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix some qdoc warningsFriedemann Kleint2017-08-021-4/+0
| | | | | | | | | | qtbase/src/corelib/io/qfsfileengine.cpp:926: warning: Overrides a previous doc qtbase/src/corelib/io/qfsfileengine.cpp:527: warning: (The previous doc is here) qtbase/src/corelib/tools/qbytearray.cpp:689: warning: Cannot tie this documentation to anything Change-Id: Ie7009f565a11a01859ccd0488ddeebe1b953305d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-191-11/+11
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/io/qwindowspipewriter.cpp src/widgets/styles/qcommonstyle.cpp Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
| * Convert improper uses of qt_error_string() to QSystemError::stdString()Thiago Macieira2017-07-181-11/+11
| | | | | | | | | | | | | | | | | | On Windows, qt_error_string() returns the string corresponding to the Win32 API, not an errno. Replace those uses for a function that works for errno values. Change-Id: I1eba2b016de74620bfc8fffd14ccce6162bafdca Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFSFileEngine: handle refreshing of file times betterThiago Macieira2017-07-061-0/+20
| | | | | | | | | | | | | | | | Clear the known times when we write to it and always refresh for the Access time. Change-Id: I8d96dea9955d4c749b99fffd14cd6c03b4253197 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QFileDevice/QFileInfo: Add fileTime() and setFileTime()Nikita Krupenko2017-04-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QFileDevice] Added fileTime() and setFileTime(). [ChangeLog][QtCore][QFileInfo] Added fileTime(). Task-number: QTBUG-984 Change-Id: I84dfb05b9454a54e26b57b78edee5773dc4c5c3c Initial-patch-by: Raphael Gozzo <raphael.rg91@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Simplify QFSFileEngine code: QFile does not require bufferingThiago Macieira2017-03-311-0/+9
| | | | | | | | | | | | | | | | | | | | We still support buffering via stdio.h (FILE*), but QFSFileEngine itself is not responsible for the buffering. Opening by file name (not FILE* and not file descriptor) already added the Unbuffered flag. Change-Id: I2bc52f3c7a574209b213fffd1498d4e3f78fe1bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Speed up QFile::copy on Darwin file systems that support cloningJake Petroules2017-02-271-2/+2
|/ | | | | | | | | Recent Darwin system have a new system call that allows cloning the contents of a file from another one if the underlying file system (for example, APFS) supports it. Change-Id: I90ec53b8abd2b1dc4000070f295e226d0fb4c672 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-08-291-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf53aa21bf0f8fbd13c0ce2d33ddf7bc63d0d76a and 3aaa5d6b32130d3eeac872a59a5a44bfb20dfd4a were reverted because of reconstruction in 5.7. defineTest(qtConfTest_checkCompiler) in configure.pri is smart enough to cover the case in a9474d1260a8c8cc9eae14f2984098919d9684e5. DirectWrite: Fix advances being scaled to 0 Since 131eee5cd, the stretch of a font can be 0, meaning "whatever the font provides". In combination with ec7fee96, this would cause advances in the DirectWrite engine to be scaled to 0, causing the QRawFont test to fail. Conflicts: configure mkspecs/features/uikit/device_destinations.sh mkspecs/features/uikit/xcodebuild.mk src/corelib/global/qglobal.cpp src/corelib/global/qnamespace.qdoc src/plugins/platforms/cocoa/qcocoamenuitem.h src/plugins/platforms/windows/qwindowsservices.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp src/widgets/kernel/qapplication.cpp tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
| * Doc: Remove references to Windows CE in Qt CoreVenugopal Shivashankar2016-08-231-3/+2
| | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I98b90d574d9a76c4281852d93818620b5f489117 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | QtBase: use printf-style qWarning/qDebug where possible (II)Marc Mutz2016-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this second part, replace qWarning() << "" << non-QString with qWarning("..%.", non-QString). QString (and QUrl etc) have special escaping handling when streamed into QDebug, so leave those alone. They also seem to expand to less code than the qPrintable() alternative, so there's no reason to replace them. Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui, Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds. Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-6/+0
|/ | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/devLiang Qi2016-01-261-21/+25
|\
| * Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-21/+25
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| | * Fix UB in QFSFileEnginePrivate::writeFdFh()Marc Mutz2016-01-111-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, it is considered valid to call the function with 'data' set to nullptr, and 'len' to zero. But doing so invokes undefined behavior because nullptr is passed to fwrite(). Fix by protecting the loops with 'if (len)'. Found by UBSan: qtbase/src/corelib/io/qfsfileengine.cpp:732:84: runtime error: null pointer passed as argument 1, which is declared to never be null Change-Id: Idfe23875c868ebb21d2164550de3304d2f01e9df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
|/ / | | | | | | | | | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* / Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtCore: Fix const correctness in old style castsThiago Macieira2015-07-201-2/+2
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c8d4b2920a11fb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-2/+2
|\ | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| * Doc: Fix using Apple-related terminology in Qt CoreAlexander Volkov2015-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | Use the name "OS X" instead of "Mac OS X", "Mac OS" and "OSX", and mention iOS. Replace "Carbon Preferences API" by "CFPreferences API" in the QSettings documentation. Change-Id: Ia7f9fb874276c7c445a1649df521b96ff43daa0c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
|/ | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Attempt to make QFile I/O 64-bit safeThiago Macieira2014-10-311-12/+29
| | | | | | | | | | | | | | | | | | | | | Use qint64 wherever possible. The linear buffer is never requested to allocate that much memory (always limited), but at least we ensure we're not dropping bits where we shouldn't. Windows's POSIX compatibility layer is never largefile enabled, so it is always necessary to chunk large reads and writes. On Unix, this will be rare, unless someone passed -no-largefile to configure, for some weird reason. Unfortunately, this is not testable, unless we can allocate a buffer with 4 GB or more in size. The test for this would be to open a file we know to be small, then try to read 4 GB + 1 byte. If everything works correctly, we'll read the full file; if there was a truncation, we'd read one byte. Change-Id: If3ee511bf1de17e0123c85bbcaa463b9972746ce Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-17/+10
|\ | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| * Refactor some loops over EINTRGiuseppe D'Angelo2014-09-221-5/+2
| | | | | | | | | | | | | | | | | | QT_CLOSE is #defined to be qt_safe_close which already performs the EINTR loop. So there's no need of doing other loops (either by hand or by the EINTR_LOOP macro). Change-Id: Icca256124def5ab5d79c2ba101c6f889c85d19da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>