summaryrefslogtreecommitdiffstats
path: root/tests/shared
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-04-26 07:20:10 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-04-26 14:42:23 (GMT)
commit4c577d37d7caaa831e62c5651513656975af3134 (patch)
tree10906beb55b36d5714a89e7f3d4423583ffed7e8 /tests/shared
parentcdd272e525c2e57f5834855305f63f6aee1301ef (diff)
downloadQt-4c577d37d7caaa831e62c5651513656975af3134.zip
Qt-4c577d37d7caaa831e62c5651513656975af3134.tar.gz
Qt-4c577d37d7caaa831e62c5651513656975af3134.tar.bz2
Fix for missing wchar_t pointer casts in filesystem.h
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
Diffstat (limited to 'tests/shared')
-rw-r--r--tests/shared/filesystem.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index cc1781e..079a6dc 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -49,8 +49,12 @@
#include <QFile>
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
-# define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
-# define REPARSE_MOUNTPOINT_HEADER_SIZE 8
+#include <windows.h>
+#include <winioctl.h>
+#ifndef IO_REPARSE_TAG_MOUNT_POINT
+#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
+#endif
+#define REPARSE_MOUNTPOINT_HEADER_SIZE 8
#endif
struct FileSystem
@@ -113,7 +117,7 @@ struct FileSystem
QFileInfo junctionInfo(linkName);
linkName = QDir::toNativeSeparators(junctionInfo.absoluteFilePath());
- GetVolumeInformationW( linkName.left(3).utf16(), NULL, 0, NULL, NULL, NULL,
+ GetVolumeInformationW( (wchar_t*)linkName.left(3).utf16(), NULL, 0, NULL, NULL, NULL,
fileSystem, sizeof(fileSystem)/sizeof(WCHAR));
if(QString().fromWCharArray(fileSystem) != "NTFS")
QSKIP("This seems not to be an NTFS volume. Junctions are not allowed.",SkipSingle);
@@ -126,7 +130,7 @@ struct FileSystem
target.chop(1);
}
QDir().mkdir(linkName);
- hFile = CreateFileW( linkName.utf16(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
+ hFile = CreateFileW( (wchar_t*)linkName.utf16(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL );
QVERIFY(hFile != INVALID_HANDLE_VALUE );