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
qquicklabsplatformstandardpaths.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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#if QT_DEPRECATED_SINCE(6, 4)
7
8#include <QtQml/qqmlengine.h>
9
11
16
36static QList<QUrl> toUrlList(const QStringList &paths)
37{
38 QList<QUrl> urls;
39 urls.reserve(paths.size());
40 for (const QString &path : paths)
41 urls += QUrl::fromLocalFile(path);
42 return urls;
43}
44
45QQuickLabsPlatformStandardPaths::QQuickLabsPlatformStandardPaths(QObject *parent)
46 : QObject(parent)
47{
48}
49
50QObject *QQuickLabsPlatformStandardPaths::create(QQmlEngine *engine, QJSEngine *scriptEngine)
51{
52 Q_UNUSED(scriptEngine);
53 return new QQuickLabsPlatformStandardPaths(engine);
54}
55
63QString QQuickLabsPlatformStandardPaths::displayName(QStandardPaths::StandardLocation type)
64{
66}
67
75QUrl QQuickLabsPlatformStandardPaths::findExecutable(const QString &executableName, const QStringList &paths)
76{
78}
79
87QUrl QQuickLabsPlatformStandardPaths::locate(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
88{
90}
91
99QList<QUrl> QQuickLabsPlatformStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
100{
102}
103
111void QQuickLabsPlatformStandardPaths::setTestModeEnabled(bool testMode)
112{
114}
115
123QList<QUrl> QQuickLabsPlatformStandardPaths::standardLocations(QStandardPaths::StandardLocation type)
124{
126}
127
135QUrl QQuickLabsPlatformStandardPaths::writableLocation(QStandardPaths::StandardLocation type)
136{
138}
139
141
142#include "moc_qquicklabsplatformstandardpaths_p.cpp"
143
144#endif // QT_DEPRECATED_SINCE(6, 4)
The QJSEngine class provides an environment for evaluating JavaScript code.
Definition qjsengine.h:26
\inmodule QtCore
Definition qobject.h:103
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
static QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
[0]
static void setTestModeEnabled(bool testMode)
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
#define Q_UNUSED(x)
QJSEngine engine
[0]