Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Engine/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
}

Expand Down
4 changes: 3 additions & 1 deletion ImagePlugin/QtOpenSRImagePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Ranger/GILoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ 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--;

while (cnt > 0)
{
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--;
}
Expand Down
2 changes: 1 addition & 1 deletion World/Planet.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class OPENSR_WORLD_API PlanetStyle : public Resource
struct Data
{
QString surface, cloud0, cloud1, background;
int radius;
int radius{};
QColor atmosphere;
};

Expand Down
2 changes: 1 addition & 1 deletion World/Ship.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class OPENSR_WORLD_API ShipStyle : public Resource
struct Data
{
QString texture;
int width;
int width{};
};

int width() const;
Expand Down