Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/qt6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Sep 5, 2023
2 parents c8e247f + fdc4ebd commit 5bb4a2a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ AboutDialog::AboutDialog(const QString& version, QWidget* parent)
m_LicenseFiles[LICENSE_CASTLE] = "Castle.txt";
m_LicenseFiles[LICENSE_ANTLR] = "AntlrBuildTask.txt";
m_LicenseFiles[LICENSE_DXTEX] = "DXTex.txt";
m_LicenseFiles[LICENSE_VDF] = "ValveFileVDF.txt";

addLicense("Qt", LICENSE_LGPL3);
addLicense("Qt Json", LICENSE_GPL3);
Expand All @@ -75,6 +76,7 @@ AboutDialog::AboutDialog(const QString& version, QWidget* parent)
addLicense("{fmt}", LICENSE_FMT);
addLicense("SIP", LICENSE_SIP);
addLicense("DXTex Headers", LICENSE_DXTEX);
addLicense("Valve File VDF Reader", LICENSE_VDF);

ui->nameLabel->setText(
QString("<span style=\"font-size:12pt; font-weight:600;\">%1 %2</span>")
Expand Down
3 changes: 2 additions & 1 deletion src/aboutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class AboutDialog : public QDialog
LICENSE_SIP,
LICENSE_CASTLE,
LICENSE_ANTLR,
LICENSE_DXTEX
LICENSE_DXTEX,
LICENSE_VDF,
};

private:
Expand Down
5 changes: 5 additions & 0 deletions src/directoryrefresher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ void DirectoryRefresher::refresh()
m_Root->addFromOrigin(L"data", dataDirectory, 0, dummy);
}

for (auto directory : game->secondaryDataDirectories().toStdMap()) {
DirectoryStats dummy;
m_Root->addFromOrigin(directory.first.toStdWString(), QDir::toNativeSeparators(directory.second.absolutePath()).toStdWString(), 0, dummy);
}

std::sort(m_Mods.begin(), m_Mods.end(), [](auto lhs, auto rhs) {
return lhs.priority < rhs.priority;
});
Expand Down
23 changes: 18 additions & 5 deletions src/organizercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,12 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,

MappingType result;

QString dataPath = QDir::toNativeSeparators(game->dataDirectory().absolutePath());
QStringList dataPaths;
dataPaths.append(QDir::toNativeSeparators(game->dataDirectory().absolutePath()));

for (auto directory : game->secondaryDataDirectories()) {
dataPaths.append(directory.absolutePath());
}

bool overwriteActive = false;

Expand All @@ -2009,8 +2014,10 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,
overwriteActive |= createTarget;

if (modPtr->isRegular()) {
result.insert(result.end(), {QDir::toNativeSeparators(std::get<1>(mod)), dataPath,
true, createTarget});
for (auto dataPath : dataPaths) {
result.insert(result.end(), { QDir::toNativeSeparators(std::get<1>(mod)),
dataPath, true, createTarget });
}
}
}

Expand All @@ -2031,8 +2038,14 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,
}
}

result.insert(result.end(), {QDir::toNativeSeparators(m_Settings.paths().overwrite()),
dataPath, true, customOverwrite.isEmpty()});
for (auto dataPath : dataPaths) {
result.insert(result.end(), {
QDir::toNativeSeparators(m_Settings.paths().overwrite()),
dataPath,
true,
customOverwrite.isEmpty()
});
}

for (MOBase::IPluginFileMapper* mapper :
m_PluginContainer->plugins<MOBase::IPluginFileMapper>()) {
Expand Down
4 changes: 2 additions & 2 deletions src/version.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser
// Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha
#define VER_FILEVERSION 2,5,0
#define VER_FILEVERSION_STR "2.5.0-alpha3\0"
#define VER_FILEVERSION_STR "2.5.0-beta1\0"

VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand All @@ -24,7 +24,7 @@ BEGIN
VALUE "FileDescription", "Mod Organizer 2 GUI\0"
VALUE "OriginalFilename", "ModOrganizer.exe\0"
VALUE "InternalName", "ModOrganizer2\0"
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2022 Mod Organizer 2 contributors\0"
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2023 Mod Organizer 2 contributors\0"
VALUE "ProductName", "Mod Organizer 2\0"
VALUE "ProductVersion", VER_FILEVERSION_STR
END
Expand Down

0 comments on commit 5bb4a2a

Please sign in to comment.