10#include <QtCore/QMutex>
11#include <QtCore/private/qlocking_p.h>
13#include <QtCore/QFileInfo>
14#include <QtCore/QLocale>
15#include <QtCore/QDebug>
160 return d->select(filePath);
165 bool local =
file ==
"qrc"_L1;
167 local |=
file ==
"assets"_L1;
186 auto scheme =
":"_L1;
189 if (filePath.
scheme() ==
"assets"_L1)
190 scheme =
"assets:"_L1;
194 QString selectedPath =
d->select(equivalentPath);
195 ret.setPath(selectedPath.
remove(0, scheme.size()));
199 if (
ret.hasFragment())
200 frag =
ret.fragment();
206 ret.setFragment(frag);
222 for (
const QString &
s : selectors) {
225 prospectiveBase += indicator;
226 prospectiveBase +=
s + u
'/';
228 remainingSelectors.removeAll(
s);
232 if (!prospectiveFile.
isEmpty())
233 return prospectiveFile;
287 return d->extras + sharedData->staticSelectors;
292 if (!sharedData->staticSelectors.isEmpty())
298 if (envSelectors.size())
299 sharedData->staticSelectors << envSelectors;
304 sharedData->staticSelectors << sharedData->preloadedStatics;
319#elif defined(Q_OS_UNIX)
321# if !defined(Q_OS_ANDROID) && !defined(Q_OS_QNX)
326 if (productName !=
"unknown"_L1)
335 sharedData->preloadedStatics << statics;
336 sharedData->staticSelectors.clear();
341#include "moc_qfileselector.cpp"
constexpr bool isNull() const noexcept
Returns true if the character is the Unicode character 0x0000 ('\0'); otherwise returns false.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
\inmodule QtCore \reentrant
QString fileName() const
Returns the name of the file, excluding the path.
QString path() const
Returns the file's path.
static void addStatics(const QStringList &)
static QString selectionHelper(const QString &path, const QString &fileName, const QStringList &selectors, QChar indicator=u'+')
static void updateSelectors()
static QStringList platformSelectors()
QString select(const QString &filePath) const
QStringList extraSelectors() const
Returns the list of extra selectors which have been added programmatically to this instance.
void setExtraSelectors(const QStringList &list)
Sets the list of extra selectors which have been added programmatically to this instance.
QStringList allSelectors() const
Returns the complete, ordered list of selectors used by this instance.
QString select(const QString &filePath) const
This function returns the selected version of the path, based on the conditions at runtime.
~QFileSelector()
Destroys this selector instance.
QFileSelector(QObject *parent=nullptr)
Create a QFileSelector instance.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString name() const
The short name of this locale.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
bool isNull() const
Returns true if this string is null; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
static QString productType()
static QString kernelType()
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
QString scheme() const
Returns the scheme of the URL.
QString path(ComponentFormattingOptions options=FullyDecoded) const
Returns the path of the URL.
Combined button and popup list for selecting options.
static bool isLocalScheme(const QString &file)
static const char env_override[]
static Q_CONSTINIT QBasicMutex sharedDataMutex
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLenum GLsizei const void * pathString
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
#define QStringLiteral(str)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
QFileInfo fi("c:/temp/foo")
[newstuff]
\inmodule QtCore \reentrant
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent