Commit 2b7f6df6 authored by David Faure's avatar David Faure
Browse files

Merge remote-tracking branch 'origin/Plasma/5.19'

parents 4d7180ad 643123d0
......@@ -55,6 +55,7 @@ MimeTypeData::MimeTypeData(const QMimeType &mime)
, m_userSpecifiedIconModified(false)
{
const QString mimeName = m_mimetype.name();
Q_ASSERT(!mimeName.isEmpty());
const int index = mimeName.indexOf(QLatin1Char('/'));
if (index != -1) {
m_major = mimeName.left(index);
......
......@@ -306,10 +306,7 @@ private Q_SLOTS:
QVERIFY(data.isDirty());
QVERIFY(data.sync());
MimeTypeWriter::runUpdateMimeDatabase();
//runKBuildSycoca();
// QMimeDatabase doesn't even try to update the cache if less than
// 5000 ms have passed
QTest::qSleep(5000);
qmime_secondsBetweenChecks = 0; // ensure QMimeDatabase sees it immediately
QMimeType mime = db.mimeTypeForName(mimeTypeName);
QVERIFY(mime.isValid());
QCOMPARE(mime.comment(), QStringLiteral("Fake MimeType"));
......@@ -333,9 +330,8 @@ private Q_SLOTS:
QVERIFY(MimeTypeWriter::hasDefinitionFile(mimeTypeName));
MimeTypeWriter::removeOwnMimeType(mimeTypeName);
MimeTypeWriter::runUpdateMimeDatabase();
//runKBuildSycoca();
QMimeType mime = db.mimeTypeForName(mimeTypeName);
QVERIFY(mime.isValid());
const QMimeType mime = db.mimeTypeForName(mimeTypeName);
QVERIFY2(!mime.isValid(), qPrintable(mimeTypeName));
}
void testModifyMimeTypeComment() // of a system mimetype. And check that it's re-read correctly.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment