summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-172-4/+207
| | | | | | | Functional coverage of QDir, except for trivial shims for deprecated APIs and the QDebug streaming functions. Reviewed-by: joao
* Windows: fix QFile::symLinkTargetShane Kearns2010-11-171-1/+1
| | | | | | Missing return statement Reviewed-by: joao
* Test coverage: test more of QFile APIShane Kearns2010-11-171-0/+18
| | | | | | | | | | | | Adding tests for these functions: symLinkTarget / readLink (static & non static) permissions (static) constructors which take a QObject parent After this, all function of QFile API are tested except encoding/decoding functions and some QT3_SUPPORT inlines in the header. Reviewed-by: joao
* Fix QFile::resize on windows for files opened from a FILE*Shane Kearns2010-11-161-3/+7
| | | | Reviewed-By: joao
* Test coverage: test QFile::resizeShane Kearns2010-11-161-0/+26
| | | | 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 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
* QFile: Fix compilationJoão Abecasis2010-11-161-1/+1
| | | | | | | EACCES was not defined at this point, but it is also not needed, since we know exactly why unmap is failing. Reviewed-by: Shane Kearns
* QFileSystemEngine::resolveUserName and not groupJoão Abecasis2010-11-161-1/+1
| | | | Reviewed-by: Shane Kearns
* Re-enable emulated QFile::map on symbianShane Kearns2010-10-295-38/+37
| | | | | | | | | | | | | Memory mapping of RFile handles is not supported in current symbian OS versions. However the "open C" libraries provide an emulated mmap() implementation which was used by QFile::map in Qt 4.6 release. To avoid breaking applications which rely on this function, QFile::map will now open the file with open C as well in order to use that handle to call mmap(). When symbian implements a file mapping API, we can switch the implementation to use that for RFile handles. Reviewed-By: joao
* Add tests for QFileInfo::owner()Prasanth Ullattil2010-10-272-0/+68
| | | | Reviewed-by: Joao
* Add support for QFileInfo owner() & group() on WindowsPrasanth Ullattil2010-10-271-0/+18
| | | | | | | | | Since windows doesn't have the concept of user and group IDs, the name resolution has to be done differently. If the qt_ntfs_permission_lookup flag is set (default = 0), the user information is retrieved through the NTFS object security information. Reviewed-by: Joao
* Fix qmake compilation on *nix platformsJoão Abecasis2010-10-221-1/+1
|
* Fix errors in the QFileDialog autotestShane Kearns2010-10-201-1/+5
| | | | | | | | | | | | | | | | | | | The filesSelectedSignal() test case was using the Qt source tree as its test directory - however this is not deployed to the device for symbian and windows CE. On symbian, the path evaluates to the root directory, which doesn't meet the conditions of the test (it contains only directories, while the test requires both files and directories to be present) Changed the test to use SRCDIR (on desktops, the source directory of the test code; on symbian/wince the deployed files location) This directory is valid for the test as it contains both files and directories. The hooks() test case crashes on symbian versions prior to symbian^3, because data exports from dlls are not properly supported by the symbian kernel So, this test is skipped for old symbian versions (if a test crashes, then no xml result file is created) Reviewed-By: Markus Goetz
* Fix QFileDialog regression in symbianShane Kearns2010-10-201-1/+1
| | | | | | | | | | | Symbian now follows the same convention as windows, where "c:" means the working directory on the C: drive. As a result, the path "c:/" needs to be passed to QFileInfoGatherer when getting info for the root directory. This code already existed but only enabled for windows - now enabled for symbian as well. Reviewed-By: Markus Goetz
* Fix compile error in tst_qxmlstreamShane Kearns2010-10-202-1/+5
| | | | | | | The same workaround used for other autotests, as the symbian build system doesn't accept \" in DEFINES. Reviewed-By: Janne Koskinen
* Move QDir::fromNativeSeparators call to the QFileSystemEntry constructorShane Kearns2010-10-207-9/+33
| | | | | | | | | | | | The m_filePath should always have / as the separator, while m_nativeFilePath should always have the native separator. Almost every place the constructor is used, the path could be one passed into an API from code outside our control. So it's easier to do the path conversion in the constructor than to have to remember to call fromNativeSeparators in every place a QFileSystemEntry is constructed (especially since unix tests won't reveal any error) Reviewed-By: joao
* Implement seek beyond end of file for symbianShane Kearns2010-10-191-25/+26
| | | | | | | | | | | | | On Symbian, the Seek() function clamps to the end of file position if a position beyond the end of file is given. Also the write functions which take a position silently append at the end of file position if asked to write to a start position beyond EOF. To avoid this behaviour, we don't use seek but rather maintain our own cursor position. When writing, we check if the cursor is beyond EOF and if so extend the file using SetSize() before writing. Reviewed-By: joao
* Document behaviour of QFile::seek when seeking beyond EOFShane Kearns2010-10-191-1/+11
| | | | Reviewed-By: joao
* Fix crashes and hangs in qprocess autotestShane Kearns2010-10-191-1/+7
| | | | | | | | | | | | The qprocess autotest launches various sub processes and checks their results, but this lacked error handling. Added a QVERIFY when opening files (if fopen returned NULL, the test fails instead of crashing) Added a 10s guard when waiting for a subprocess to create a file - previously this loop did not terminate if the subprocess failed. Reviewed-By: Markus Goetz
* Autotest for seeking beyond end of file and then writingShane Kearns2010-10-191-0/+31
| | | | | | | | | | | File engine refactor caused a regression in the TIFF image codec, as QFile::seek() previously worked like lseek() / fseek() in posix. But on symbian the native RFile::Seek api clamps to the end of the file if you attempt to seek beyond there. This test checks seek behaviour in the appropriate place, the QFile auto test. Reviewed-By: joao
* Fix QFileInfo("").exists() regression for symbianShane Kearns2010-10-181-1/+3
| | | | | | | Because RFs::Entry("") gets the entry for the current directory, we need to explicitly check for empty strings and treat as a non existant file. 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 crash in QApplication auto testShane Kearns2010-10-181-0/+3
| | | | | | | | | | | | The pointer is lazily initialised by QWidget, but becomes invalid after the application is destroyed. In the QApplication autotest, QApplication is created and destroyed many times in the same thread (while in normal use it is created at startup and destroyed on exit) As a result, the pointer which is stored in global data became stale and caused a crash due to calling functions on a deleted object. Reviewed-By: Jason Barron
* Fix for qfileinfo isExecutable test case.Shane Kearns2010-10-182-3/+3
| | | | | | | | 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 for QFile::copy failing silently with relative pathsShane Kearns2010-10-181-2/+3
| | | | | | | | CFileMan doesn't support . and .. in relative paths. Therefore, paths are converted to absolute first. Also, the error was being ignored which has been fixed. Reviewed-By: joao
* Correct errors in the qimagereader autotestShane Kearns2010-10-181-1/+9
| | | | | | | | | | | | | | | First, pgm and pbm formats need the same exception given to ppm format as they are subtypes of the same format. (as text based image formats they are vulnerable to line end differences) Second, a workaround for the readFromDevice test case hanging on the symbian emulator. The test expects to be able to send a whole image to a socket and have this fit within the send/receive buffers of the TCP stack. At least for the emulator's winsock backend, this hangs the autotest inside a blocking write. On the Nokia 5800, the test passed so it's currently skipped only for the emulator. Reviewed-By: Jason Barron
* Merge branch 'earth/file-engine-refactor' of ↵Shane Kearns2010-10-120-0/+0
|\ | | | | | | scm.dev.troll.no:qt/qt-file-engines-refactor into earth/file-engine-refactor
| * Test QDir::mkdir/mkpath return codesThomas Zander2010-10-111-0/+13
| |
| * Fix caching of metadata in QDir to not change behaviorThomas Zander2010-10-111-3/+3
| | | | | | | | | | | | | | In 4.7 and before a QDir::exists() always stats and a refresh() call would flush metadata, restore this behavior again. Reviewed-by: Prasanth Ullattil
| * Add test to test QDir caching behavior.Thomas Zander2010-10-112-2/+15
| | | | | | | | | | | | Also fix the qfileenginemodel test to be less fragile Reviewed-by: Prasanth Ullattil
* | Fix deployment for examples and testsShane Kearns2010-10-1270-73/+73
| | | | | | | | | | | | | | | | | | | | | | 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
* | Test QDir::mkdir/mkpath return codesThomas Zander2010-10-121-0/+13
| |
* | Fix caching of metadata in QDir to not change behaviorThomas Zander2010-10-121-3/+3
| | | | | | | | | | | | | | In 4.7 and before a QDir::exists() always stats and a refresh() call would flush metadata, restore this behavior again. Reviewed-by: Prasanth Ullattil
* | Add test to test QDir caching behavior.Thomas Zander2010-10-122-2/+15
| | | | | | | | | | | | Also fix the qfileenginemodel test to be less fragile Reviewed-by: Prasanth Ullattil
* | Fix return value for QDir::mkdir on symbianShane Kearns2010-10-121-1/+4
| | | | | | | | | | | | | | | | Qt 4.7 behaviour was to return false when directory already exists for mkdir but true when directory already exists for mkpath. This change makes symbian do that in master, even though it's inconsistent. Reviewed-By: Thomas Zander
* | Fix compilation of two autotestsShane Kearns2010-10-122-0/+9
| | | | | | | | | | | | | | | | These tests did not link when QT_BUILD_INTERNAL was not defined, as one of the private headers was causing QFileInfoGatherer::~QFileInfoGatherer to be referenced Reviewed-By: Thomas Zander
* | Update documentation of QDir to reflect Qt 4 behaviourShane Kearns2010-10-121-0/+6
| | | | | | | | Reviewed-By: Thomas Zander
* | Use QSystemError to return errors from QFileSystemEngineShane Kearns2010-10-1214-139/+120
| | | | | | | | | | | | | | | | | | | | Testing done: win32-msvc2008 and Mac OS X - qfile, qfileinfo, qdir, qdiriterator, qtemporaryfile autotests symbian-sbsv2 - qtcore, qtgui, qtxml autotests win32-g++ - compilation test for qmake Reviewed-By: Thomas Zander
* | Update DEF filesShane Kearns2010-10-087-22/+353
| | | | | | | | Reviewed-By: Trust Me
* | Merge remote branch 'qt/master' into earth/file-engine-refactorShane Kearns2010-10-08166-2008/+5343
|\ \ | | | | | | | | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * \ Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-10-088-58/+90
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix crash when using Q_GLOBAL_STATIC(QWidget...) Removed the need for S60main.rsc resource file in Symbian.
| | * \ Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-088-58/+90
| | |\ \
| | | * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-10-088-58/+90
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix crash when using Q_GLOBAL_STATIC(QWidget...) Removed the need for S60main.rsc resource file in Symbian.
| | | | * | Fix crash when using Q_GLOBAL_STATIC(QWidget...)Jason Barron2010-10-072-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If Q_GLOBAL_STATIC is used with a QWidget (or subclass) then the destructor of QWidget will be executed after the destructor of QApplication. Since ~QApplication() destroys the S60 environment and the trap handler, we need to be sure that if QApplication is destroyed, we do not attempt to use anything from the S60 environment. This includes RWsSession and the trap handler. The fix is to avoid flushing the WSERV buffer if QApplication has been deleted already. Reviewed-by: axis
| | | | * | Removed the need for S60main.rsc resource file in Symbian.Janne Anttila2010-10-077-57/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt upgrade was failing since the s60main.rsc is being locked by S60 application framework. And when installer detects that old version of Qt has already been installed it first tries to uninstall the old one and then install the new one. The uninstallion failed since the file was locked by the running Qt application. It should be noted that this patch fixes the Qt upgradibility only for Qt versions where patch is included. I.e. the versions before 4.7.2 need a different mechanism to be upgradable. This different mechanism is based on partial upgrade SIS packages as described in QT-4052. Task-number: QT-3471 Reviewed-by: Axis