diff --git a/src/preview_base_en.ts b/src/preview_base_en.ts index 4c90ab1..235a52c 100644 --- a/src/preview_base_en.ts +++ b/src/preview_base_en.ts @@ -4,7 +4,7 @@ PreviewBase - + Supports previewing various types of data files diff --git a/src/previewbase.cpp b/src/previewbase.cpp index d1c5bc6..e31adc1 100644 --- a/src/previewbase.cpp +++ b/src/previewbase.cpp @@ -38,11 +38,22 @@ PreviewBase::PreviewBase() auto imageReader = std::bind(&PreviewBase::genImagePreview, this, std::placeholders::_1, std::placeholders::_2); foreach (const QByteArray &fileType, QImageReader::supportedImageFormats()) { - m_PreviewGenerators[QString(fileType).toLower()] = imageReader; + auto strFileType = QString(fileType).toLower(); + + // skip dds as that one is handled by the dds preview plugin. + if (strFileType == "dds") + continue; + + m_PreviewGenerators[strFileType] = imageReader; } - m_PreviewGenerators["txt"] - = std::bind(&PreviewBase::genTxtPreview, this, std::placeholders::_1, std::placeholders::_2); + auto textReader = std::bind(&PreviewBase::genTxtPreview, this, std::placeholders::_1, std::placeholders::_2); + m_PreviewGenerators["txt"] = textReader; + m_PreviewGenerators["ini"] = textReader; + m_PreviewGenerators["json"] = textReader; + m_PreviewGenerators["log"] = textReader; + m_PreviewGenerators["cfg"] = textReader; + } @@ -68,7 +79,7 @@ QString PreviewBase::description() const MOBase::VersionInfo PreviewBase::version() const { - return VersionInfo(1, 0, 0, VersionInfo::RELEASE_FINAL); + return VersionInfo(1, 1, 0, VersionInfo::RELEASE_FINAL); } bool PreviewBase::isActive() const