13#include <QtCore/QDebug>
14#include <QtCore/QLocale>
15#include <QtCore/QHashFunctions>
30 localeComments(
other.
d->localeComments),
31 genericIconName(
other.
d->genericIconName),
32 iconName(
other.
d->iconName),
33 globPatterns(
other.
d->globPatterns)
227 languageList << u
"default"_s;
273 if (slashindex != -1)
274 groupRef = groupRef.
left(slashindex);
275 return groupRef +
"-x-generic"_L1;
283 if (slashindex != -1)
284 iconName[slashindex] = u
'-';
347 if (!allParents.contains(
parent))
348 allParents.append(
parent);
415 if (
pattern.startsWith(
"*."_L1) &&
441 return suffixList.isEmpty() ?
QString() : suffixList.at(0);
479 if (
d->
name == mimeTypeName)
484#ifndef QT_NO_DEBUG_STREAM
488 if (!
mime.isValid()) {
489 debug.nospace() <<
"QMimeType(invalid)";
491 debug.nospace() <<
"QMimeType(" <<
mime.name() <<
")";
499#include "moc_qmimetype.cpp"
T value(const Key &key) const noexcept
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
QStringList uiLanguages() const
List of locale names for use in selecting translations.
QString name() const
The short name of this locale.
QStringList listAliases(const QString &mimeName)
bool mimeInherits(const QString &mime, const QString &parent)
void loadIcon(QMimeTypePrivate &mimePrivate)
void loadGenericIcon(QMimeTypePrivate &mimePrivate)
QStringList mimeParents(const QString &mimeName)
const QString & defaultMimeType() const
void loadMimeTypePrivate(QMimeTypePrivate &mimePrivate)
static QMimeDatabasePrivate * instance()
LocaleHash localeComments
void addGlobPattern(const QString &pattern)
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
bool operator==(const QMimeType &other) const
Returns true if other equals this QMimeType object, otherwise returns false.
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
constexpr QStringView left(qsizetype n) const noexcept
qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & append(QChar c)
QString left(qsizetype n) const
Returns a substring that contains the n leftmost characters of the string.
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Combined button and popup list for selecting options.
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
QDebug operator<<(QDebug debug, const QMimeType &mime)
static QString make_default_icon_name_from_mimetype_name(QString iconName)
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]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent