summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfileinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed: QFileInfo::lastModified() returning wrong value.Markku Heikkila2012-09-131-3/+6
| | | | | | | | | | | | | | | Fixed so that empty QDateTime is returned for non existing file. Fixed also created() and lastRead() to return empty QDateTime for non existing file. QFileSystemEngine::fillMetaData() returned true for non existing files. This was also corrected. Task-number: QTBUG-25811 Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Fix qdoc erros in qfile and related classesLars Knoll2012-08-181-2/+2
| | | | | Change-Id: I56b66e6eeb06c84e1157a701a814aebb1ddf4845 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make the "\internal" qdoc command stand on its own lineLaszlo Papp2012-08-151-1/+2
| | | | | | | | | | The qdoc manual currently claims that the command must stand on its own line. The change follows the consistency with the rest and how the example looks like inside the qdoc manual for this command. Change-Id: I6b653dc95cf9d84e4adf32220dace5d313678419 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtCore: add member-swap to shared classesMarc Mutz2012-07-031-0/+8
| | | | | | | | | | Implemented as in other shared classes (e.g. QPen). Special case: QUrlQuery: document existing swap(). Change-Id: I4b36cc9577fbf2232d4b2a2d8822d26e41e22cad Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clarified code documentation for QFileInfo::operator==.Mitch Curtis2012-05-231-1/+2
| | | | | | | | | | | | | | | | | QTBUG-4031 mentions that canonicalFilePath() will cause the operator to return true for the following comparison because it returns an empty string if the path is empty or non-existant: QFileInfo("") == QFileInfo("non_existant_file") I'm assuming that the reason for not checking whether one of the files exist is based on performance, and so I've updated the comments for the operator to explicitly state that the result of the above comparison is undefined. Task-number: QTBUG-4031 Change-Id: I9b34f189f1628f9362b3604445706abd2342fd6e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removed size comparison in QFileInfo::operator==.Mitch Curtis2012-05-231-3/+0
| | | | | | | | | | | QTBUG-4031 and QTBUG-4036 mention that QFileInfo::operator== includes a size() comparison as part of its equality check. I've removed this check as it doesn't seem to be integral to the comparison. Task-number: QTBUG-4031 Task-number: QTBUG-4036 Change-Id: I5663ec0e1ac8f70e0a156357c284696779ecd380 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-17/+17
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Bump some Qt 5 to-do's to Qt 6.Jason McDonald2012-04-101-1/+1
| | | | | | | | | | Source-incompatible changes are no longer desirable for Qt 5, so these items must wait until at least Qt 6. Task-number: QTBUG-23524 Change-Id: I0b9ae5f6f3a792e0169a4b0d3aefbdcb744acd2f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-3/+3
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add QFileInfo::isNativePathJoão Abecasis2012-02-141-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | This function returns true if the file path can be used directly with native APIs, modulo encoding and path separator conversions. This is important for applications that interface with other libraries or simply need to use native APIs together with Qt. Traditionally, this information was available in QAbstractFileEngine and forced users to explicitly create an engine or use internal API such as QFile::fileEngine to access the underlying engine and this piece of information. Given its usefulness, exposing the information in a more visible place is more appropriate. This reduces the need for people to know or care about implementation details, like file engines... The existing isLocalFs test was updated and repurposed to use the new API, instead of relying on file engines and internal implementation details of QFileInfo. Change-Id: I65f497bb25741f6f7ea4d2c3b3562c8c4aab8bea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code from QtCore.Xizhi Zhu2012-01-301-1/+1
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Q_DECLARE_PRIVATE equivalent for QDir, to be able to subclass itDavid Faure2011-11-081-3/+2
| | | | | | | | Apply the same solution to QFileInfo (no public detach(), but a non-inline d_func instead). Change-Id: I31c4c759f44a0649b97f7884b078b174c9c00f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove stale documentation and fix qdoc errors.Casper van Donderen2011-10-111-5/+0
| | | | | | | Change-Id: I51bb0c52eb32d9d672d115f31b16d414f81708e2 Reviewed-on: http://codereview.qt-project.org/6433 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Merge fixes for QDir::operator==Shane Kearns2011-10-061-0/+5
| | | | | | | | | | | | | | | | | | There were two fixes in 4.8 which each fixed a part of the problem. Comparing canonical paths is more correct, but is only possible where both directories exist. If neither directory exists, then compare absolute paths instead. Changed a regression test, because /tmp is a symbolic link on MacOS. I.E. "/tmp/.." is canonically "/private" and not "/" as expected. Task-Number: QTBUG-20495 Reviewed-By: joao (cherry-picked from ad35d25e78c8252a72108a4ba931934047c4707e) Change-Id: Ia4986e8337f0e512e1a3398a5a4dd36e62680b9c Reviewed-on: http://codereview.qt-project.org/5813 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix QDir::operator==(const QDir &) constJoão Abecasis2011-10-061-0/+1
| | | | | | | | | | | | | | | | | | | We can't rely on absolute paths when comparing directories for equality as these don't take into account symbolic links and may also bypass ../ and ./ simplification. Instead, canonical paths must be computed and can then be compared according to the case sensitivity rules for the platform or file engine, as is done in QFileInfo. Task-number: QTBUG-20495 Reviewed-by: Prasanth Ullattil (cherry-picked from dcee6e1371d899eb79717b8e3f3eec08b765db82) Change-Id: Ib5f2a6ee11311c55782ea5dd0e9c3b45f9231686 Reviewed-on: http://codereview.qt-project.org/5812 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Remove all non-const operator==Harald Fernengel2011-08-091-22/+14
| | | | | | | | | | | We had to leave the non-const operator== for binary compatibility. Remove them all, just leave the const version in there. 100% source compatible. Change-Id: Ib7a70fb441fe51d5164d9cbf495cbeda0f48fafe Reviewed-on: http://codereview.qt.nokia.com/2773 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
* Doc: Removed documentation for deleted code.David Boddie2011-07-211-58/+0
| | | | | | | Change-Id: Icdbc05decac3dfe3fc18ce073c494e1fce4ea347 Reviewed-on: http://codereview.qt.nokia.com/1824 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: David Boddie
* remove QT3_SUPPORT in corelib/ioLars Knoll2011-06-291-13/+0
| | | | | | | Change-Id: Ia9ad0bebacc538a7392afb0fdcca40e8a2bb687b Reviewed-on: http://codereview.qt.nokia.com/865 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+1399
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12