summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Faure <faure+bluesystems@kde.org>2013-02-21 12:11:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-01 13:05:11 +0100
commitf2e8a81227b3ee09afe1bf8a5d292e8c5f2ee67f (patch)
tree28de9229ff2ee6bf45eb699aa6ee789abfd3d512 /tests
parentebc4fb452ac268657023cb957c1b0ca0e315b9fc (diff)
QMimeDatabase: pass MatchMode down, to fix MatchContent.
Task-number: QTBUG-29702 Change-Id: I2f1538adbf8e7a5edfc4276585bf4ef04ce69874 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index 79d8b3dfe4..a90bfadd73 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -442,6 +442,8 @@ void tst_QMimeDatabase::mimeTypeForFileWithContent()
txtTempFile.close();
mime = db.mimeTypeForFile(txtTempFileName);
QCOMPARE(mime.name(), QString::fromLatin1("text/plain"));
+ mime = db.mimeTypeForFile(txtTempFileName, QMimeDatabase::MatchContent);
+ QCOMPARE(mime.name(), QString::fromLatin1("application/smil"));
}
// Test what happens with an incorrect path
@@ -714,6 +716,8 @@ void tst_QMimeDatabase::findByData()
QFileInfo info(filePath);
QString mimeForInfo = database.mimeTypeForFile(info, QMimeDatabase::MatchContent).name();
QCOMPARE(mimeForInfo, resultMimeTypeName);
+ QString mimeForFile = database.mimeTypeForFile(filePath, QMimeDatabase::MatchContent).name();
+ QCOMPARE(mimeForFile, resultMimeTypeName);
}
void tst_QMimeDatabase::findByFile_data()