summaryrefslogtreecommitdiff
path: root/src/modinfodialogtextfiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modinfodialogtextfiles.cpp')
-rw-r--r--src/modinfodialogtextfiles.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/modinfodialogtextfiles.cpp b/src/modinfodialogtextfiles.cpp
index fdf12568..28d872a3 100644
--- a/src/modinfodialogtextfiles.cpp
+++ b/src/modinfodialogtextfiles.cpp
@@ -154,15 +154,9 @@ bool GenericFilesTab::canClose()
bool GenericFilesTab::feedFile(const QString& rootPath, const QString& fullPath)
{
- static constexpr const char* extensions[] = {
- ".txt"
- };
-
- for (const auto* e : extensions) {
- if (wantsFile(rootPath, fullPath)) {
- m_model->add(rootPath, fullPath);
- return true;
- }
+ if (wantsFile(rootPath, fullPath)) {
+ m_model->add(rootPath, fullPath);
+ return true;
}
return false;
@@ -217,7 +211,12 @@ TextFilesTab::TextFilesTab(ModInfoDialogTabContext cx)
bool TextFilesTab::wantsFile(const QString& rootPath, const QString& fullPath) const
{
- static const QString extensions[] = {".txt"};
+ static const QString extensions[] = {
+ ".txt",
+ ".json",
+ ".cfg",
+ ".log"
+ };
for (const auto& e : extensions) {
if (fullPath.endsWith(e, Qt::CaseInsensitive)) {
@@ -237,7 +236,7 @@ IniFilesTab::IniFilesTab(ModInfoDialogTabContext cx)
bool IniFilesTab::wantsFile(const QString& rootPath, const QString& fullPath) const
{
- static const QString extensions[] = {".ini", ".cfg"};
+ static const QString extensions[] = {".ini"};
static const QString meta("meta.ini");
for (const auto& e : extensions) {