10#include <QtCore/QDebug>
11#include <QtCore/QLocale>
12#include <QtCore/QHashFunctions>
123 return lhs.d == rhs.d || lhs.d->name == rhs.d->name;
218 QString comm = localeComments.value(lang);
224 comm = localeComments.value(lang.
left(
cut));
259 const qsizetype slashindex = groupRef.indexOf(u
'/');
260 if (slashindex != -1)
261 groupRef = groupRef.left(slashindex);
262 return groupRef +
"-x-generic"_L1;
270 if (slashindex != -1)
271 iconName[slashindex] = u
'-';
332 for (
const QString &parent : parents) {
334 if (!allParents.contains(parent)) {
335 allParents.append(parent);
336 newParents.append(parent);
341 for (
const QString &parent : newParents)
402 result.reserve(patterns.size());
405 if (
pattern.startsWith(
"*."_L1) &&
431 return suffixList.isEmpty() ?
QString() : suffixList.at(0);
446 if (!patterns.isEmpty()) {
463 if (
d->
name == mimeTypeName)
468#ifndef QT_NO_DEBUG_STREAM
472 if (!
mime.isValid()) {
473 debug.nospace() <<
"QMimeType(invalid)";
475 debug.nospace() <<
"QMimeType(" <<
mime.name() <<
")";
483#include "moc_qmimetype.cpp"
QStringList uiLanguages(TagSeparator separator=TagSeparator::Dash) const
List of locale names for use in selecting translations.
static QMimeDatabasePrivate * instance()
Q_INVOKABLE bool inherits(const QString &mimeTypeName) const
Returns true if this mimetype is mimeTypeName, or inherits mimeTypeName (see parentMimeTypes()),...
QStringList globPatterns
the list of glob matching patterns
QStringList parentMimeTypes
the names of parent MIME types
QStringList allAncestors
the names of direct and indirect parent MIME types
QStringList aliases
the list of aliases of this mimetype
QStringList suffixes
the known suffixes for the MIME type
QExplicitlySharedDataPointer< QMimeTypePrivate > d
QString comment
the description of the MIME type to be displayed on user interfaces
QMimeType & operator=(const QMimeType &other)
Move-assigns other to this QMimeType instance.
QMimeType()
Constructs this QMimeType object initialized with default property values that indicate an invalid MI...
QString preferredSuffix
the preferred suffix for the MIME type
QString iconName
the file name of an icon image that represents the MIME type
bool isDefault
true if this MIME type is the default MIME type which applies to all files: application/octet-stream.
QString name
the name of the MIME type
~QMimeType()
Destroys the QMimeType object, and releases the d pointer.
QString genericIconName
the file name of a generic icon that represents the MIME type
QString filterString
a filter string usable for a file dialog
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString left(qsizetype n) const &
qsizetype indexOf(QLatin1StringView s, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QString mid(qsizetype position, qsizetype n=-1) const &
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
QString & append(QChar c)
Combined button and popup list for selecting options.
static jboolean cut(JNIEnv *, jobject)
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
static qsizetype defaultIndex()
QDebug operator<<(QDebug debug, const QMimeType &mime)
static QString make_default_icon_name_from_mimetype_name(QString iconName)
bool comparesEqual(const QMimeType &lhs, const QMimeType &rhs) noexcept
static void collectParentMimeTypes(const QString &mime, QStringList &allParents)
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
application x qt windows mime
[2]