summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QFileSystemEngine::id/Windows: Fix use with directoriesThiago Macieira2017-07-221-3/+10
| | | | | | | | | | | The Microsoft documentation says that CreateFile cannot be used to create directories, so you can only use it on a directory with OPEN_EXISTING and FILE_FLAG_BACKUP_SEMANTICS. This commit implements that. Change-Id: I658f552684924f8aa2cafffd14cfc0e5660a4a62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFile::rename: use the open file's ID, instead of using the file nameThiago Macieira2017-07-181-2/+8
| | | | | | | | | | | To do that, we needed to add virtual id() in QAbstractFileEngine and override it in QFSFileEngine. It might be useful to return other types of IDs for the other file engines, but this commit does not attempt that just yet. Change-Id: I1eba2b016de74620bfc8fffd14ccafe0762b3c38 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemEngine::id/Windows: Use the volume ID tooThiago Macieira2017-07-181-5/+7
| | | | | | | | | | | The MS documentation says that the high/low parts uniquely identify a file within a system, but they actually mean the filesystem. The details on how it's allocated make that clear. So we need the volume identifier. Change-Id: I658f552684924f8aa2cafffd14cfc03c5a09c0e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Avoid sharing violation in QFileSystemEngine::id on WindowsThiago Macieira2017-07-071-3/+3
| | | | | | | | | We can't open a file for reading if the file is open by another process (or by ourselves) without sharing permitted. So ask for no access just so we can get a handle to it. Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-14/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-181-36/+1
| | | | | | | | | | | | | | | | [ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1. Task-number: QTBUG-57288 Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Simplify fileTimeToQDateTime() by having it return a UTC timeEdward Welbourne2017-01-111-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids so many complications. The prior code, using SystemTimeToTzSpecificLocalTime(), lead to unhelpful results when the QDateTime() implementation used MS-POSIX's defective mktime(). Although SystemTimeToTzSpecificLocalTime() is actually more correct, we were getting inconsistent results by mixing the two: and eliminating the use of mktime() turns out to be decidedly tricky. So, to avoid inconsistency, stick with a UTC time (which is what FILETIME is defined as). Change QFileInfo's methods to explicitly convert .toLocalTime() where appropriate and document that these methods do indeed return local time (as we conjecture has been taken for granted by callers). Also added a regression test for the reported case of this going wrong. A time-stamp from before Russia's (permanent, not DST) change of TZ could end up inconsistently handled between file-system meta-data and raw date-time APIs, due to cross-talk between different MS-Win time APIs. [ChangeLog][QtCore][QFileInfo] Made sure that all file lifecycle times are in local time. This was probably true before, but is now explicit. Task-number: QTBUG-48306 Change-Id: Ic0b99d25c4168f623d31967bc60665c0c4f38a14 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace usages of QSysInfo with QOperatingSystemVersionJake Petroules2016-09-201-2/+2
|/ | | | | | | | | Occurrences which should simply be removed entirely (due to always being true or always being false as a result of the current OS support matrix) have been left untouched for now. Change-Id: I86d5a084cb84bc28fefc5191d40924de1439b3de Reviewed-by: Liang Qi <liang.qi@qt.io>
* Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-08-181-1/+1
| | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef. Change-Id: I3c485f89352a1ee66076fba74fd486da9349c354 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CoreLib: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-07-021-4/+6
| | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-231-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * Windows: Suppress error dialogs when querying logical drives.Friedemann Kleint2016-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the error mode flag SEM_NOOPENFILEERRORBOX when calling Win32 API GetLogicalDrives() to prevent it from prompting to insert media as does QStorageInfoPrivate::mountedVolumes(). Task-number: QTBUG-18729 Task-number: QTBUG-32457 Change-Id: I5c76afbb5bf2ec5ec84194650c316fe531578d5b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-2/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-2/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| | * Fix QFile::copy() on WinRT.John Preston2016-05-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of QFileSystemEngine::copyFile() uses CopyFile2() as if it is CopyFile() function, but CopyFile2() returns HRESULT, not BOOL. So the success should be checked by "SUCCEEDED()" instead of "!= 0". Current implementation does exactly the opposite because S_OK == 0. Change-Id: I0677d54447d22366fb2031e0b928a3d10e24c0ed Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | Remove dynamic loading of functions that are present in Windows Vista onwards.Friedemann Kleint2016-04-191-50/+18
| | | | | | | | | | | | | | | | | | | | | | | | Invoke functions directly and add libraries accordingly. Task-number: QTBUG-51673 Change-Id: Ie19d1fc6aa932d6e93a7d310048e4c162fb81046 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | QtCore: Remove Windows CE.Friedemann Kleint2016-03-301-142/+40
|/ / | | | | | | | | | | | | | | | | Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-9/+24
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * winrt: msvc2015: refactor file handlingMaurice Kalinowski2016-01-211-9/+24
| | | | | | | | | | | | | | | | | | | | | | msvc2015 reintroduced a couple of functions from the win32 API towards WinRT. Enable usage of those and simplify the file system engine. Furthermore update the autotests. Change-Id: I9eafffba0ddfd05917c184c4a6b9e166f86d71d9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Introduce QT_NO_WINCE_SHELLSDK for WEC builds.Bjoern Breitmeyer2015-07-061-1/+4
| | | | | | | | | | 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>
* Simplify permission flag handling a bitKonstantin Ritt2015-06-251-4/+2
| | | | | | Change-Id: I753f7a398c39e7300821658f27e4813c591eebc3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QFileSystemEngine: optimize from...(qgetenv())Marc Mutz2015-04-161-5/+5
| | | | | | | | | | | Use the QByteArray overload, which no longer calls strlen(), but uses the QByteArray length. No danger of embedded NULs, because environment variables cannot contain NULs. Change-Id: I33fe479adfce2624c7042608e8e0a5c5b54a85db Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* remove HSTRING instancesMaurice Kalinowski2014-06-031-6/+6
| | | | | | | | | | | HSTRING needs to be released or handles will be leaked. Instead use HString which takes care of resource management on its own. Task-Number: QTBUG-38115 Change-Id: I2c767776c1f22f45acd8dd77b693f30d63d894b9 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Windows XP target support for MSVC >= 2012Joerg Bornemann2014-04-031-2/+2
| | | | | | | | | | | | | | | | | | To enable windows xp support, we must do two things: 1. linker flag must be /SUBSYSTEM:CONSOLE,5.01 or /SUBSYSTEM:WINDOWS,5.01. For x64, the version is 5.02. 2. Do not use Windows Kit 8. Win SDK v7.1A is recommended. Prepend the right include paths and lib paths to INCLUDE and LIB before building. The Windows XP target support is enabled by passing "-target xp" to configure. Task-number: QTBUG-29939 Change-Id: I84c8439606cc2a9d27d64947702846faa4f1e4a2 Reviewed-by: Lucas Wang <wbsecg1@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix creating directory hierarchy for WinRTMaurice Kalinowski2014-03-201-0/+14
| | | | | | | | | | | | | | mkpath was not working consistently on WinRT. The reason is that createDirectory() starts from C:/ which is outside the sandbox and an illegal access error has been returned. In case the chunk is still inside the "known" writable area, we continue to the next chunk. Known writable is derived from QStandardPaths. All but Temp are children of the DataLocation on WinRT. Task-number: QTBUG-35472 Change-Id: I3b4ab390bd321285da51d02f5eeaf06da4d56298 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* fix directory separators for WinRTMaurice Kalinowski2013-11-121-1/+1
| | | | | | | internally we always use forward slashes Change-Id: I0573d63b993bb76bc5798ee060fe9bdfb7304658 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* change to basic file info on WinRTMaurice Kalinowski2013-11-121-11/+16
| | | | | | | | | FILE_FULL_DIR_INFO failed under certain circumstances on WinRT and provides far more information than required. Hence prefer the basic version in every case and standard for files with size description. Change-Id: I63f1365f83cdd5d69f81278411f822dbd361fa92 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Refactor plugin loading for WinRTMaurice Kalinowski2013-11-051-0/+30
| | | | | | | | | | | | | | | | | Specify the root directory to be the package root. Only plugins inside the root can be opened (actually also only files). Furthermore current defaults to the package root now, which in most cases is identical to previous behavior. When attempting to load a plugin the path can either be specified in host format "C:/..." or as plugin absolute "/platforms/...". Check for both, with preference of latter case, like when qt.conf is used with / being used as plugin path. Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-10-241-4/+10
|\ | | | | | | Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
| * Windows: Capture last error right after CreateDirectory() in QFileSystemEngine.Friedemann Kleint2013-10-171-4/+10
| | | | | | | | | | | | | | | | | | | | | | Custom allocators invoked by freeing the QString contents might change it. Task-number: QTBUG-34046 Task-number: QTBUG-32314 Change-Id: Ied5305c21fcce228448fe565899163997536ea7a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Added initial file system support for winrtOliver Wolff2013-10-111-21/+136
|/ | | | | | | | | | | | | | 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>
* Windows: Fix compilation with MinGW-64, gcc 4.8.1Friedemann Kleint2013-08-291-1/+5
| | | | | | | A definition for FILE_ID_128 was added. Change-Id: Ifdfe5da1b15a90afdf5cf09d92838a04b1cf5c19 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* QDir::mkpath shouldn't fail if parent directory denies accessShawn Rutledge2013-07-111-1/+2
| | | | | | | | | | | The fix for QTBUG-30046 introduced this regression on Windows, which meant that it became impossible to create a directory anywhere under c:\Users for example, because each user only has permission to see his own directory. Task-number: QTBUG-32314 Change-Id: I1b35433265934d4978d4b0c23a946c3f920c710d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix QDir::mkpath failing for drive paths on WindowsKai Koehne2013-06-241-0/+4
| | | | | | | | | | | | This fixes a regression introduced in 3e2cd8ef6f1ce4f467. We shouldn't try to call mkdir for just a drive letter. Task-number: QTBUG-31862 Change-Id: I56035857aec03f9f1cceef62e82f372486b7737b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* fix QFileSystemEngine::createDirectory race conditionv5.1.0-rc1Shawn Rutledge2013-06-141-7/+6
| | | | | | | | | | | | | | | | | | | | | | During a call to QDir::mkpath(), the same path could be created by another process, in which case the OS mkdir will fail with EEXIST. But the docs for mkpath() state that it's not an error if it already exists, whereas for mkdir() it is an error. So QFileSystemEngine::createDirectory should accept the EEXIST error silently if it occurs while creating the sequence of parent directories and the final leaf directory, but should fail if EEXIST happens when it was called from QDir::mkdir(), which is when the createParents parameter is false. We assume the operating system mkdir() and CreateDirectory() are atomic, so there should be no race condition in QDir::mkdir(). It's not necessary for mkpath() to call stat() at each level, only to check whether an existing entry is a directory or a file. Also added to the autotest to verify that if the path is an existing file, creating a dir with the same name will fail in either mkdir or mkpath. Task-number: QTBUG-30046 Change-Id: I926352f10654fdf3b322c8685bb85ad8b8844874 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* re-enable QT_NO_LIBRARY support on WindowsOswald Buddenhagen2013-03-141-0/+2
| | | | | | | | the exclusion came in with the original winCE port. the reason for this is not clear. Change-Id: I8cd59d27fcc292186e5eef3238f56bad2cf320c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix renaming of files that differ only in case.Friedemann Kleint2013-01-151-0/+75
| | | | | | | | | | | | | | | | This currently fails on case-insensitive file systems since the check for existence then triggered and indicated "file already exists". Check on the file id (inode or file id) whether the target file is really a different file for a case-changing rename. Task-number: QTBUG-3570 Change-Id: I1b2d40850692e02142ee23d2c753428de00aedc6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not detect directories ending in ".lnk" as link files.Friedemann Kleint2012-11-231-1/+6
| | | | | | | Task-number: QTBUG-21863 Change-Id: I70b661fa5fcaba1293a80c971c506798826f5b23 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.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>
* Fixed: QFileInfo::lastModified() returning wrong value.Markku Heikkila2012-09-131-1/+4
| | | | | | | | | | | | | | | Fixed so that empty QDateTime is returned for non existing file. Fixed also created() and lastRead() to return empty QDateTime for non existing file. QFileSystemEngine::fillMetaData() returned true for non existing files. This was also corrected. Task-number: QTBUG-25811 Change-Id: I523eb99e4405b4b813b2950f85cc646239181d07 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Christian Stromme <christian.stromme@nokia.com>
* Windows: Do not return short path names for QDir::tempPath().Friedemann Kleint2012-07-171-1/+11
| | | | | | | | WinAPI GetTempPath() sometimes returns short names for C:/Users/<user>/AppData/Local/Temp. Change-Id: I33f991acc06e652ccd484d36a5a384eb776f8395 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix QFile::permissions for long filenamesShane Kearns2012-05-161-1/+1
| | | | | | | | | | When qt_ntfs_permission_lookup is used, QFile::permissions failed for files with long filenames. Also created a test case for this API, which revealed another bug. Task-number: QTBUG-25629 Change-Id: I73b7676a9d059c0e782b3f701b2e6bbc92f671ed Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.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>
* 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>