QMimeXMLProvider: fix another issue with -no-mimetype-database
The compiler must emit the destructor for the members of a class in an inline constructor, in case the constructor throws. This won't work in Qt 5.15 due to QList requiring knowing whether QMimeMagicRuleMatcher is trivial or not. Another solution would be to use QVector. Fixes: QTBUG-82547 Change-Id: Ia8b65350cd5d49debca9fffd15f79db872ed7c0c Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
14420b359b
commit
1edf586ed7
@ -664,7 +664,15 @@ QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnu
|
||||
|
||||
load(data, size);
|
||||
}
|
||||
#endif
|
||||
#else // !QT_CONFIG(mimetype_database)
|
||||
// never called in release mode, but some debug builds may need
|
||||
// this to be defined.
|
||||
QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum)
|
||||
: QMimeProviderBase(db, QString())
|
||||
{
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
#endif // QT_CONFIG(mimetype_database)
|
||||
|
||||
QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db, const QString &directory)
|
||||
: QMimeProviderBase(db, directory)
|
||||
|
@ -135,13 +135,10 @@ public:
|
||||
enum InternalDatabaseEnum { InternalDatabase };
|
||||
#if QT_CONFIG(mimetype_database)
|
||||
enum : bool { InternalDatabaseAvailable = true };
|
||||
QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum);
|
||||
#else
|
||||
enum : bool { InternalDatabaseAvailable = false };
|
||||
QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum)
|
||||
: QMimeProviderBase(db, QString())
|
||||
{ Q_UNREACHABLE(); };
|
||||
#endif
|
||||
QMimeXMLProvider(QMimeDatabasePrivate *db, InternalDatabaseEnum);
|
||||
QMimeXMLProvider(QMimeDatabasePrivate *db, const QString &directory);
|
||||
~QMimeXMLProvider();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user