diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-01 18:00:31 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-07 12:16:33 +0200 |
| commit | 40c433580f69006a42dc27a6444ebd9a6cccc440 (patch) | |
| tree | 426524068d3dbfcf9aba495d78a5c7bd4316dca8 /src/modinfo.cpp | |
| parent | cd2b7683b78503d4fef1946de088108b812b387c (diff) | |
Update ModInfo classes to handle plugin game and clean some declarations.
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 085eaf80..7f888bdc 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -25,11 +25,9 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "modinfooverwrite.h" #include "modinfoseparator.h" -#include "installationtester.h" #include "categories.h" #include "modinfodialog.h" #include "overwriteinfodialog.h" -#include "filenamestring.h" #include "versioninfo.h" #include <iplugingame.h> @@ -475,7 +473,7 @@ bool ModInfo::removeCategory(const QString &categoryName) return true; } -QStringList ModInfo::categories() +QStringList ModInfo::categories() const { QStringList result; @@ -529,28 +527,7 @@ bool ModInfo::categorySet(int categoryID) const void ModInfo::testValid() { - m_Valid = false; - QDirIterator dirIter(absolutePath()); - while (dirIter.hasNext()) { - dirIter.next(); - if (dirIter.fileInfo().isDir()) { - if (InstallationTester::isTopLevelDirectory(dirIter.fileName())) { - m_Valid = true; - break; - } - } else { - if (InstallationTester::isTopLevelSuffix(dirIter.fileName())) { - m_Valid = true; - break; - } - } - } - - // NOTE: in Qt 4.7 it seems that QDirIterator leaves a file handle open if it is not iterated to the - // end - while (dirIter.hasNext()) { - dirIter.next(); - } + m_Valid = doTestValid(); } QUrl ModInfo::parseCustomURL() const |
