diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-11 02:37:39 -0600 |
| commit | 7ee008e150bc5bcf76082d726f719ee0fdfda982 (patch) | |
| tree | 27fb39be241fdb5ac2734c574de678977d1856d0 /libs/uibase/src/modrepositoryfileinfo.cpp | |
Fluorine Manager: full Linux port of Mod Organizer 2
Complete native Linux port with FUSE-based virtual filesystem,
Proton/umu-run integration, and Flatpak packaging.
Key features:
- FUSE VFS replacing Windows USVFS (in-process + standalone helper for Flatpak)
- Proton/GE-Proton/umu-run launcher with env var forwarding
- Flatpak support (sandbox-aware VFS, NXM handler, umu-run)
- Wine prefix management UI
- Case-insensitive path resolution for Linux filesystems
- QSettings-safe INI handling (avoids Bethesda INI corruption)
- Portable instance support with auto-generated launcher scripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/uibase/src/modrepositoryfileinfo.cpp')
| -rw-r--r-- | libs/uibase/src/modrepositoryfileinfo.cpp | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/libs/uibase/src/modrepositoryfileinfo.cpp b/libs/uibase/src/modrepositoryfileinfo.cpp new file mode 100644 index 0000000..2b0f729 --- /dev/null +++ b/libs/uibase/src/modrepositoryfileinfo.cpp @@ -0,0 +1,81 @@ +#include <uibase/modrepositoryfileinfo.h> +#include <uibase/json.h> + +MOBase::ModRepositoryFileInfo::ModRepositoryFileInfo( + const ModRepositoryFileInfo& reference) + : QObject(reference.parent()), name(reference.name), uri(reference.uri), + description(reference.description), version(reference.version), + categoryID(reference.categoryID), modName(reference.modName), + gameName(reference.gameName), modID(reference.modID), fileID(reference.fileID), + fileSize(reference.fileSize), fileCategory(reference.fileCategory), + repository(reference.repository), userData(reference.userData), + author(reference.author), uploader(reference.uploader), + uploaderUrl(reference.uploaderUrl) +{} + +MOBase::ModRepositoryFileInfo::ModRepositoryFileInfo(QString gameName, int modID, + int fileID) + : name(), uri(), description(), version(), categoryID(0), modName(), + gameName(gameName), modID(modID), fileID(fileID), fileSize(0), + fileCategory(TYPE_UNKNOWN), repository(), userData(), author(), uploader(), + uploaderUrl() + +{} + +MOBase::ModRepositoryFileInfo +MOBase::ModRepositoryFileInfo::createFromJson(const QString& data) +{ + QVariantList result = QtJson::parse(data).toList(); + + while (result.length() < 18) { + result.append(QVariant()); + } + + ModRepositoryFileInfo newInfo; + + newInfo.gameName = result.at(0).toString(); + newInfo.fileID = result.at(1).toInt(); + newInfo.name = result.at(2).toString(); + newInfo.uri = result.at(3).toString(); + newInfo.version.parse(result.at(4).toString()); + newInfo.description = result.at(5).toString(); + newInfo.categoryID = result.at(6).toInt(); + newInfo.fileSize = result.at(7).toUInt(); + newInfo.modID = result.at(8).toInt(); + newInfo.modName = result.at(9).toString(); + newInfo.newestVersion.parse(result.at(10).toString()); + newInfo.fileName = result.at(11).toString(); + newInfo.fileCategory = result.at(12).toInt(); + newInfo.repository = result.at(13).toString(); + newInfo.userData = result.at(14).toMap(); + newInfo.author = result.at(15).toString(); + newInfo.uploader = result.at(16).toString(); + newInfo.uploaderUrl = result.at(17).toString(); + + return newInfo; +} + +QString MOBase::ModRepositoryFileInfo::toString() const +{ + return QString("[ " + "\"%1\",%2,\"%3\",\"%4\",\"%5\",\"%6\",%7,%8,%9,\"%10\",\"%11\",\"%" + "12\",%13,\"%14\",%15 ]") + .arg(gameName) + .arg(fileID) + .arg(name) + .arg(uri) + .arg(version.canonicalString()) + .arg(description.mid(0).replace("\"", "'")) + .arg(categoryID) + .arg(fileSize) + .arg(modID) + .arg(modName) + .arg(newestVersion.canonicalString()) + .arg(fileName) + .arg(fileCategory) + .arg(repository) + .arg(QString(QtJson::serialize(userData))) + .arg(author) + .arg(uploader) + .arg(uploaderUrl); +} |
