diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88a6942e..1b1c421a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: build-linux: strategy: matrix: - qtversion: [5.14.2, 6.8.2] + qtversion: [5.14.2, 6.8.*] runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -35,7 +35,7 @@ jobs: run: qmake porymap.pro - name: Compile - run: make + run: make -j8 build-macos: strategy: @@ -53,7 +53,8 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: '6.8.2' + # 6.10 is the first Qt version (by release date) to support macOS 26 + version: '6.10.*' modules: 'qtcharts' cache: 'true' @@ -61,7 +62,7 @@ jobs: run: qmake -config release porymap.pro - name: Compile - run: make + run: make -j8 - name: Create Disk Image if: startsWith(github.ref, 'refs/tags/') diff --git a/src/lib/fex/lexer.cpp b/src/lib/fex/lexer.cpp index e8545f2e..e6591570 100644 --- a/src/lib/fex/lexer.cpp +++ b/src/lib/fex/lexer.cpp @@ -164,7 +164,7 @@ namespace fex // Note: Using QFile instead of ifstream to handle encoding differences between platforms // (specifically to handle accented characters on Windows) QFile file(path); - file.open(QIODevice::ReadOnly); + if (!file.open(QIODevice::ReadOnly)) return Lex(); const QByteArray data = file.readAll(); diff --git a/src/log.cpp b/src/log.cpp index 22da47cf..d2cde0a4 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -195,7 +195,7 @@ void logInit() { dir.mkpath(settingsPath); Log::path = dir.absoluteFilePath(QStringLiteral("porymap.log")); Log::file.setFileName(Log::path); - Log::file.open(QIODevice::WriteOnly | QIODevice::Append); + if (!Log::file.open(QIODevice::WriteOnly | QIODevice::Append)) return; Log::textStream.setDevice(&Log::file); QObject::connect(&Log::displayClearTimer, &QTimer::timeout, [=] { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 318601a8..637c4caf 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -751,9 +751,9 @@ void MainWindow::restoreWindowState() { } void MainWindow::setTheme(QString theme) { - QFile File(QString(":/themes/%1.qss").arg(theme)); - File.open(QFile::ReadOnly); - QString stylesheet = QLatin1String(File.readAll()); + QFile file(QString(":/themes/%1.qss").arg(theme)); + if (!file.open(QFile::ReadOnly)) return; + QString stylesheet = QLatin1String(file.readAll()); stylesheet.append(QString("QWidget { %1 } ").arg(Util::toStylesheetString(porymapConfig.applicationFont))); stylesheet.append(QString("MapTree { %1 } ").arg(Util::toStylesheetString(porymapConfig.mapListFont)));