summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfileinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make Qt aware of NTFS Junctions on WindowsRyan Chu2019-11-091-0/+19
| | | | | | | | | | | | | | | | | | | | | | On NTFS, a junction point can be created and deleted by the mklink and rmdir commands, respectively. If a directory is not identified correctly as a junction, then applications will likely try to remove it using recursive methods, leading to fatal data loss. With this change, Qt can identify file system entries as junctions, allowing applications to use the correct file system operation to remove it. The test needs to delay the cleaning up of junctions and files it creates until the checks are complete; since they might fail and make the test function return prematurely, use a scope guard. [ChangeLog][QtCore][QFileInfo] Add QFileInfo::isJunction so that applications can recognize NTFS file system entries as junctions Task-number: QTBUG-75869 Change-Id: I3c208245afbd9fb7555515fb776ff63b133ca858 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-301-10/+75
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| * QFileInfo: clarify documentation about handling of symlink attributesThiago Macieira2019-09-251-11/+75
| | | | | | | | | | | | | | | | | | | | On Windows, shortcut ".lnk" files are treated as symlinks, and attribute queries on a shortcut file return the results for the shortcut target. Fixes: QTBUG-77523 Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove QFileInfo::type and related enum from 5.14Volker Hilsheimer2019-08-301-66/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is problematic for several reasons: - the mixing of flags and enum in a single enum type - the name "type" as somewhat overloaded - the ease of misuse when comparing the result rather than testing for a bit being set In light of this, focus for 5.14 on the new isShortcut and isSymbolicLink functions, thus migitating the problematic isSymLink which conflates the two concepts. Change-Id: I57e02321edd5061f69a775f04a0932ef89adf866 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make Qt aware of symlinks and shortcuts on WindowsRyan Chu2019-08-161-15/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt has traditionally considered Windows shortcut files equivalent to symlinks on Unix file systems. Because of NTFS symlinks, the interpretation of shotcut files as symlinks is confusing. In this change, QFileInfo treats shortcut (.lnk) files as regular files but can follow the pointed object. In addition, QFileInfo introduces a more comprehensive file type. So that applications can make well-informed decisions about how to treat a file system entry. Based on the implementation of QFileInfo::type(), two inline helper functions are introduced to QFileInfo. 1. isSymbolicLink, returns true if it points to a symbolic link. 2. isShortcut, returns true if it points to a shortcut. [ChangeLog][QtCore][QFileInfo] Introduce QFileInfo::type() to replace the isSymLink method. Task-number: QTBUG-75869 Change-Id: Icc0dd52f9ad0ea50b0265d77ee0d0a3d25054e39 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Standardize on unique_ptr to hold QAbstractFileEngineMarc Mutz2019-07-281-3/+3
| | | | | | | | | | | | | | | | | | This will make it possible to return it from functions in an owner, as exemplified in the QFileInfoPrivate ctor, unlike QScopedPointer, which lacks move special member functions. Change-Id: I179ffa4f656e1b83c23e0f67d1542834460ff382 Reviewed-by: Mårten Nordheim <marten.nordheim@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>
* QFile/QFileInfo: mark readLink() as deprecatedChristian Ehrlicher2019-01-231-0/+7
| | | | | | | | | | | QFile/QFileInfo::readLink() functions are obsolete but were not marked as deprecated. Explicit mark them as deprecated so they can be removed with Qt6. Change-Id: I52424dc5441e1f5b01015713df990bbec5186caa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Empty filenames does not existSune Vuorela2018-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | If empty paths is passed to the unix filesystem engine, we get a warning about empty filename passed to function, before returning false. Fix this by testing for empty string first, and don't send empty string to file engine. The current warning leads to code like if (!filename.isEmpty() && QFile::exists(filename)) { // } rather than the slightly cleaner if (QFile::exists(filename)) { // } Change-Id: I0207324889ec22e5a072c28d58337d117b0153b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-08-311-9/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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>
| * 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>
* | QFileInfo: harmonize QFileInfo() and QFileInfo("")Thiago Macieira2017-08-081-123/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Filesystem: Use "birth time" to avoid confusion with Unix ctimeThiago Macieira2017-08-051-11/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Introduce QFileInfo::birthTime and metadataChangeTimeThiago Macieira2017-08-051-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QFileInfo] Deprecated created() because it could return one of three different file times depending on the OS and filesystem type, without the ability to determine which one is which. It is replaced by metadataChangeTime() and birthTime(). [ChangeLog][QtCore][QFileInfo] Added QFileInfo::metadataChangeTime(), which returns the time the file's metadata was last changed, if it is known, and falling back to the same value as lastModified() otherwise. On Unix systems, this corresponds to the file's ctime. [ChangeLog][QtCore][QFileInfo] Added QFileInfo::birthTime(), which returns the file's birth time if it is known, an invalid QDateTime otherwise. This function is supported on Windows and on some Unix systems. Change-Id: I0031aa609e714ae983c3fffd1467bd8b3e3a593d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix some qdoc warnings for 5.10Friedemann Kleint2017-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/io/qfiledevice.cpp:741: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:772: warning: Can't link to 'setFileName()' src/corelib/io/qfiledevice.cpp:790: warning: No such parameter 'time' in QFileDevice::setFileTime() src/corelib/io/qfiledevice.cpp:790: warning: Undocumented parameter 'fileTime' in QFileDevice::setFileTime() src/corelib/io/qfileinfo.cpp:1344: warning: Can't link to 'FileTime' src/corelib/kernel/qcoreapplication.cpp:2007: warning: Can't link to 'isTranslatorInstalled()' src/gui/opengl/qopenglextrafunctions.h:468: warning: No documentation for 'QOpenGLExtraFunctions::glBlendBarrier(void )' src/gui/opengl/qopenglextrafunctions.h:494: warning: No documentation for 'QOpenGLExtraFunctions::glGetGraphicsResetStatus(void )' src/gui/opengl/qopenglextrafunctions.h:475: warning: No documentation for 'QOpenGLExtraFunctions::glPopDebugGroup(void )' src/sql/models/qsqlquerymodel.cpp:217: warning: Unknown command '\override' Change-Id: Ide0ce911f6faf964fda8f32fac433da7d2cb11de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Stop using QVector in QFileInfoPrivateThiago Macieira2017-07-071-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | This was added in 32629676b977d98e853fc6101a63c0d888ff5598 for Qt 5.1 because QDateTime always allocated memory, so QVector was much faster for default-created objects. Since Qt 5.7, QDateTime no longer allocates memory in the default constructor, and in Qt 5.8 on 64-bit systems, it won't allocate memory at all for most reasonable dates, so construction times are acceptable now. Change-Id: If0ad4d988da143b3b1b2fffd1480e83121cddc8c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Rewrite QFileInfo::{created,lastModified,lastRead} using fileTime()Thiago Macieira2017-07-061-39/+27
| | | | | | | | | | | | | | Better code reusal. Change-Id: I8d96dea9955d4c749b99fffd14cd72a7f4e040c9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QFileInfo: use QFile::FileTime instead of our own enumThiago Macieira2017-07-061-18/+4
| | | | | | | | | | | | | | No need to duplicate the enum in two places. Change-Id: I8d96dea9955d4c749b99fffd14cd6f887dd48a71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add QDebug operator for QFileInfoShawn Rutledge2017-05-091-0/+12
| | | | | | | | | | | | | | So far it only shows the path. Change-Id: Ibfecc20ddacce12a178e1ddb297b0e7b91f29f05 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | QFileDevice/QFileInfo: Add fileTime() and setFileTime()Nikita Krupenko2017-04-271-4/+43
|/ | | | | | | | | | | [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 fileTimeToQDateTime() by having it return a UTC timeEdward Welbourne2017-01-111-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids so many complications. The prior code, using SystemTimeToTzSpecificLocalTime(), lead to unhelpful results when the QDateTime() implementation used MS-POSIX's defective mktime(). Although SystemTimeToTzSpecificLocalTime() is actually more correct, we were getting inconsistent results by mixing the two: and eliminating the use of mktime() turns out to be decidedly tricky. So, to avoid inconsistency, stick with a UTC time (which is what FILETIME is defined as). Change QFileInfo's methods to explicitly convert .toLocalTime() where appropriate and document that these methods do indeed return local time (as we conjecture has been taken for granted by callers). Also added a regression test for the reported case of this going wrong. A time-stamp from before Russia's (permanent, not DST) change of TZ could end up inconsistently handled between file-system meta-data and raw date-time APIs, due to cross-talk between different MS-Win time APIs. [ChangeLog][QtCore][QFileInfo] Made sure that all file lifecycle times are in local time. This was probably true before, but is now explicit. Task-number: QTBUG-48306 Change-Id: Ic0b99d25c4168f623d31967bc60665c0c4f38a14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-221-2/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/qeglfshooks.cpp Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
| * QFileInfo: fix double sentence in apidocFrederik Schwarzer2016-10-211-2/+1
| | | | | | | | | | Change-Id: Ie1cf32565b2fcb828ec381c45595adad1392e2ec Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Doc: Remove references to Windows CE in Qt CoreVenugopal Shivashankar2016-08-231-3/+0
| | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I98b90d574d9a76c4281852d93818620b5f489117 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-4/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_pre.prf mkspecs/macx-ios-clang/features/sdk.prf mkspecs/unsupported/freebsd-g++46/qplatformdefs.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro Change-Id: Ia943555d1e59234a66f7dc65bdfda838e40001b5
| * Mention extension in QFileInfo's suffix-related documentationMitch Curtis2016-06-101-2/+2
| | | | | | | | | | | | | | | | | | This makes it easier for users to find out how to get a file's extension when browsing docs. Change-Id: I08a1b620dea5432462133324824fae85754b9a09 Task-number: QTBUG-53380 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * winrt: msvc2015: refactor file handlingMaurice Kalinowski2016-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | msvc2015 reintroduced a couple of functions from the win32 API towards WinRT. Enable usage of those and simplify the file system engine. Furthermore update the autotests. Change-Id: I9eafffba0ddfd05917c184c4a6b9e166f86d71d9 Reviewed-by: Oliver Wolff <oliver.wolff@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>
* Doc: Mention Windows limitations in QFileInfo permission methodsKai Koehne2015-08-251-1/+15
| | | | | | | | | | The limitation is already mentioned in the class documentation, but IMO is severe enough to be highlighted in the documentation of the respective methods, too. Change-Id: I16c68eb41ab9d3a7698d7ef06f747cfd98a8aaff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-4/+4
|\ | | | | | | Change-Id: I004854a25ebbf12b1fda88900162fe7878716c58
| * Doc: Fix using Apple-related terminology in Qt CoreAlexander Volkov2015-03-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Mark behavior of QFileInfo::absoluteFilePath as undefined in corner casesKai Koehne2014-06-251-3/+4
| | | | | | | | | | | | | | | | | | | The current description was misleading, since e.g. QFileInfo().absoluteFilePath() will always return an empty string. QFileInfo("").absoluteFilePath() however will return the current working directory ... Instead of documenting these small quirks we should rather mark the exact behavior as undefined, like we already do for absolutePath(). Change-Id: I70358413528429c2c2dee37480ad018aae26e6cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Improve docs for file permission checking on NTFSSze Howe Koh2014-04-161-0/+11
| | | | | | | | | | | - Reduce verbosity in qfiledevice.cpp - Copy to qfileinfo.cpp Task-number: QTBUG-35232 Change-Id: I4b0de36bdf266ebf486f73daecec8fbb74fa1d4c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix miscellaneous typosSze Howe Koh2013-10-301-1/+1
| | | | | | Change-Id: Iaf0dd8974c3ad78beffa995c596a76fb3e4cceab Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add missing \since 5.2 tag to static QFileInfo::exists()hjk2013-10-171-0/+2
| | | | | | Change-Id: I11e136eaede2a5dffeb10b5fe31023b9aef709cb Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix memory leak in QFileInfo::exists()Jian Liang2013-10-121-1/+2
| | | | | | | | | | Use the the legacy file engine object created in static function QFileInfo::exists() as the engine of the QFileInfo object to prevent memory leak. This can also boost a little performance. Change-Id: I06317d158d487be5ef15fe3244a917a371563ac9 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-29/+29
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-271-0/+8
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add a static QFileInfo::exists(fileName) functionhjk2013-09-131-0/+22
| | | | | | | | | This avoids dynamic construction of the private class. According to the benchmark we go from 4,550 to 3,900 instruction reads per iteration. (without change 32629676 the baseline is 5,600) Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typo in note on symlink behavior of QFileInfo::existshjk2013-09-131-2/+2
| | | | | Change-Id: Iacd957cd9cd04e9153efd826bb42d872f8963f75 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Use a QVector<QDateTime> instead of an array in QFileInfoPrivatehjk2013-04-231-0/+2
| | | | | | | | | | | | Since QDateTime is pimpled, default allocation is expensive and regularly shows up in profiles of code using QFileInfo. For Qt 6, QDateTime's data members should be put into the class proper, and this change here reverted. Change-Id: I94a50e467b12772e1076181eb2ac6031984d8802 Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>