summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdir/tst_qdir.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed checking HOME variable return value using isEmpty()Pasi Petäjäjärvi2013-02-131-0/+8
| | | | | | | | | | | | Return value of the QFile::decodeName(qgetenv("HOME")); is never null if HOME environment variable is not set. So need to check the return value using isEmpty() instead. Task-number: QTBUG-28912 Change-Id: I7875520965bf2c0c7311fb051c1f5177e9c3685b (cherry picked from qtbase/05b4000e01ff5785739617c3069fbe0b0d36a606) Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Checking for directory exists in failed QDir::mkpath on SymbianMurray Read2012-02-151-0/+6
| | | | | | | | | | | | | | QDir::mkpath should return true if the directory already exists. In the new native Symbian implementation, RFs returns KErrPermission denied when you try to access some data caged directories such as C:\private. This was being interpreted as failure, as the code expected KErrAlreadyExists for the case where the directory exists. In this circumstance we now check if the directory already exists. Task-number: ou1cimx1#974477 Change-Id: Ie476219bc963c23d3c7e1773ebded8ecf137fd3c Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge fixes for QDir::operator==Shane Kearns2011-09-071-1/+21
| | | | | | | | | | | | 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
* Fix comparison of absolute, unclean paths in QDirShane Kearns2011-09-021-0/+13
| | | | | | | | | | | | | | QDir::operator== was creating a clean absolute path for comparison purposes if the original path was relative. However original absolute paths were trusted, even though they could be unclean. Now they are checked for cleanliness first. Task-Number: QTBUG-19995 Task-Number: QTBUG-20495 Change-Id: I047a1a40ae5151e4604085e4ac87f30a4e4979c4 Reviewed-on: http://codereview.qt.nokia.com/4099 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* Fix QDir::operator==(const QDir &) constJoão Abecasis2011-08-261-0/+6
| | | | | | | | | | | | | 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
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge branch 'master' of scm.dev.troll.no:qt/qt-earth-team into ↵Shane Kearns2011-04-111-0/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | symbian-socket-engine Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
| * QDir: Fix absolute paths when using file enginesJoão Abecasis2011-03-181-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | QFileSystemEntry doesn't know about paths as implemented by custom file engines, such as is the case with resource files. In such cases, we need to allow the engine to make the relative to absolute conversion. Expanded QDir's test case to ensure resource paths are considered in more places. Task-number: QTBUG-17921 Reviewed-by: Prasanth Ullattil
* | bugfix: QDir::entryList(Files|Readable) not listing writable filesShane Kearns2011-02-241-0/+6
|/ | | | | | | | | | | Mistake in the qfilesystemiterator_symbian implementation. Readable without Writable was thought to mean show only read-only files, but this isn't the expected behaviour of QDir[Iterator] Added an autotest, as this was only covered by ssl tests in the network layer. Reviewed-by: joao
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * QDir and QFileInfo shouldn't lose properties when detachingJoão Abecasis2010-09-071-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | For QFileInfo, the caching state was being lost on the different setFile overloads. QDir::cd and ::makeAbsolute were losing filters and sorting flags. QDir issues were introduced with these patches: "Simplify QDir::cd" "QDir::makeAbsolute could self-destruct on failure" Reviewed-by: Prasanth Ullattil
* | Skip failing testsJoão Abecasis2010-12-101-2/+18
| | | | | | | | | | | | | | | | | | | | For Mac OS X 10.5 and earlier, QDir::canonicalPath depends on QDir::cleanPath which is fundamentally broken and specifically fails for the case of "/./", returning "" instead of "/". Fixing cleanPath to a sane and correct behaviour seems to break more code than it is worth so we're skipping these individual tests for the time being.
* | Fix spelling in commentsJoão Abecasis2010-12-051-1/+1
| |
* | Fix test compile issues on symbianShane Kearns2010-11-181-3/+4
| | | | | | | | Reviewed-by: Trust Me
* | Fix test compile error on linuxShane Kearns2010-11-171-3/+1
| | | | | | | | Reviewed-By: Trust Me
* | Test Coverage: add tests to cover QDir APIShane Kearns2010-11-171-4/+206
| | | | | | | | | | | | | | Functional coverage of QDir, except for trivial shims for deprecated APIs and the QDebug streaming functions. Reviewed-by: joao
* | test coverage: add test for QDir::match static functionsShane Kearns2010-11-161-0/+30
| | | | | | | | Reviewed-By: joao
* | test coverage: test QDir::addSearchPathShane Kearns2010-11-161-0/+23
| | | | | | | | Reviewed-By: joao
* | Test QDir::mkdir/mkpath return codesThomas Zander2010-10-121-0/+13
| |
* | Add test to test QDir caching behavior.Thomas Zander2010-10-121-0/+13
| | | | | | | | | | | | Also fix the qfileenginemodel test to be less fragile Reviewed-by: Prasanth Ullattil
* | Test 'QDir::cd' a bit betterThomas Zander2010-09-221-0/+1
| |
* | tst_qdir fixesShane Kearns2010-09-151-20/+20
| | | | | | | | | | | | | | | | | | 1. change the test case names in relativeFilePath_data so they are all unique. 2. enable the canonical path tests related to rootPath on all OS, which were previously added only for symbian/windows. Reviewed-By: joao
* | Disable symlink and memory mapped files tests on symbianShane Kearns2010-09-151-1/+3
| | | | | | | | Reviewed-By: joao
* | QDir and QFileInfo shouldn't lose properties when detachingJoão Abecasis2010-08-311-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | For QFileInfo, the caching state was being lost on the different setFile overloads. QDir::cd and ::makeAbsolute were losing filters and sorting flags. QDir issues were introduced with these patches: "Simplify QDir::cd" "QDir::makeAbsolute could self-destruct on failure" Reviewed-by: Prasanth Ullattil
* | Fix for root path issue in tst_qdir. (case "drive:")Zeno Albisser2010-05-101-1/+1
| | | | | | | | | | | | | | | | Windows only: Since the working directory is not necessarily located on the root drive, we should not rely on rootPath for the test. Reviewed-by: TrustMe
* | Fix tst_qdir to use const char* instead of QString for QTest::newRowZeno Albisser2010-05-101-4/+4
| | | | | | | | | | | | This is only needed to compile on msvc2005 Reviewed-by: TrustMe
* | Fix for qfsfileengine_win to return proper absolute path for C:\Zeno Albisser2010-05-071-0/+41
| | | | | | | | | | | | | | | | | | | | When using canonicalPath on a QDir that currently just represents a root directory, a valid path name such as "C:\" should be returned. Previously we returned "C:" which in fact would point to the current working directory on drive C: and therefor is not necessarily the same. Reviewed-by: Thiago Task-number: QTBUG-6680
* | Repositioned _WIN32_WINNT define in tst_qfileinfo and tst_qdirZeno Albisser2010-04-271-0/+5
|/ | | | | | | This define is needed to make sure that some structures used for creating junctions and symlinks get properly defined in winioctl.h. Reviewed-by: TrustMe
* Fix broken test caseShane Kearns2010-03-311-0/+7
| | | | | | | | Symbian and WinCE don't have . and .. directory entries. Other test cases in this autotest make allowance for this, so I have done the same thing for the updateFileLists test case. Reviewed-by: mread
* QDir fix issues with (shared) cached listsJoão Abecasis2010-02-031-0/+92
| | | | | | | | | | | | | | | With 2964718224c0ed356511335742368d4fc421c6bd, QDir started really using the cached file lists. However, these were not being properly updated on setNameFilters, setFilter and setSorting. QDir::refresh, on the other hand, would invalidate the lists without first detaching, thus breaking the copy-on-write promise. Summarizing, shared data must be detached and cached lists invalidated, so they get regenerated. Reviewed-by: Olivier Goffart Reviewed-by: Ritt Konstantin
* QDir::cleanPath: strip trailing slash for "/:/" on non-win platformsRitt Konstantin2010-01-291-0/+7
| | | | | Merge-request: 445 Reviewed-by: João Abecasis <joao@trolltech.com>
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Autotest: fix compilation with a more strict compiler / libc.Thiago Macieira2009-09-181-0/+2
| | | | Reviewed-By: TrustMe
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Removed unnecessary Q_OS_SYMBIAN ifdefsMiikka Heikkinen2009-08-241-2/+2
| | | | | | | | | | | | | | | | Q_OS_UNIX branch of ifdef is ok to execute in homePath and tempPath cases of QDir autotest for Symbian. Q_OS_SYMBIAN branch was never even entered for Symbian builds. Reviewed-by: TrustMe
* | Fixed qdir autotest for SymbianMiikka Heikkinen2009-08-141-5/+22
| |
* | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Fixed compilation error in qdir autotest for Symbian.Miikka Heikkinen2009-08-101-1/+1
| | |
* | | Merge commit 'origin/master'Jason Barron2009-08-061-28/+28
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qfilesystemmodel/qfilesystemmodel.pro tests/auto/qfontdialog/tst_qfontdialog.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp tests/auto/qsqldriver/qsqldriver.pro tests/auto/qsqlquery/qsqlquery.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qstatemachine/tst_qstatemachine.cpp tests/auto/qtcpsocket/tst_qtcpsocket.cpp
| * | | Trailing whitespace and tab/space fixes for auto testsJanne Anttila2009-08-041-28/+28
| | | |
* | | | Merge commit 'qt/master-stable'Jason Barron2009-08-041-28/+49
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/openssl/openssl.pri demos/embedded/embedded.pro examples/itemviews/chart/chart.pro examples/network/network.pro examples/painting/painterpaths/painterpaths.pro examples/threads/mandelbrot/mandelbrot.pro qmake/project.cpp src/3rdparty/libtiff/libtiff/tif_config.h src/corelib/arch/arch.pri src/corelib/global/qglobal.cpp src/corelib/kernel/kernel.pri src/corelib/kernel/qcore_unix_p.h src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/corelib/tools/qsharedpointer_impl.h src/corelib/tools/tools.pri src/gui/kernel/qaction.h src/gui/kernel/qapplication.cpp src/gui/painting/qregion.h src/gui/widgets/qlineedit.cpp src/gui/widgets/qlineedit_p.h src/network/socket/qnativesocketengine_unix.cpp tests/auto/qdir/tst_qdir.cpp tests/auto/qdiriterator/tst_qdiriterator.cpp tests/auto/qhttp/qhttp.pro tests/auto/qline/qline.pro tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qresourceengine/qresourceengine.pro tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qstring/qstring.pro tests/auto/qtcpsocket/qtcpsocket.pro tests/auto/qtcpsocket/tst_qtcpsocket.cpp