Changes to compile with Qt6 + Boost 1.77

This commit is contained in:
Jeremy Rimpo
2021-12-05 03:42:43 -06:00
parent 3ef16e335d
commit eac971d443
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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;
+3 -3
View File
@@ -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;