summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak the build and add support for Qt 5.12 tooThiago Macieira2017-09-041-0/+10
| | | | | | | | Unlike qdatastream.h, we can be ready for future versions. Current plans say we should do Qt 5.12 and then begin working on 6.0. Change-Id: I38341f8155354cc4a776fffd14e13c2f1362b483 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Bump versionFrederik Gladhorn2017-09-042-2/+4
| | | | Change-Id: I355b940f568273cf00d55c7c3abc569537be7950
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-3117-81/+132
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro qmake/library/qmakebuiltins.cpp src/corelib/global/qglobal.cpp Re-apply b525ec2 to qrandom.cpp(code movement in 030782e) src/corelib/global/qnamespace.qdoc src/corelib/global/qrandom.cpp src/gui/kernel/qwindow.cpp Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08) src/network/ssl/qsslkey_openssl.cpp src/plugins/platforms/android/androidjniinput.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/widgets/widgets/qmenu.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
| * Fix error attribute(target("+crc")) is unknownPeter Seiderer2017-08-292-0/+5
| | | | | | | | | | | | Task-number: QTBUG-61975 Change-Id: I0b1b55c0737dad485b5ace8e6eb7cb842589453d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * QFileInfo: Clarify documentation on symlinksFriedemann Kleint2017-08-291-7/+11
| | | | | | | | | | | | | | | | Explain symbolic links vs shortcuts. Change-Id: I12176616be72c97607ee1f441d1ea05af5e9e549 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Doc: Fix exampleRobert Loehning2017-08-281-2/+2
| | | | | | | | | | Change-Id: Ic678b69c6c9820701c4cc10c7797f599e5d71b7a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| * Remove QMAKE_LIBS_CORE variableJoerg Bornemann2017-08-281-3/+7
| | | | | | | | | | | | | | | | Define the lib dependencies for corelib in corelib.pro, where they belong. Change-Id: I973d3b0c571782d869b27dea243e899db4dddc43 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix resolution of relative symlinks from relative path on unixOrgad Shaneh2017-08-271-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following: /root/target - a file /root/path/link -> ../target /root/path/other/exe - executable Running from /root/path/other. exe is: #include <QDebug> #include <QFileInfo> int main() { qDebug() << QFileInfo("../link").symLinkTarget() return 0; } The link references /root/target, but the current output is /root/path/target. The link doesn't depend on the PWD. It depends on its own directory. Change-Id: I61e95018154a75e0e0d795ee801068e18870a5df Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QFileInfo: Fix typo in docOrgad Shaneh2017-08-261-1/+1
| | | | | | | | | | | | Change-Id: Id1051f08a870461b172b646c126eb44e8addc114 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| * Fix QCFType::constructFromGet() crash when passed a nullptrTor Arne Vestbø2017-08-241-1/+2
| | | | | | | | | | | | Change-Id: I83cbbb47af8580fa67cbc75fee07bc1e123895eb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * QOperatingSystemVersion: add Android Oreo (v8.0, API level 26)Jake Petroules2017-08-223-1/+13
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Binary Compatibility Note] The variable QOperatingSystemVersion::AndroidOreo was added in this release. Code that uses this variable will not run under Qt 5.9.1. If backwards compatibility is desired, use instead QOperatingSystemVersion(QOperatingSystemVersion::Android, 8) Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Clean up Qt::ApplicationAttribute docsTopi Reinio2017-08-211-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move deprecated and obsoleted enum values to the end, as there already was a category for them. Fix linking to 'Q(Gui)Application'. Update the usage of the name macOS. To make the table more readable in online style, add zero-width spaces to long strings, allowing browsers to word-break them, thus avoiding text overflow/horizontal scroll bar. Task-number: QTWEBSITE-783 Change-Id: I0a96156d24cba4a0405c4edd8d3829def30c69bf Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * Fix compilation on 64-bit CPUs when QPROCESS_DEBUG is enabledDavid Faure2017-08-201-4/+6
| | | | | | | | | | | | | | Change-Id: Iad4bea50805b59bd6e985f5830315a7437880b99 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QProcess/Unix: fix possible race condition inside waitForXXX() loopsAlex Trotsenko2017-08-181-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling QCoreApplication::processEvents() from a slot connected to the readyRead() signal might cause desynchronization in the waitForXXX() loop, if the process has been finished during the event processing. This results in unnecessary timeouts and causes waitForFinished() to fail unexpectedly. So, a proposed solution is to check the state on each iteration of the loop, as Windows implementation does. Given issue is tested by tst_QProcess::processEventsInAReadyReadSlot() which was unstable in CI. Task-number: QTBUG-62584 Change-Id: I7438cf67b0163bbf49314008a9dc660c0977fb7b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Dissable internal hack when using libc++BogDan Vatra2017-08-181-1/+1
| | | | | | | | | | | | | | libc++ has proper wstring support Change-Id: Ifae98676974bfd660b7f849d4466efc5486d3fca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Fix compile with unified headersBogDan Vatra2017-08-174-40/+48
| | | | | | | | | | | | | | | | Unified headers now defines _POSIX_THREAD_SAFE_FUNCTIONS but not all libc functions are available in all Android API versions. Change-Id: I01c94f0b89e7f8aa8575e7bbda28d9fe41a68ff1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Android: Fix warning for __fp16BogDan Vatra2017-08-171-1/+1
| | | | | | | | | | Change-Id: I65cd64dfc0ed357555e8b5276109303377a67e0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Simplify QDataStream::skipRawData()Alex Trotsenko2017-08-311-25/+6
| | | | | | | | | | | | | | ... by using the new QIODevice::skip() function. Change-Id: I943c4feb896d677f3150da542950595d7f485e75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | New AA_DisableWindowContextHelpButton to globally hide ? buttonKai Koehne2017-08-292-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dialogs and Sheets by default have the WindowsContextHelpButtonHint set, which adds a question mark button to dialogs on Windows. This button then triggers the 'What's this' mode by changing the cursor, and letting the user explore the UI by showing whatsThis tooltips. Anyhow, the paradigm is little used today and a lot of applications do not set any whatsThis properties, leaving the mode pretty non-functional. It's therefore common to explicitly remove the WindowsContextHelpButtonHint from dialogs. However, this has to be done for _every_ dialog. Instead, this patch adds a global application flag to not set the WindowsContextHelpButtonHint by default. This allows developers to already buy into the Qt 6 behavior, where the flag will not be set anymore by default. [ChangeLog][QtWidgets] Added AA_DisableWindowContextHelpButton attribute. Setting this attribute globally prevents the automatic "What's this" button on dialogs on Windows (WindowsContextHelpButtonHint). Change-Id: I497a79575f222c78b2d5d051a6de346b231f72d3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QProcess: add docs that the PID from startDetached() may be recycledThiago Macieira2017-08-291-2/+6
| | | | | | | | | | Change-Id: I209fcd5dbc2b4e5381cffffd14de2742eb1d8cd7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Introduce QIODevice::skip()Alex Trotsenko2017-08-273-0/+126
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QIODevice] Added skip() method to improve performance in read operations. Change-Id: I79068a3e9df108756abe37ba3d431e27e7413621 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QTemporaryFile: Add support for Linux's O_TMPFILEThiago Macieira2017-08-234-15/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That means a file is never created, unless you ask for the name. There's no chance of left-over temporary files being left behind. QSaveFile also benefits from this, since the save file is not present on disk until commit(). Unfortunately, QSaveFile must go through a temporary name because linkat(2) cannot overwrite -- we need rename(2) for that (for now). [ChangeLog][Important Behavior Changes][QTemporaryFile] On Linux, QTemporaryFile will attempt to create unnamed temporary files. If that succeeds, open() will return true but exists() will be false. If you call fileName() or any function that calls it, QTemporaryFile will give the file a name, so most applications will not see a difference. Change-Id: I1eba2b016de74620bfc8fffd14cc843e5b0919d0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Deprecate QDate methods using MonthNameTypeEdward Welbourne2017-08-222-14/+22
| | | | | | | | | | | | | | | | | | These introduce an unwanted locale-dependency; clients should use suitable QLocale methods instead. Task-number: QTBUG-28581 Change-Id: Ie7dfe712c50b9f5da94e4b20af7b231d8963cbc9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QCryptographicHash: re-add support for Keccak hashingGiuseppe D'Angelo2017-08-223-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 88a8feeacb9bdaff9ee06164424e407eb904cd10 fixed QCryptographicHash's implementation of SHA-3 -- before, QCryptographicHash was calculating Keccak, not SHA-3. The change however breaks downstreams that were relying on the "wrong" values calculated by earlier versions of Qt. To restore compatibility with such calculations, add the support for Keccak back, as deprecated and to-be-removed in Qt 6. [ChangeLog][QtCore][QCryptographicHash] In order to preserve compatibility with earlier versions of Qt, QCryptographicHash is now able to calculate Keccak message digests. Task-number: QTBUG-59770 Change-Id: I740684cb3d0774292fa837a06b444c73fb4eed52 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine::cloneFile: expand the Linux cloning processThiago Macieira2017-08-221-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FICLONE only works on (currently) btrfs and xfs, and then only if it's the same mount, so it's of very limited use. There are a couple other techniques we may try that do not involve I/O through user-space, though not immediate: - sendfile(2) can be used on regular files, even across mountpoints - sendfile(2) can be used on block devices too, but we need to get the device's size first - splice(2) can be used on pipes (FIFOs) We only implement the first technique (earlier iterations of this patch implemented all). Change-Id: I81480fdb578d4d43b3fcfffd14d4b47cd70495a3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QFileSystemEngine::cloneFile: add support for fcopyfile(3) on macOSThiago Macieira2017-08-221-1/+16
| | | | | | | | | | | | | | | | For some reason, fcopyfile(3) works on directories, so we need to make we aren't operating in one. Change-Id: I81480fdb578d4d43b3fcfffd14d4f2f485348515 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Move the file-cloning code from QFSFileEngine to QFileSystemEngineThiago Macieira2017-08-223-9/+24
| | | | | | | | | | Change-Id: I02d22222fff64d4dbda4fffd14d1c1bbf48385ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QProcessPrivate::tryReadFromChannel(): remove dead codeAlex Trotsenko2017-08-171-4/+1
| | | | | | | | | | | | | | 'readBytes == 0' condition is checked in the code above. Change-Id: I9448f47939b174fdef9f0cd5413254d41a8b4273 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine: verify that the file name isn't emptyThiago Macieira2017-08-173-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making system calls with empty file names is not a good idea. When you run qmake $srcdir, you see this in strace: stat("", 0x7ffed229e250) = -1 ENOENT (No such file or directory) (twice) I've also inlined the isEmpty() function for better code generation. Some functions take QSystemError and some don't. That needs to be corrected at some point, possibly with something like std::expected. Change-Id: I1eba2b016de74620bfc8fffd14ccbfa162f93631 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-153-14/+39
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
| * Doc: indicate the QSharedMemory::size() that the size may be biggerThiago Macieira2017-08-131-0/+3
| | | | | | | | | | | | Task-number: QTBUG-62468 Change-Id: I6e9274c1e7444ad48c81fffd14da78718828c4a6 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Enable custom shared memory schemes on INTEGRITYTero Alamäki2017-08-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | Replaced dependency to libdl.a with libshm_client.a. Defined symbols 'shm_area_password' and 'shm_area_name' internally. The build for INTEGRITY is static only so libdl.a is not needed. Change-Id: I7e34528835132d79ea582a30cf9ff61cdda198da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Win: Account for when "condition expression is constant" warning occursAndy Shaw2017-08-081-14/+23
| | | | | | | | | | | | | | | | | | | | There is already some case accounting for when this warning appears with warning level 4 and Visual C++ on Windows. However it was not catching all the places it was coming from, so this extends it to cover those places too. Change-Id: I69b21440716361fda1c1ae0be0d9c17ced7f0792 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix QAbstractFileEngine::clone misuseThiago Macieira2017-08-096-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QFile::copy was assuming that the target file was native and therefore it could simply take the file descriptor to clone. While that was not currently a problem, in theory it could be as we do have one writeable file engine besides QFSFileEngine (QWinRTFileEngine). By refactoring to take the parameter as a QAbstractFileEngine, we can ensure that the target file is a native file. Change-Id: Ib7a1737987bf4c4a8c51fffd14d0c048fd509025 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFileSystemEngine/Unix: support UF_HIDDEN on the other BSDsThiago Macieira2017-08-081-1/+3
| | | | | | | | | | | | | | | | | | | | The stat::st_flags and fchflags(2) syscall are marked: HISTORY The chflags() and fchflags functions first appeared in 4.4BSD. Change-Id: I81480fdb578d4d43b3fcfffd14d4fd23bd27e37e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias C. Berner <tcberner@FreeBSD.org>
* | QFileInfo: harmonize QFileInfo() and QFileInfo("")Thiago Macieira2017-08-083-124/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a QFileInfo was constructed with an empty path, which could happen with QFileInfo(QFile()) or via QDir, etc., then it would issue system calls to empty paths and could even produce warnings. This commit makes am empty path name be the same as a default-constructed QFileInfo and corrects the use if 0 for ownerId and groupId to match the documentation. [ChangeLog][Important Behavior Changes] QFileInfo on empty strings now behaves like the default-constructed QFileInfo. Notably, path() will now be the empty string too, instead of ".", which means absoluteFilePath() is no longer the current working directory. Change-Id: I8d96dea9955d4c749b99fffd14ce34968b1d9bbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for statx(2) on LinuxThiago Macieira2017-08-084-17/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This system call, new in Linux 4.11, gives us the file birth time. It's also extensible, representing the fourth generation of stat(2) on Linux (the original sys_stat(), sys_newstat(), sys_stat64() and now sys_statx()), not to be confused with glibc's __xstat function, which wraps a call to stat64. Anyway, the new one is designed to be extensible. Now we get birth times on ext[34] on Linux too: Name: . Path: . (/home/tjmaciei/src/qt) Size: 4096 Type: Directory Attrs: readable writable executable hidden nativepath Mode: drwxr-xr-x Owner: tjmaciei (1000) Group: users (100) Access: 2017-07-02T14:47:49.608 Birth: 2016-05-02T13:20:33.097 Change: 2017-07-01T13:37:08.737 Modified: 2017-07-01T13:37:08.737 It's not supported in any other filesystems I have (Linux sources show xfs has the feature too). Even on ext4, it depends on whether the filesystem was created with 256-byte inodes, which my /boot fs wasn't. Change-Id: I8d96dea9955d4c749b99fffd14cda23ed60d5e72 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix the safety check preventing apps from running on old OSesJake Petroules2017-08-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where iOS, watchOS, and tvOS versions would be mis-detected as 100 times their version (i.e. iOS 8.0 as iOS 800.0). Instead of protecting the branch in (version >= 100000) with a macOS ifdef, we can simply remove it entirely since Qt cannot be run on OSes where the old encoding was used (macOS < 10.10). Amends 8418a6335b3f8a029f48ee9b0a18500ddc760852 Change-Id: I32b307163c815799cb46c008b93f3b53d27c48b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devThiago Macieira2017-08-084-24/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget.cpp This merge also extends the expected output of the pairdiagnostics teamcity output (added in dev in commit c608ffc56ab37f9a9d5b9c34543126adb89e2b08) after the recent addition of the flowId attribute to the teamcity output (commit 8f036562119dd35ce51dc9230304d893b906bd37 in 5.9). Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
| * Improve documentation for {QFile, QFileDevice}::resize()Sérgio Martins2017-08-032-1/+5
| | | | | | | | | | | | | | | | - Warn that they can fail if used on non-existent files - Fixed random garbage Change-Id: Ie58aac4a9f4479332ef07d39aecc136b1cfa58e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QFileSystemWatcher/Windows: Fix crash when no QCoreApplication is presentFriedemann Kleint2017-08-022-23/+24
| | | | | | | | | | | | | | | | | | Rewrite instantiation of QWindowsRemovableDriveListener to check for the presence of the event dispatcher. Task-number: QTBUG-62242 Change-Id: Ibb5726864058593e5341e0d411aaf5432e2f108a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine/Unix: rework the getting of nsec-precision file timesThiago Macieira2017-08-062-23/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was working on Linux because _GNU_SOURCE gets us POSIX.1-2008 compatibility, but not on macOS or the BSDs. There, we were still stuck to full second precision. This commit uses the template trick introduced by the futimes code (which itself was inspired by commit 2fb42eb4af3444b11e7b1210323637937ef in QtNetwork). Also note how it adds support for birth time, if the system's stat struct has that information. Tested to work on MacOS and FreeBSD. The manual filetest produces: Name: . Path: . (/usr/home/tjmaciei/src/qt/qt5) Size: 1536 Type: Directory Attrs: readable writable executable hidden nativepath Mode: drwxr-xr-x Owner: tjmaciei (1001) Group: tjmaciei (1001) Access: 2017-07-13T20:03:47.916 Birth: 2017-07-13T20:03:47.916 Change: 2017-07-13T20:04:41.648 Modified: 2017-07-13T20:04:41.648 Linux will require support for statx(2). Change-Id: I8d96dea9955d4c749b99fffd14cd97d7a8c6d45d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFileSystemEngine::fillMetaData: simplify and comment the codeThiago Macieira2017-08-061-38/+65
| | | | | | | | | | | | | | | | | | | | | | Took me a long while to understand what it did. Now that I do, I can also answer the question left behind during the original implementation in Qt 4.8 (commit 4fd2aced96d9095254d89f9da9c911bd88f15245 in the old history): how to know if a file exists? Change-Id: I8d96dea9955d4c749b99fffd14cdae135499a0d3 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move Unix code from qfilesystemengine.cpp to qfilesystemengine_unix.cppThiago Macieira2017-08-062-223/+218
| | | | | | | | | | | | | | The comment about Symbian no longer applies. Change-Id: I8d96dea9955d4c749b99fffd14cd966f07d95948 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Migrate QStandardPaths to use QRegularExpressionSamuel Gaist2017-08-051-3/+5
| | | | | | | | | | | | | | | | | | | | This patch updates the code from the unix implementation of QStandardPaths to use QRegularExpression in place of the deprecated QRegExp. Change-Id: I51fa231dcd70ca55d1bfffb31d8f28f964ac44fe Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | Doc: add warning against bulk random data creation to QRandomGeneratorSamuel Gaist2017-08-051-1/+4
| | | | | | | | | | | | | | | | | | The full documentation explains it well but a more prominent warning will help avoid the wrong use of that class and encourage user to read further the documentation. Change-Id: I3178749f2b1b0350040f81eef253fd85c7ba0a5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFileSystemEngine/Windows: fix setFileTime when input date is UTCThiago Macieira2017-08-051-15/+30
| | | | | | | | | | | | | | | | | | | | | | I was getting a weird 7-hour offset when doing: QVERIFY(file.setFileTime(before.addSecs(-10), QFile::FileModificationTime)); mtime = file.fileTime(QFile::FileModificationTime).toUTC(); QCOMPARE(mtime, before.addSecs(-10)); Change-Id: I35c4da69d754686a43e675b3d215213e448df7cf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QFileSystemEngine::setFileTime/Unix: remove the fallback to futimesatThiago Macieira2017-08-053-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use as in the code: futimesat(fd, NULL, &tv) is not documented to work. The file descriptor should be a directory's one, not an open file (though the Linux source code seems to handle that case). This call was done as a fallback to futimes, so it's very unlikely a system would have futimesat and not futimes. Both the Linux and the FreeBSD man pages say it's deprecated anyway. Change-Id: I8d96dea9955d4c749b99fffd14cd94068dc7668a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Filesystem: Use "birth time" to avoid confusion with Unix ctimeThiago Macieira2017-08-0511-75/+111
| | | | | | | | | | | | | | | | | | | | | | The Unix stat fields "st_ctime" and "st_ctim" mean "change time", the last time that the file/inode status fields were changed. It does not mean "creation time". So this commit splits all of the internal API to "birth" and "metadata change" instead of "creation" to avoid the conflict. Change-Id: I149e0540c00745fe8119fffd1463fe78b619649e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move platform-specific code from QFSFileEngine to QFileSystemEngineThiago Macieira2017-08-055-162/+178
| | | | | | | | | | Change-Id: I8d96dea9955d4c749b99fffd14cd9395174ba005 Reviewed-by: Lars Knoll <lars.knoll@qt.io>