diff options
author | Marcin Zdunek <[email protected]> | 2023-07-14 14:45:17 +0200 |
---|---|---|
committer | Marcin Zdunek <[email protected]> | 2023-07-24 06:59:04 +0000 |
commit | 1e3d500463e3484effd039d06039edeed6770ffc (patch) | |
tree | 5cbc712d06c58e628b70110b847c5987ee94f33c | |
parent | 5a0c2cabcdadd4fc9c6ea2361513a987518ec741 (diff) |
Fix issue with qstorageinfo_unix.cpp not working on Vxworks
Problem was, that qstorageinfo_unix.cpp is using sys/statvfs.h header, but this header is not available in Vxworks(Vxworks has
its own /sys/ directory).As this feature is not there in Vxworks, we are using a "_stub" file to omit whole implementation.
This is the same solution as it was used for Qt5 for Vxworks.
Change-Id: I1bc5a576e63f403c923cbc93571967184677305f
Reviewed-by: Thiago Macieira <[email protected]>
-rw-r--r-- | src/corelib/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/corelib/io/qstorageinfo_stub.cpp | 31 |
2 files changed, 37 insertions, 3 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index fe6024875fd..a7798a18f77 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -1022,13 +1022,13 @@ qt_internal_extend_target(Core CONDITION HAIKU AND NOT ANDROID ) qt_internal_extend_target(Core - CONDITION UNIX AND NOT LINUX AND NOT APPLE AND NOT HAIKU AND NOT ANDROID + CONDITION UNIX AND NOT LINUX AND NOT APPLE AND NOT HAIKU AND NOT ANDROID AND NOT VXWORKS SOURCES io/qstandardpaths_unix.cpp io/qstorageinfo_unix.cpp ) -qt_internal_extend_target(Core CONDITION LINUX AND NOT ANDROID +qt_internal_extend_target(Core CONDITION LINUX AND NOT ANDROID AND NOT VXWORKS SOURCES io/qstandardpaths_unix.cpp io/qstorageinfo_linux.cpp @@ -1145,7 +1145,10 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_sysv_sem qt_internal_extend_target(Core CONDITION VXWORKS SOURCES - kernel/qfunctions_vxworks.cpp kernel/qfunctions_vxworks.h + io/qstandardpaths_unix.cpp + io/qstorageinfo_stub.cpp + kernel/qfunctions_vxworks.cpp + kernel/qfunctions_vxworks.h ) qt_internal_extend_target(Core CONDITION QT_FEATURE_cborstreamreader diff --git a/src/corelib/io/qstorageinfo_stub.cpp b/src/corelib/io/qstorageinfo_stub.cpp new file mode 100644 index 00000000000..2275f16258b --- /dev/null +++ b/src/corelib/io/qstorageinfo_stub.cpp @@ -0,0 +1,31 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include "qstorageinfo_p.h" + +QT_BEGIN_NAMESPACE + +void QStorageInfoPrivate::initRootPath() +{ + Q_UNIMPLEMENTED(); + rootPath = QString(); +} + +void QStorageInfoPrivate::doStat() +{ + Q_UNIMPLEMENTED(); +} + +QList<QStorageInfo> QStorageInfoPrivate::mountedVolumes() +{ + Q_UNIMPLEMENTED(); + return QList<QStorageInfo>(); +} + +QStorageInfo QStorageInfoPrivate::root() +{ + Q_UNIMPLEMENTED(); + return QStorageInfo(); +} + +QT_END_NAMESPACE |