summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fixed tst_qfileinfo for windows.Markku Heikkila2012-06-281-0/+13
| | | | | | | | | | Manually cherry picked from Qt5 SHA 85594bd9 Task-number: QTBUG-25563 Change-Id: I16131e33712702028843f0404b65ea9f7b04c7d5 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix cases where functions are called with a drive and no slashAndy Shaw2012-05-161-1/+25
| | | | | | | | | | | | | | | | When a file is specified on a path that includes a drive letter followed by a colon but no slash then it didn't always account for the fact that this refers to the current path on that drive. This fixes the problems in completeBaseName(), baseName() and path(). Tests are also added for these three cases and some others too. Task-number: QTBUG-25353 Change-Id: I47a197c6af066f532442ad269be57597ec61303a Reviewed-by: Irfan Omair <irfan.omair@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from commit cfb44c6528b2518274bf157388832d1d610ce0e4)
* test: Mark test as significant on platforms other than WindowsSergio Ahumada2012-05-021-1/+1
| | | | | | | | | This test only fails on Windows at the moment, so enabling it for all the other platforms. Task-number: QTBUG-25563 Change-Id: I42d1bf9046a643c12385ce3bc6d88572216691b4 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com>
* Fix bug that made some autotests unrunnable on INTEGRITY targetKalle Viironen2012-04-271-2/+0
| | | | | | | | | | | Some autotests had else:integrity { patrs that defined SRCDIR so that those tests were unrunnable on INTEGRITY. This patch removes those defines. Task-number: QTBUG-24176 Change-Id: I26d3ee60c825fc57a60df1a7177176585733d099 Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix 3 autotest build faulures for WinCEjaanttil2012-02-061-0/+2
| | | | | | | Change-Id: I67af7b1b31be3c6d99abf2344bcfd93fd5f77bf6 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove NTFS junction and mount point detectionJoerg Bornemann2012-01-181-5/+7
| | | | | | | | Qt now treats neither NTFS junctions nor mount points as symlinks. Task-number: QTBUG-20431 Change-Id: Id9bd17f8b93afe9aeb307358ddad5726913961f3 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Revert "fix NTFS mount points"Joerg Bornemann2012-01-181-1/+1
| | | | | | | | | | We agreed on treating neither junctions nor mount points as symlinks. This will be handled in another commit. This reverts commit 611eb9e5e5c8fe8035482e502b84263f43779dd8. Change-Id: I19f0bd841c7e6dd6e65e5c8df4bdfa1d6f08ce28 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* fix NTFS mount pointsJoerg Bornemann2012-01-171-1/+1
| | | | | | | | | | | | NTFS mount points are not treated as symlinks, because they might not have a link target. This is the case when a volume is mounted as a single mount point without a drive letter. This patch fixes building Qt in an NTFS mount point. Task-number: QTBUG-20431 Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a Reviewed-by: Thomas Hartmann <Thomas.Hartmann@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>
* tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-281-0/+2
| | | | | | | | | | Marking a test with CONFIG+=insignificant_test will cause the exit code of the test to be discarded during `make check'. This is intended to be used for tests which are valuable to run, but are known to be unstable and are not feasible to immediately fix. Change-Id: Id7b2407d0a13c8de19a58badb78fa7c018c9b50a Reviewed-by: Jo Asplin
* Add specific INTEGRITY cases for autotests requiring a target path.Rolland Dudemaine2011-11-151-0/+2
| | | | | | | | | SRCDIR is not parsed the same way due to the different qmake generation process. furthermore, the full host path doesn't seem like a good idea to use for the path of the target filesystem. Use "/" as default. Merge-request: 1438 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qeventdispatcher_symbian.cpp src/declarative/qml/qdeclarativetypeloader.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/opengl/qgl.cpp src/opengl/qgl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qclipboard/test/test.pro tests/auto/qsound/qsound.pro
| * Fix more test DEPLOYMENT statements for SymbianDamian Jansen2011-10-051-2/+2
| | | | | | | | Reviewed-by: Rohan McGovern
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Restore Qt4.7 behaviour of QFileInfo::absolute(File)PathShane Kearns2011-09-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many applications relied on the undefined behaviour that the filesystem engines returned clean paths (despite the documentation stating that they may not), and consequently suffered regressions with Qt 4.8. Unix paths are once again cleaned if necessary. Windows/Symbian paths were already cleaned, but now use the utility function to check if a path is dirty, to avoid duplicated code. Task-number: QTBUG-19995 Change-Id: If8c18469f149291c9d079ae3da23bc2087bbd49a Reviewed-on: http://codereview.qt.nokia.com/4154 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* | Fix compile error on MSVC2008Shane Kearns2011-09-051-1/+1
| | | | | | | | | | | | | | Change-Id: I4f6192b9db601076688b52bfd794ea80a7346729 Reviewed-on: http://codereview.qt.nokia.com/4153 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
* | 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 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
* | Don't rely on uninitialized dataJoão Abecasis2010-12-131-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we fail to get file attributes, the file times are left in an uninitialized state, which may lead to a crash. In particular, this was showing up in QMessageBox's autotest, where the lastModified time is being queried on a non-existing file. Before the refactoring, we were returning a default constructed QDateTime to queries about different file times, with this change we will return the time corresponding to a default constructed FILETIME object. Reviewed-by: Shane Kearns
* | Use effective user id instead of getloginJoão Abecasis2010-12-081-12/+16
| | | | | | | | | | | | And check if this gives us more reliable results. Reviewed-by: Prasanth Ullattil
* | Fix compile error in tst_qfileinfo on Mac/LinuxPrasanth Ullattil2010-12-071-0/+2
| | | | | | | | Reviewed-by: Shane Kearns
* | Fix tst_QFileInfo owner() & group() failure on Windows.Prasanth Ullattil2010-12-061-20/+43
| | | | | | | | | | | | | | | | The ownership of newly created files are transferred to the Administrator group only if the application is running with Admin privilages. This will happen only on Windows 7 & Vista, on XP user has the ownership. Reviewed-by: Joao
* | Fix tst_QFileInfo::canonicalFilePath failure on WindowsPrasanth Ullattil2010-12-061-10/+19
| | | | | | | | | | | | | | | | | | When the test application is running without administrative privilages, the CreateSymbolicLink() can incorrectly return success. To handle this we need to check whether GetLastError() returns ERROR_PRIVILEGE_NOT_HELD or not. Reviewed-by: Joao
* | Fix spelling in commentsJoão Abecasis2010-12-051-3/+3
| |
* | Flagging some more tests as parallelizableJoão Abecasis2010-11-251-0/+2
| | | | | | | | | | | | | | These tests have no GUI nor do they depend on network, so let's see what breaks if they're parallelized :-) Reviewed-by: Olivier Goffart
* | Merge remote branch 'qt/master' into file-engine-refactorJoão Abecasis2010-11-232-2/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/corelib/io/io.pri src/corelib/io/qfsfileengine.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtDeclarativeu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtDeclarativeu.def src/s60installs/eabi/QtGuiu.def tests/auto/qapplication/test/test.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qdiriterator/qdiriterator.pro tests/auto/qsound/qsound.pro
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-051-0/+8
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: mkspecs/features/symbian/symbian_building.prf src/network/access/qhttpnetworkconnectionchannel.cpp
| | * fix tests when using Qt in a namespaceHarald Fernengel2010-11-041-0/+2
| | |
| | * Fix tst_symbols auto testHarald Fernengel2010-11-041-2/+2
| | | | | | | | | | | | | | | Prefix isLikelyToBeNfs with a "q", even though it's only autotest-exported.
| | * fix isLikelyToBeNfs usageHarald Fernengel2010-11-021-2/+4
| | |
| | * Fixed QFileInfo autotest to skip on NFS.Dominik Holland2010-11-021-0/+4
| | | | | | | | | | | | | | | Exported the isLikelyToBeNfs() function to skip the fileInfo Test on NFS. Otherwise the Test will fail, because the FileSystemTimes are not synchronized.
| * | Align .pro with qmake: s/\.sources/.files/.Miikka Heikkinen2010-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complement previous commit by aligning Qt itself to use .files consistently for DEPLOYMENT as well as INSTALLS. This excludes changes to webkit. Task-number: QTBUG-3216 Reviewed-by: axis
| * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-101-8/+57
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| | * QDir and QFileInfo shouldn't lose properties when detachingJoão Abecasis2010-09-071-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Refactor QFileInfoPrivate::Data (Round 2)Prasanth Ullattil2010-09-071-8/+9
| | | | | | | | | | | | | | | | | | | | | The QFileInfoPrivate::Data member class is removed now. All the methods moved to QFileInfoPrivate. QFileInfoPrivate becomes a QSharedData type. Reviewed-by: Joao
* | | test coverage: test QFileInfo::group()Shane Kearns2010-11-161-0/+25
| | | | | | | | | | | | Reviewed-By: joao
* | | Test coverage - ensure tst_qfileinfo tests dir & absoluteDir functionsShane Kearns2010-11-162-2/+12
| | | | | | | | | | | | | | | | | | | | | The existing dir test function is appropriate, now it checks the dir functions as well as the path functions. Reviewed-By: Prasanth Ullattil
* | | Fix tst_qfileinfo crash on windows with UAC enabledShane Kearns2010-11-161-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating symbolic links requires admin privilege by default - when UAC is enabled then even users in the administrators group do not have admin privileges without an escalation prompt. (which is inappropriate for an autotest). When run with insufficient privileges, the test is skipped with a warning Reviewed-By: Prasanth Ullattil
* | | Add tests for QFileInfo::owner()Prasanth Ullattil2010-10-272-0/+68
| | | | | | | | | | | | Reviewed-by: Joao
* | | Create regression test for QFileInfo("").exists()Shane Kearns2010-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | File engine refactor caused a regression in QTextDocument, due to a QFileInfo constructed with an empty string returning true from exists() Added a test case to QFileInfo to catch this at the correct level. Reviewed-By: joao
* | | Fix for qfileinfo isExecutable test case.Shane Kearns2010-10-181-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Files in /sys/bin/ on any drive can be assumed to be executable. So the executable flag is set in the metadata for this path, even though RFs::Entry fails due to permissions (so we don't know if the file exists or not) Reviewed-By: joao
* | | Fix deployment for examples and testsShane Kearns2010-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the change from default deployment in symbian from being hardcoded in qmake to being in default_deployment.prf the .pro files needed to be changed. Specifically, "DEPLOYMENT = foo" needs to be "DEPLOYMENT += foo" otherwise the default deployment lines are not added and the test won't install. Reviewed-By: Miikka Heikkinen
* | | Fix the tst_QFileInfo::canonicalFilePath() on windows.Prasanth Ullattil2010-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was trying to load a wrong Win32 function to test the symbolic links on windows. Some Win32 APIs have to be resolved against either a Wider Character version('W') or an ANSI version('A'), the function names without these character appended are usually '#define's in the header files. Reviewed-by: Zeno Albisser
* | | Make QFileInfo use the new filesystemengineThomas Zander2010-09-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The creation of a QAbstractFileEngine derived class will now be avoided if the file we are watching is on the native file system and from then on all access will be through the direct API Notice that for QFileInfo::path, isRelative, filePath, fileName, baseName, completeBaseName, completeSuffix and suffix we now use the QFileSystemEntry instead of asking the engine. This means that some buggy or just weird user provided engines no longer get used and as such we might not be bug compatible. Reviewed-by: João Abecasis
* | | Fixes for tst_qfileinfoShane Kearns2010-09-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use case insensitive comparison on symbian/windows for the absFilePath test. - it expected "c:\\home\\andy\\tmp.txt" to resolve to "C:/home/andy/tmp.txt" - but there is no reason for the drive letter to be changed to uppercase - however it's not wrong either since the FS is case insensitive. Enable isWritable test on symbian - it was skipped for no good reason Reviewed-By: joao
* | | Disable tst_qfileinfo symlink tests on symbianShane Kearns2010-09-081-0/+7
| | | | | | | | | | | | Reviewed-By: joao
* | | QDir and QFileInfo shouldn't lose properties when detachingJoão Abecasis2010-08-311-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Refactor QFileInfoPrivate::Data (Round 2)Prasanth Ullattil2010-08-251-8/+9
|/ / | | | | | | | | | | | | The QFileInfoPrivate::Data member class is removed now. All the methods moved to QFileInfoPrivate. QFileInfoPrivate becomes a QSharedData type. Reviewed-by: Joao