mirror of
https://github.com/ModOrganizer2/modorganizer-game_morrowind.git
synced 2026-07-27 13:58:55 -07:00
Changes to compile with Qt6 + Boost 1.77
This commit is contained in:
@@ -85,7 +85,7 @@ QList<ExecutableInfo> GameMorrowind::executables() const
|
||||
<< ExecutableInfo("Morrowind", findInGameFolder(binaryName()))
|
||||
<< ExecutableInfo("Morrowind Launcher", findInGameFolder(getLauncherName()))
|
||||
<< ExecutableInfo("MGE XE", findInGameFolder("MGEXEgui.exe"))
|
||||
<< ExecutableInfo("LOOT", getLootPath()).withArgument("--game=\"Morrowind\"")
|
||||
<< ExecutableInfo("LOOT", QFileInfo(getLootPath())).withArgument("--game=\"Morrowind\"")
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <Windows.h>
|
||||
#include <QPixmap>
|
||||
#include <QRegularExpression>
|
||||
#include <filesystem>
|
||||
|
||||
MorrowindSaveGame::MorrowindSaveGame(QString const &fileName, GameMorrowind const *game) :
|
||||
@@ -9,7 +10,7 @@ MorrowindSaveGame::MorrowindSaveGame(QString const &fileName, GameMorrowind cons
|
||||
{
|
||||
std::filesystem::path realFile(fileName.toStdWString());
|
||||
QString realFileName = QString::fromStdWString(realFile.filename().wstring());
|
||||
m_SaveNumber = realFileName.mid(4, 5).remove(QRegExp("0+$")).toInt();
|
||||
m_SaveNumber = realFileName.mid(4, 5).remove(QRegularExpression("0+$")).toInt();
|
||||
|
||||
FileWrapper file(fileName, "TES3");
|
||||
QStringList dummyPlugins;
|
||||
|
||||
@@ -34,7 +34,7 @@ MorrowindSaveGameInfoWidget::MorrowindSaveGameInfoWidget(MorrowindSaveGameInfo c
|
||||
ui->gameFrame->setStyleSheet("background-color: transparent;");
|
||||
|
||||
QVBoxLayout *gameLayout = new QVBoxLayout();
|
||||
gameLayout->setMargin(0);
|
||||
gameLayout->setContentsMargins(0, 0, 0, 0);
|
||||
gameLayout->setSpacing(2);
|
||||
ui->gameFrame->setLayout(gameLayout);
|
||||
}
|
||||
@@ -56,8 +56,8 @@ void MorrowindSaveGameInfoWidget::setSave(MOBase::ISaveGame const& save) {
|
||||
//This somewhat contorted code is because on my system at least, the
|
||||
//old way of doing this appears to give short date and long time.
|
||||
QDateTime t = morrowindSave.getCreationTime();
|
||||
ui->dateLabel->setText(t.date().toString(Qt::DefaultLocaleShortDate) + " " +
|
||||
t.time().toString(Qt::DefaultLocaleLongDate));
|
||||
ui->dateLabel->setText(QLocale::system().toString(t.date(), QLocale::FormatType::ShortFormat) + " " +
|
||||
QLocale::system().toString(t.time(), QLocale::FormatType::ShortFormat));
|
||||
ui->screenshotLabel->setPixmap(QPixmap::fromImage(morrowindSave.getScreenshot()));
|
||||
if (ui->gameFrame->layout() != nullptr) {
|
||||
QLayoutItem *item = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user