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.

Change-Id: I55205e3f2cb3a45aaf18f2a52ea24f54ab8e39bd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 9e4f24e749)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 15d27caf01)
This commit is contained in:
Dennis Oberst 2024-01-17 11:28:11 +01:00 committed by Qt Cherry-pick Bot
parent 0c5a04ee78
commit 2f5be55b69
5 changed files with 16 additions and 4 deletions

View File

@ -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)

View File

@ -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 ()

View File

@ -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

View File

@ -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

View File

@ -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