From 1e3d500463e3484effd039d06039edeed6770ffc Mon Sep 17 00:00:00 2001 From: Marcin Zdunek Date: Fri, 14 Jul 2023 14:45:17 +0200 Subject: [PATCH] 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 --- src/corelib/CMakeLists.txt | 9 +++++--- src/corelib/io/qstorageinfo_stub.cpp | 31 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 src/corelib/io/qstorageinfo_stub.cpp 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 QStorageInfoPrivate::mountedVolumes() +{ + Q_UNIMPLEMENTED(); + return QList(); +} + +QStorageInfo QStorageInfoPrivate::root() +{ + Q_UNIMPLEMENTED(); + return QStorageInfo(); +} + +QT_END_NAMESPACE