summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfileinfo
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-131-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| * Added $$MW_LAYER_SYSTEMINCLUDE to some autotestsMiikka Heikkinen2010-08-061-0/+1
| | | | | | | | | | | | | | These autotests couldn't find e32svr.h in Symbian^3 env because that header has moved. Reviewed-by: TrustMe
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Attempt to fix build failure with msvc200{5,8} on Windows XP.Aaron McCarthy2010-07-141-1/+1
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * Various fixes to autotests when using the symbian/linux-armcc mkspec.axis2010-06-291-1/+1
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-06-011-1/+1
|\ \ | |/
| * escape backslashesOswald Buddenhagen2010-05-261-1/+1
| | | | | | | | this makes windows-style path specs *ugly*. that's intentional. :-P
* | Fix Mac-specific tests about the hiddenFabien Freling2010-05-121-2/+24
| | | | | | | | | | | | attribute. Create a new test only for Mac.
* | Fix the hidden status check for a file onFabien Freling2010-05-111-0/+5
| | | | | | | | | | | | | | | | | | | | Mac OS X. Add some more tests that would have failed before the fix. Remove test files after the run. Task-number: QTBUG-6619 Reviewed-by: Morten Sorvig
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-05-041-2/+0
|\ \ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Revert "Temporarily disable tests that use createNtfsJunction()"
| * | Revert "Temporarily disable tests that use createNtfsJunction()"Zeno Albisser2010-05-041-2/+0
| | | | | | | | | | | | This reverts commit 498786a2ab27680b27f8e57b422ff8f32f0c3790.
* | | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-05-041-3/+3
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (166 commits) Fix the include header <qstring.h> -> <QtCore/qstring.h> bye bye QMakeProjectEnv short-cut evaluation inside if() tests eliminate special splitting of INCLUDEPATH and DEPENDPATH do not env-expand cache file path s/QMAKE_FRAMEWORKDIR_FLAGS/QMAKE_FRAMEWORKPATH_FLAGS/ s/INCPATH/INCLUDEPATH/ s/QMAKE_RPATH/QMAKE_LFLAGS_RPATH/ teach configure QMAKE_LFLAGS_RPATH (in addition to obsolete QMAKE_RPATH) warn about usage of deprecated variables warn about using non-lowercased replace $$function()s add -Wdeprecated option (on by default) make QMakeProject::isEmpty() consider legacy mappings document some functions' scope fix $$size() not using function-scoped variables doc: Fixed some qdoc errors. qdoc: Added breadcrumbs for namespaces. Autotest: check that we receive key events on toplevel widgets Cocoa: key events stopped working Fix desktopservices demo missing icon in Symbian ...
| * Fix compilation errors in tst_qfileinfoShane Kearns2010-04-291-3/+3
| | | | | | | | Reviewed-by: Gareth Stockwell
* | avoid infinite recursion in canonicalized() if cwd is a symlinkRitt Konstantin2010-04-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | if current directory is a symlink to another directory on the same drive (the simplest example; say, c:\current\dir is a symlink to c:\target) then the first valid prefix for "c:\target" in canonicalized() is "c:" (NOT "c:\") and would be treated like "c:\current\dir" again...and again... until stack overflow :) Merge-Request: 494 Task-number: QTBUG-7610 Reviewed-by: Zeno Albisser
* | Temporarily disable tests that use createNtfsJunction()Zeno Albisser2010-04-291-0/+2
| | | | | | | | | | | | | | | | This function uses to/fromWCharArray() which uses wchar_t pointer in its signature. This currently makes the CI system complain about unresolved symbols when using vs2005. Reviewed-by: TrustMe
* | Repositioned _WIN32_WINNT define in tst_qfileinfo and tst_qdirZeno Albisser2010-04-271-3/+1
| | | | | | | | | | | | | | 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 for missing wchar_t pointer casts in filesystem.hZeno Albisser2010-04-261-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | Further a dummy row has been added to ntfsJunctionPointsAndSymlinks_data to make sure the test will not fail in case the _data function gets skipped. This was cause by previous commit 242845a50410e7b97206f6374408a2e53b5c29fb Reviewed-by: Joao
* | Added support for symlinks and junction points on WindowsZeno Albisser2010-04-231-1/+112
|/ | | | | | | | | | | | | | | | | Since ntfs symlinks (not .lnk files) can use relative paths to targets, support for relative links needed to be added. Directory junctions can also be used to mount another filesystem directly into an existing folder. Such junctions in that case use the volume id of the target volume for the link path. Therefor this commit also includes an implementation for resolving volume ids. To be independent of existing directories in test code i added a function to create own junction points. Reviewed-by: Joao Task-number: QTBUG-9009, QTBUG-7036
* Autotest: increase wait time to 3s on Windows to bypass 2s-granularity ↵Thiago Macieira2010-04-171-1/+1
| | | | limitation