Skip to content

Commit

Permalink
Merge pull request #4 from ModOrganizer2/Develop
Browse files Browse the repository at this point in the history
Stage for release 2.2.2
  • Loading branch information
LostDragonist authored Jan 6, 2020
2 parents e387e6f + 027e07e commit f661415
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/preview_base_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>PreviewBase</name>
<message>
<location filename="previewbase.cpp" line="66"/>
<location filename="previewbase.cpp" line="77"/>
<source>Supports previewing various types of data files</source>
<translation type="unfinished"></translation>
</message>
Expand Down
19 changes: 15 additions & 4 deletions src/previewbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;


}

Expand All @@ -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
Expand Down

0 comments on commit f661415

Please sign in to comment.