Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlstandardpaths.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtQml/qqmlengine.h>
7
9
27static QList<QUrl> toUrlList(const QStringList &paths)
28{
29 QList<QUrl> urls;
30 urls.reserve(paths.size());
31 for (const QString &path : paths)
33 return urls;
34}
35
40
52
61{
63}
64
73 QStandardPaths::LocateOptions options) const
74{
76}
77
86 QStandardPaths::LocateOptions options) const
87{
89}
90
102
114
116
117#include "moc_qqmlstandardpaths_p.cpp"
\inmodule QtCore
Definition qobject.h:103
QQmlStandardPaths(QObject *parent=nullptr)
Q_INVOKABLE QUrl writableLocation(QStandardPaths::StandardLocation type) const
\qmlmethod url QtCore::StandardPaths::writableLocation(StandardLocation type)
Q_INVOKABLE QUrl findExecutable(const QString &executableName, const QStringList &paths=QStringList()) const
\qmlmethod url QtCore::StandardPaths::findExecutable(string executableName, list<string> paths) const
Q_INVOKABLE QString displayName(QStandardPaths::StandardLocation type) const
\qmlmethod string QtCore::StandardPaths::displayName(StandardLocation type)
Q_INVOKABLE QList< QUrl > locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options=QStandardPaths::LocateFile) const
\qmlmethod list<url> QtCore::StandardPaths::locateAll(StandardLocation type, string fileName,...
Q_INVOKABLE QList< QUrl > standardLocations(QStandardPaths::StandardLocation type) const
\qmlmethod list<url> QtCore::StandardPaths::standardLocations(StandardLocation type)
Q_INVOKABLE QUrl locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options=QStandardPaths::LocateFile) const
\qmlmethod url QtCore::StandardPaths::locate(StandardLocation type, string fileName,...
static QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
[0]
static QStringList standardLocations(StandardLocation type)
static QString writableLocation(StandardLocation type)
static QString displayName(StandardLocation type)
static QString findExecutable(const QString &executableName, const QStringList &paths=QStringList())
static QString locate(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
StandardLocation
This enum describes the different locations that can be queried using methods such as QStandardPaths:...
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
Definition qurl.cpp:3368
Combined button and popup list for selecting options.
GLenum type
GLsizei const GLuint * paths
GLsizei const GLchar *const * path
static QT_BEGIN_NAMESPACE QList< QUrl > toUrlList(const QStringList &paths)
\qmltype StandardPaths \inherits QtObject \inqmlmodule QtCore