Commit 2c5720a8 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Use a better way to compare the suffix of recent files

Even better would be to use the mimetype, but that would also
take more time.
parent 3af6ef5c
......@@ -218,8 +218,10 @@ void KisWelcomePageWidget::populateRecentDocuments()
recentItem->setIcon(m_thumbnailMap[recentFileUrlPath]);
}
else {
if (QFileInfo(recentFileUrlPath).exists()) {
if (recentFileUrlPath.toLower().endsWith("ora") || recentFileUrlPath.toLower().endsWith("kra")) {
QFileInfo fi(recentFileUrlPath);
if (fi.exists()) {
if (fi.suffix() == "ora" || fi.suffix() == "kra") {
QScopedPointer<KoStore> store(KoStore::createStore(recentFileUrlPath, KoStore::Read));
if (store) {
......@@ -242,7 +244,7 @@ void KisWelcomePageWidget::populateRecentDocuments()
}
}
}
else if (recentFileUrlPath.toLower().endsWith("tif")) {
else if (fi.suffix() == "tiff" || fi.suffix() == "tif") {
// Workaround for a bug in Qt tiff QImageIO plugin
QScopedPointer<KisDocument> doc;
doc.reset(KisPart::instance()->createDocument());
......
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