Skip to content

Commit

Permalink
Merge pull request #517 from IENT/feature/addUpToDateCI
Browse files Browse the repository at this point in the history
bugfix/build failure Qt6 in modern clang
  • Loading branch information
ChristianFeldmann authored Feb 21, 2023
2 parents 731e71d + 014626e commit a72b395
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 152 deletions.
54 changes: 42 additions & 12 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,48 @@ jobs:
matrix:
include:
- os: ubuntu-18.04
INSTALL_LIBS: libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 qt5-default
QMAKE_COMMAND: qmake
- os: ubuntu-20.04
INSTALL_LIBS: libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 qt5-default
QMAKE_COMMAND: qmake
- os: ubuntu-22.04
INSTALL_LIBS: qt6-base-dev
QMAKE_COMMAND: qmake6
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- name: Install Linux packages
run: |
sudo apt-get update
sudo apt-get install libgl1-mesa-dev libxkbcommon-x11-0 libpcre2-16-0 qt5-default
sudo apt-get install ${{matrix.INSTALL_LIBS}}
- name: Build
run: |
cd $GITHUB_WORKSPACE
mkdir build
cd build
qmake CONFIG+=UNITTESTS ..
make -j 2
${{matrix.QMAKE_COMMAND}} CONFIG+=UNITTESTS ..
make -j$(nproc)
make check
build-mac-native:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-12
steps:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- name: Install packages
run: |
brew install qt
- name: Build
run: |
cd $GITHUB_WORKSPACE
mkdir build
cd build
qmake6 CONFIG+=UNITTESTS ..
make -j $(sysctl -n hw.logicalcpu)
make check
build-unix:
runs-on: ${{ matrix.os }}
Expand All @@ -39,18 +66,21 @@ jobs:
LIBDE265_REMOTE: libde265.so
LIBDE265_LOCAL: libde265-internals.so
ARTIFACT_NAME: YUView.AppImage
CPU_COUNT_COMMAND: nproc
- os: macos-10.15
QT_FILE: qtBase_5.15.1_mac.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac.zip
# - os: macos-11.0
# QT_FILE: qtBase_5.15.1_mac.zip
# LIBDE265_REMOTE: libde265.dylib
# LIBDE265_LOCAL: libde265-internals.dylib
# ARTIFACT_NAME: YUView-Mac-BigSur.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
- os: macos-11.0
QT_FILE: qtBase_5.15.1_mac.zip
LIBDE265_REMOTE: libde265.dylib
LIBDE265_LOCAL: libde265-internals.dylib
ARTIFACT_NAME: YUView-Mac-BigSur.zip
CPU_COUNT_COMMAND: sysctl -n hw.logicalcpu
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- name: Install Qt base
run: |
Expand Down Expand Up @@ -95,7 +125,7 @@ jobs:
mkdir build
cd build
qmake CONFIG+=UNITTESTS ..
make -j 2
make -j $(${{matrix.CPU_COUNT_COMMAND}})
make check
- name: Build App (Mac)
run: |
Expand Down Expand Up @@ -147,7 +177,7 @@ jobs:
auto_update: false
ARTIFACT_NAME: YUView-Win-noautoupdate.zip
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow
- name: Install Qt base
run: |
Expand Down
4 changes: 2 additions & 2 deletions YUViewLib/src/common/FunctionsGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ QIcon functionsGui::convertIcon(QString iconPath)
// Get the active and inactive colors
QStringList colors = functions::getThemeColors(themeName);
QRgb activeColor, inActiveColor;
if (colors.count() == 4)
if (colors.size() == 4)
{
QColor active(colors[1]);
QColor inactive(colors[2]);
Expand Down Expand Up @@ -116,7 +116,7 @@ QPixmap functionsGui::convertPixmap(QString pixmapPath)
// Get the active and inactive colors
QStringList colors = functions::getThemeColors(themeName);
QRgb activeColor;
if (colors.count() == 4)
if (colors.size() == 4)
{
QColor active(colors[1]);
activeColor = active.rgb();
Expand Down
3 changes: 2 additions & 1 deletion YUViewLib/src/ffmpeg/AVCodecWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
#pragma once

#include "FFMpegLibrariesTypes.h"
#include <QList>

#include <vector>

namespace FFmpeg
{
Expand Down
10 changes: 5 additions & 5 deletions YUViewLib/src/playlistitem/playlistItemImageFileSequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void playlistItemImageFileSequence::fillImageFileList(QStringList & imageFiles,
QString base = fi.baseName();

int lastN = 0;
for (int i = base.count() - 1; i >= 0; i--)
for (auto i = base.size() - 1; i >= 0; i--)
{
// Get the char and see if it is a number
if (base[i].isDigit())
Expand All @@ -117,7 +117,7 @@ void playlistItemImageFileSequence::fillImageFileList(QStringList & imageFiles,
}

// The base name without the indexing number at the end
QString absBaseName = base.left(base.count() - lastN);
QString absBaseName = base.left(base.size() - lastN);

// List all files in the directory and get all that have the same pattern.
QDir currentDir(fi.path());
Expand Down Expand Up @@ -171,7 +171,7 @@ InfoData playlistItemImageFileSequence::getInfo() const
if (this->video->isFormatValid())
{
auto videoSize = this->video->getFrameSize();
auto nrFrames = this->imageFiles.size();
auto nrFrames = this->imageFiles.size();
info.items.append(InfoItem("Num Frames", QString::number(nrFrames)));
info.items.append(InfoItem("Resolution",
QString("%1x%2").arg(videoSize.width).arg(videoSize.height),
Expand Down Expand Up @@ -305,7 +305,7 @@ void playlistItemImageFileSequence::setInternals(const QString &filePath)
// Open frame 0 and set the size of it
{
QImage frame0 = QImage(imageFiles[0]);
auto s = frame0.size();
auto s = frame0.size();
video->setFrameSize(Size(s.width(), s.height()));
}

Expand All @@ -316,7 +316,7 @@ void playlistItemImageFileSequence::setInternals(const QString &filePath)
QString fileName = fi.fileName();
QString base = fi.baseName();

for (int i = base.count() - 1; i >= 0; i--)
for (int i = base.size() - 1; i >= 0; i--)
{
// Get the char and see if it is a number
if (base[i].isDigit())
Expand Down
3 changes: 1 addition & 2 deletions YUViewLib/src/playlistitem/playlistItemRawFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ bool playlistItemRawFile::parseY4MFile()
while (rawData.at(offset) != ' ' && rawData.at(offset) != 10)
{
offset++;
if (offset >= rawData.count())
// End of bufer
if (offset >= rawData.size())
break;
}

Expand Down
Loading

0 comments on commit a72b395

Please sign in to comment.