mirror of
https://github.com/ModOrganizer2/modorganizer-preview_bsa.git
synced 2026-07-27 14:06:38 -07:00
Add support for ini files and remove support for dds files as preview_dds plugin will handle those from now on.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<context>
|
||||
<name>PreviewBase</name>
|
||||
<message>
|
||||
<location filename="previewbase.cpp" line="66"/>
|
||||
<location filename="previewbase.cpp" line="73"/>
|
||||
<source>Supports previewing various types of data files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
+10
-3
@@ -38,11 +38,18 @@ 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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user