diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-14 09:22:22 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-09-14 09:22:22 (GMT) |
commit | 15dbe69d9a174a85aed297b2e93d0d9fb79d12e8 (patch) | |
tree | 4d3e481c2ff05e7fe1637eb13078b1bae5bb82e8 | |
parent | 59ad6b33ac73b5981c9b3a9ba87374d33fb17228 (diff) | |
download | Qt-15dbe69d9a174a85aed297b2e93d0d9fb79d12e8.zip Qt-15dbe69d9a174a85aed297b2e93d0d9fb79d12e8.tar.gz Qt-15dbe69d9a174a85aed297b2e93d0d9fb79d12e8.tar.bz2 |
Fix the tst_QFileInfo::canonicalFilePath() on windows.
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
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index cced207..e4aa0d3 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -608,7 +608,7 @@ void tst_QFileInfo::canonicalFilePath() #ifdef Q_OS_WIN typedef BOOL (WINAPI *PtrCreateSymbolicLink)(LPTSTR, LPTSTR, DWORD); PtrCreateSymbolicLink ptrCreateSymbolicLink = - (PtrCreateSymbolicLink)QLibrary::resolve(QLatin1String("kernel32"), "CreateSymbolicLink"); + (PtrCreateSymbolicLink)QLibrary::resolve(QLatin1String("kernel32"), "CreateSymbolicLinkW"); if (!ptrCreateSymbolicLink || ptrCreateSymbolicLink((wchar_t*)QString("res").utf16(), (wchar_t*)QString("resources").utf16(), 1) == 0) { @@ -621,7 +621,7 @@ void tst_QFileInfo::canonicalFilePath() QCOMPARE(QFileInfo("file1").canonicalFilePath(), currentPath + "/resources/file1"); QCOMPARE(QDir::setCurrent(currentPath), true); - QFile::remove("res"); + QDir::current().rmdir("res"); #endif } |