diff options
author | Dennis Oberst <[email protected]> | 2024-01-17 11:28:11 +0100 |
---|---|---|
committer | Dennis Oberst <[email protected]> | 2024-01-22 08:09:50 +0000 |
commit | 9e4f24e7491ebd8e26a7ca4d56046e558b57154c (patch) | |
tree | a80111eadd01f18326c37131dec1a7a71f273c1f | |
parent | 8f3de141a2be34ec746a972564c300b199ee5bc3 (diff) |
Filesystem Explorer: Guard against mobile usage
It was observed that users try to run this example on mobile platforms.
It was never designed for such a usecase and is therefore not supported.
Ref: https://camg.me/qt-mobile-2023/#filesystem
Additionally mention that this is a desktop example in the docs.
Pick-to: 6.6 6.7
Change-Id: I55205e3f2cb3a45aaf18f2a52ea24f54ab8e39bd
Reviewed-by: Mitch Curtis <[email protected]>
5 files changed, 16 insertions, 4 deletions
diff --git a/examples/quickcontrols/CMakeLists.txt b/examples/quickcontrols/CMakeLists.txt index 63a443bd43..47f6281c75 100644 --- a/examples/quickcontrols/CMakeLists.txt +++ b/examples/quickcontrols/CMakeLists.txt @@ -13,7 +13,7 @@ qt_internal_add_example(texteditor) qt_internal_add_example(contactlist) qt_internal_add_example(wearable) qt_internal_add_example(imagine/automotive) -if (TARGET Qt6::Svg) +if (TARGET Qt6::Svg AND NOT ANDROID AND NOT IOS) qt_internal_add_example(filesystemexplorer) endif() if(TARGET Qt6::Widgets) diff --git a/examples/quickcontrols/filesystemexplorer/CMakeLists.txt b/examples/quickcontrols/filesystemexplorer/CMakeLists.txt index 53eeb7b4e6..4a676d28d8 100644 --- a/examples/quickcontrols/filesystemexplorer/CMakeLists.txt +++ b/examples/quickcontrols/filesystemexplorer/CMakeLists.txt @@ -4,6 +4,11 @@ cmake_minimum_required(VERSION 3.16) project(filesystemexplorer LANGUAGES CXX) +if (ANDROID OR IOS) + message(FATAL_ERROR "Platform is not supported") + return() +endif () + if (NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif () diff --git a/examples/quickcontrols/filesystemexplorer/doc/src/qtquickcontrols-filesystemexplorer.qdoc b/examples/quickcontrols/filesystemexplorer/doc/src/qtquickcontrols-filesystemexplorer.qdoc index 8c950a67c7..686c2ab48a 100644 --- a/examples/quickcontrols/filesystemexplorer/doc/src/qtquickcontrols-filesystemexplorer.qdoc +++ b/examples/quickcontrols/filesystemexplorer/doc/src/qtquickcontrols-filesystemexplorer.qdoc @@ -6,8 +6,8 @@ \meta tags {quickcontrols, layout, styling, treeview} \title File System Explorer \ingroup qtquickcontrols-examples - \brief A QML app utilizing customized Qt Quick Controls to display text - files from a filesystem. + \brief A desktop QML app utilizing customized Qt Quick Controls to display + text files from a filesystem. In this example, a modern layout is used that consists of three major components. There is an icon-based \e {Sidebar} to the left, followed by a diff --git a/examples/quickcontrols/filesystemexplorer/filesystemexplorer.pro b/examples/quickcontrols/filesystemexplorer/filesystemexplorer.pro index 3748d9577b..817c03c0d5 100644 --- a/examples/quickcontrols/filesystemexplorer/filesystemexplorer.pro +++ b/examples/quickcontrols/filesystemexplorer/filesystemexplorer.pro @@ -1,6 +1,10 @@ # Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause +android|ios { + error( "Platform not supported" ) +} + QT += quick CONFIG += qmltypes diff --git a/examples/quickcontrols/quickcontrols.pro b/examples/quickcontrols/quickcontrols.pro index 44644e9ba9..7baf731218 100644 --- a/examples/quickcontrols/quickcontrols.pro +++ b/examples/quickcontrols/quickcontrols.pro @@ -5,8 +5,11 @@ SUBDIRS += \ texteditor \ contactlist \ wearable \ - filesystemexplorer \ imagine/automotive +win32|macos|unix { + qtHaveModule(svg): SUBDIRS += filesystemexplorer +} + qtHaveModule(sql): SUBDIRS += eventcalendar qtHaveModule(widgets): SUBDIRS += flatstyle |