summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfsfileengine_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce QT_NO_WINCE_SHELLSDK for WEC builds.Bjoern Breitmeyer2015-07-061-2/+2
| | | | | | | | | | ShellSDK isn't always available in WEC2013 and sadly the define that should tell us if it is isn't enough as the headers would be in the SDK but the lib doesn't need to have the symbols. Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Call MoveFile() anyway if the delete failed because it did not existAndy Shaw2015-03-041-1/+1
| | | | | | | | | | | | | | | | Since the new filename might not yet exist and DeleteFile() will fail if the new file does not exist then MoveFile() should still be called. Change-Id: Id4576ade079ad8593f824b7100bb0d94aec1fa0a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-1/+1
|\| | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Delete the file that we will move to not the new file before movingAndy Shaw2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | In the case of Windows Embedded Compact we need to delete the destination file before doing the move if DeleteAndRenameFile has failed since MoveFile will fail if the destination file exists. Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
|/ | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* 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>
* Fix nativeRead() for maxlen greater than UINT_MAXLars Knoll2014-08-291-4/+4
| | | | | | | | | | Don't truncate the maxlen to a DWORD. Instead read all data incrementally up t maxlen. Task-number: QTBUG-27796 Change-Id: I21c34d11046f1106244dcd77420cc472e7240e68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QFileDevice::MemoryMapFlags::MapPrivateOption flag.Simon Sasburg2014-07-231-5/+15
| | | | | | | | | | Passing this flag to QFileDevice::map() will allow writes to the mapped memory without modifying the file that was mapped. These writes will be lost when the memory is unmapped. Change-Id: I7d46b044fc370585de8c06fdb4059f1f1be12d7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix out-of-range shiftingMaurice Kalinowski2014-04-091-2/+2
| | | | | | | offsetHi needs to be casted first before shifting. Change-Id: I29c773dd13d5b16042629604015bbf5645fab861 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Fix offset calculation on WinRTMaurice Kalinowski2014-04-011-0/+1
| | | | | | | | | | | | | According to MSDN "the offset must be a multiple of the allocation granularity". We use this already for the win32 version by splitting into offsetLo and offsetHi. However, we did not convert it back to the correct argument passed for MapViewOfFileFromApp. Now all auto-tests for mapping succeed. Task-number: QTBUG-37773 Change-Id: I7e43f906cb93164b58f4e5e3f88388cdace865d7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Added initial file system support for winrtOliver Wolff2013-10-111-16/+57
| | | | | | | | | | | | | | While some functionality is not available for winphone (QFileSystemEngine::tempPath), some functionality can be fully supported. Other cases like checking for stale processes which is needed by QLockFile cannot be covered that easily as obtaining information about other processes is limited due to sandboxing. Change-Id: I9ea80ae2b421eea1ddfd4c5bc2f4b6f8adaee85f Done-with: Kamil Trzcinski Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* When the file could not be accessed, we should return 0 for the sizeAndy Shaw2013-06-111-0/+1
| | | | | | | | | | | | | Some functions rely on the size to be sure that the file can be read from. Therefore when nativeSize() fails to access the file we should return 0 instead of a random size to prevent these functions from acting as if there is a valid file to read from. Task-number: QTBUG-31571 Change-Id: I589fc199760ba40ef2e63047b2f226cb196f7e56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Fix QFSFileEngine::renameOverwrite for Windows Embedded Compact 7.Janne Anttila2013-04-151-0/+26
| | | | | | | | | | | | | Windows Embedded Compact 7 does not have MoveFileEx, simulate it with the available file I/O functions [1]. For more details please check the comments in source code. [1] http://msdn.microsoft.com/en-us/library/ee490588.aspx Change-Id: Ib0fb0ba84e2d070dee2f633af1b81bec132f4c17 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
* renameOverwrite: don't allow cross-partition copyingDavid Faure2013-03-221-1/+1
| | | | | | | This matches the Unix behavior, and ensures atomicity (as required by QSaveFile) Change-Id: I54ec98bcd7a0714ca968cad627a5e4d684fd7af6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * Fix CreateFileMapping() error handlingPeter Kümmel2013-02-281-3/+4
| | | | | | | | | | | | | | | | | | | | CreateFileMapping() returns NULL in case of an error. The patch corrects the wrong testing on INVALID_HANDLE_VALUE, and sets NULL for invalid handles. Change-Id: Iaab4945ed88ee92bbf9a0871e95a5820dd1a56ed Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add syncToDisk() to QAbstractFileEngine.David Faure2013-01-141-4/+14
| | | | | | | | | | | | | | This is needed by QSaveFile. Change-Id: I07ebdfd832c0be65c26f0aed1bb7852ac33135ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add renameOverwrite() to QAbstractFileEngine.David Faure2013-01-141-0/+11
|/ | | | | | | | | | | | | QFSFileEngine::rename() on Windows doesn't overwrite the existing destination. Keep that unchanged (it's the desired behavior in QFile::rename), and provide cross-platform rename-overwrite behavior in the new method. This is needed by QSaveFile. Change-Id: I5e753d289d8a53692530a48a1783d62e26169cdc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-071-2/+2
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-051-2/+2
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove macro _POSIX_ from Win32 special fileDebao Zhang2012-04-051-1/+0
| | | | | | | | | | | | | | | | | | Macro _POSIX_ doesn't used by this two files. And it will casued compile errors under VS2005/VS2008/VS2010 such as: Error 19 error C3861: ‘_fileno’: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 443 Error 20 error C3861: ‘_fileno’: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 468 Error 21 error C3861: ‘_fileno’: identifier not found c:\Dev\Builds\Qt\qt-everywhere-opensource-src-4.8.1\src\corelib\io\qfsfileengine_win.cpp 607 when we don't use precompiled headers. And this error will triggered when we reomve QT_NO_STL from QtCore. Because stdio.h declares fileno instead of _fileno when _POSIX_ is defined. Change-Id: I9d9031578dac7b7c5f7b77098839723a4bc8bfdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add missing #include <stdio.h> for _filenoThiago Macieira2012-04-041-0/+1
| | | | | | | | | | | | ..\..\corelib\io\qfsfileengine_win.cpp(443) : error C3861: '_fileno': identifier not found ..\..\corelib\io\qfsfileengine_win.cpp(468) : error C3861: '_fileno': identifier not found ..\..\corelib\io\qfsfileengine_win.cpp(602) : error C3861: '_fileno': identifier not found ..\..\corelib\io\qfsfileengine_win.cpp(847) : error C3861: '_fileno': identifier not found ..\..\corelib\io\qfsfileengine_win.cpp(909) : error C3861: '_fileno': identifier not found Change-Id: Ib6bed4814fce162e3065848c835f4774f0cbad01 Reviewed-by: Debao Zhang <dbzhang800@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Drop file-engine abstraction from public APIJoão Abecasis2012-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This abstraction imposed serious performance penalties and is being dropped from the public API. In particular, by allowing file names to be arbitrarily hijacked by different file engines, and requiring engines to be instantiated in order to decide, it imposed unnecessary overhead on all file operations. Another flaw in the design with direct impact on performance is how engines have no way to provide (or retain) additional information obtained when querying the filesystem. In many places this has meant repeated operations on the file system, where useful information is immediately discarded to be queried again subsequently. For Qt 4.8 a major refactoring of the code base took place to allow bypassing the file-engine abstraction in select places, with considerable performance gains observed. In Qt 5 it is expected we'll be able to take this further, reaping even more benefits, but the abstraction has to go. [Dropping this now does not preclude that virtual file systems make an appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a new and improved abstraction.] Forward declarations for QFileExtension(Result) were dropped, as the classes were never used or defined. Tests using "internalized" classes will only fully run on developer builds. QFSFileEngine was removed altogether from exception safety test, as it isn't its intent to test internal API. Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> 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>
* Remove Q_CC_MWERKS.Robin Burchell2012-01-191-1/+1
| | | | | | | | This is no longer supported. Change-Id: I3914f5007595fd699fa1e9a565a0a3f59a0e135e Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Fixed QFile::link behaviour for WinCE devices.Janne Anttila2012-01-131-0/+1
| | | | | | | | | | In WEC7 both arguments given for ScCreateShortcut needs to be given in Windows format. Apparently older WinCE devices has accepted also Unix format but this is not anymore true for WEC7. The Windows format works for older WinCE versions as well. Change-Id: Ic1f394e20bae8ad42acb46929d3ff4af92daf310 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Build fix for WINCE to qfsfileengine_win.cppJanne Anttila2012-01-131-1/+1
| | | | | | | | | | | | | | | QFileSystemEngine::currentPath() returns QFileSystemEntry, but this method expects QString return value. -> Code does not compile for WinCE Switched code to use "QFileSystemEngine::currentPath().filePath()" correspondigly as Windows desktop does if filename does not contain drive letter. This is ok, since WinCE does not support drive letters. Task-number: QTBUG-22499 Change-Id: Ic4935357c40cda30efcd2e1c7d69bf2ef7b31dd0 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* corelib: Remove Q_WS-macros.Friedemann Kleint2011-10-241-5/+0
| | | | | | | | | | | | | | | | | | | | Q_WS_QPA is the only active code path after merging refactor, other Q_WS-macros are no longer used. Enable compilation without -qpa. - Remove Q_OS_MSDOS, Q_OS_OS2 - Remove Q_WS_QWS - Remove/replace definitions/conditionals of Q_WS_XX - Remove qpa branches from profiles - Replace Q_WS_MAC by Q_OS_MAC - Replace Q_WS_MAC && !Q_WS_QPA by Q_OS_MAC && !QT_NO_CORESERVICES - Similarly in profiles: mac:contains(QT_CONFIG, coreservices) - Replace Q_FS_FAT by Q_OS_WIN Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9 Reviewed-by: João Abecasis <joao.abecasis@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/+1008
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