| 1 | From f8cfb96a1540fc3256af95adf8003b75c305183c Mon Sep 17 00:00:00 2001
|
| 2 | From: Petr Hodina <[email protected]>
|
| 3 | Date: Fri, 30 Sep 2022 21:55:55 +0200
|
| 4 | Subject: [PATCH] Add delay to update the mime db in testCreateMimeType test
|
| 5 | function.
|
| 6 |
|
| 7 |
|
| 8 | diff --git a/keditfiletype/tests/filetypestest.cpp b/keditfiletype/tests/filetypestest.cpp
|
| 9 | index e58e6f2..a41d4ad 100644
|
| 10 | |
| 11 | |
| 12 | @@ -315,6 +315,9 @@ private Q_SLOTS:
|
| 13 | QVERIFY(data.isDirty());
|
| 14 | QVERIFY(data.sync());
|
| 15 | MimeTypeWriter::runUpdateMimeDatabase();
|
| 16 | + // QMimeDatabase doesn't even try to update the cache if less than
|
| 17 | + // 5000 ms have passed (can't use qmime_secondsBetweenChecks)
|
| 18 | + QTest::qSleep(5000);
|
| 19 | QMimeType mime = db.mimeTypeForName(mimeTypeName);
|
| 20 | QVERIFY(mime.isValid());
|
| 21 | QCOMPARE(mime.comment(), fakeComment);
|
| 22 |
|
| 23 | base-commit: b5911cda17521156b22429436e19b508aa442a57
|
| 24 | --
|
| 25 | 2.37.2
|
| 26 |
|