diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-07 08:06:08 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-07 08:06:08 -0500 |
| commit | fe76e6518b4075d52943976c0877fe65e61176a9 (patch) | |
| tree | f0b6300cdf5e7bd75e1dc1eefad1b376a4bbff57 /src/modinfodialogtextfiles.cpp | |
| parent | e6fe832b4fdc35acbad718b720f58e1254dcd32a (diff) | |
| parent | 718c2a56f91f824c5eab69d8cc16294f77243370 (diff) | |
Merge branch 'master' of https://github.com/ModOrganizer2/modorganizer into generic-file-list
Diffstat (limited to 'src/modinfodialogtextfiles.cpp')
| -rw-r--r-- | src/modinfodialogtextfiles.cpp | 21 |
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) { |
