/* Copyright (C) 2026 The Qt Company Ltd.
 *
 * SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
*/

/*!
    \qmltype QDesktopServices
    \inqmlmodule scripting

    \brief Provides methods for accessing common desktop services.

    Many desktop environments provide services that can be used by applications
    to perform common tasks, such as opening a file, in a way that is both
    consistent and takes into account the user's application preferences.

    This object contains methods that provide simple interfaces to these
    services that indicate whether they succeeded or failed.

    The openUrl() method is used to open files located at arbitrary URLs in
    external applications. For URLs that correspond to resources on the local
    filing system (where the URL scheme is "file"), a suitable application is
    used to open the file.

    The displayName() and storageLocation() methods take one of the following
    enums as an argument:

    \list
        \li DesktopServices.DesktopLocation
        \li DesktopServices.DocumentsLocation
        \li DesktopServices.FontsLocation
        \li DesktopServices.ApplicationsLocation
        \li DesktopServices.MusicLocation
        \li DesktopServices.MoviesLocation
        \li DesktopServices.PicturesLocation
        \li DesktopServices.TempLocation
        \li DesktopServices.HomeLocation
        \li DesktopServices.AppLocalDataLocation
        \li DesktopServices.CacheLocation
        \li DesktopServices.GenericCacheLocation
        \li DesktopServices.GenericDataLocation
        \li DesktopServices.RuntimeLocation
        \li DesktopServices.ConfigLocation
        \li DesktopServices.DownloadLocation
        \li DesktopServices.GenericConfigLocation
        \li DesktopServices.AppDataLocation
        \li DesktopServices.AppConfigLocation
        \li DesktopServices.PublicShareLocation
        \li DesktopServices.TemplatesLocation
    \endlist

    The enum values correspond to the values of the
    \l{QStandardPaths::StandardLocation} enum with the same names.
*/

/*!
    \qmlproperty enumeration QDesktopServices::QStandardPaths
    \internal
*/

/*!
    \qmlmethod boolean QDesktopServices::openUrl(string url)

    Uses the URL scheme \c file to open the specified \a url with a suitable
    application.

    \warning A return value of \c true indicates that the installer has successfully
    requested the operating system to open the URL in an external application. It may
    still fail to launch or fail to open the requested URL. This result will not be
    reported back to the installer.
*/

/*!
    \qmlmethod string QDesktopServices::displayName(int location)

    Returns a localized display name for the specified \a location or an empty
    QString if no relevant location can be found.
*/

/*!
    \qmlmethod string QDesktopServices::storageLocation(int location)

    Returns the specified \a location.
*/

/*!
    \qmlmethod array QDesktopServices::findFiles(string path, string pattern)

    Returns file names matching \a pattern. Searches the files recursively from \a path.
    The \a pattern understands * and ? wildcards.
*/

