summaryrefslogtreecommitdiffstats
path: root/tests/shared/filesystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shared/filesystem.h')
-rw-r--r--tests/shared/filesystem.h36
1 files changed, 8 insertions, 28 deletions
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index bb9d1948e5..23453054a3 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QT_TESTS_SHARED_FILESYSTEM_H_INCLUDED
#define QT_TESTS_SHARED_FILESYSTEM_H_INCLUDED
@@ -38,7 +13,7 @@
#include <QTemporaryDir>
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#include <winioctl.h>
#ifndef IO_REPARSE_TAG_MOUNT_POINT
#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
@@ -50,6 +25,11 @@
#ifndef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE // MinGW
#define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE (0x2)
#endif
+QT_BEGIN_NAMESPACE
+namespace QTest {
+ static QString uncServerName() { return qgetenv("COMPUTERNAME"); }
+}
+QT_END_NAMESPACE
#endif
// QTemporaryDir-based helper class for creating file-system hierarchies and cleaning up.