diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 98d78ee4..dda21591 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,9 +2,9 @@ name: Code formatting and linting on: push: - branches: [ master ] + branches: [ master, ci-rework ] pull_request: - branches: [ master ] + branches: [ master, ci-rework ] env: BUILD_TYPE: Debug @@ -32,10 +32,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: + version: '19' database: 'build' ignore: 'QML|data|.github|build|Engine/3rdparty|Engine/shaders|tools' style: 'file' tidy-checks: '' + step-summary: true files-changed-only: false tidy-review: true format-review: true diff --git a/Engine/Engine.cpp b/Engine/Engine.cpp index 2036bf42..42878018 100644 --- a/Engine/Engine.cpp +++ b/Engine/Engine.cpp @@ -178,7 +178,8 @@ void Engine::showQMLComponent(const QString &url) for (auto root : d->qmlEngine->rootObjects()) { - QMetaObject::invokeMethod(root, "changeScreen", Q_ARG(QVariant, QUrl(url)), Q_ARG(QVariant, QVariantMap())); + QMetaObject::invokeMethod(root, "destroyAndChangeScreen", Q_ARG(QVariant, QUrl(url)), + Q_ARG(QVariant, QVariantMap())); } } diff --git a/ImagePlugin/QtOpenSRImagePlugin.cpp b/ImagePlugin/QtOpenSRImagePlugin.cpp index 07d02d3b..3cd4af8d 100644 --- a/ImagePlugin/QtOpenSRImagePlugin.cpp +++ b/ImagePlugin/QtOpenSRImagePlugin.cpp @@ -110,7 +110,9 @@ QImageIOHandler *QtOpenSRImagePlugin::create(QIODevice *device, const QByteArray QStringList QtOpenSRImagePlugin::keys() const { - return QStringList() << "gi" << "gai" << "hai" << "psd"; + QStringList keys; + keys << "gi" << "gai" << "hai" << "psd"; + return keys; } } // namespace OpenSR diff --git a/Ranger/GILoader.cpp b/Ranger/GILoader.cpp index 0e3388ad..823de0aa 100644 --- a/Ranger/GILoader.cpp +++ b/Ranger/GILoader.cpp @@ -100,7 +100,7 @@ void drawR5G6B5(QImage &result, int x, int y, QIODevice *dev) quint16 color{}; dev->read((char *)&color, 2); *((uint32_t *)row) = (0xff000000) | (((color >> 11) & 0x1f) << 19) | (((color >> 5) & 0x3f) << 10) | - (((color) & 0x1f) << 3); + ((color & 0x1f) << 3); row += 4; cnt--; @@ -108,7 +108,7 @@ void drawR5G6B5(QImage &result, int x, int y, QIODevice *dev) { dev->read((char *)&color, 2); *((uint32_t *)row) = (0xff000000) | (((color >> 11) & 0x1f) << 19) | (((color >> 5) & 0x3f) << 10) | - (((color) & 0x1f) << 3); + ((color & 0x1f) << 3); row += 4; cnt--; } diff --git a/World/Planet.h b/World/Planet.h index 39fa029f..f0eb4d21 100644 --- a/World/Planet.h +++ b/World/Planet.h @@ -44,7 +44,7 @@ class OPENSR_WORLD_API PlanetStyle : public Resource struct Data { QString surface, cloud0, cloud1, background; - int radius; + int radius{}; QColor atmosphere; }; diff --git a/World/Ship.h b/World/Ship.h index db7fa757..a00c9336 100644 --- a/World/Ship.h +++ b/World/Ship.h @@ -39,7 +39,7 @@ class OPENSR_WORLD_API ShipStyle : public Resource struct Data { QString texture; - int width; + int width{}; }; int width() const;