Skip to content
Merged
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
30 changes: 20 additions & 10 deletions .github/workflows/build-linux-clazy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,29 @@ jobs:
build-linux-clazy:
# This build is only done on one Linux version as it is here only to get the warnings from clazy.
# For other versions see build-linux.yml
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# not using ubuntu 22.04 due to false positive bug in clang
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: sudo apt update
- run: sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
- run: wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
- run: 7z x qwt-${{env.QWT_version}}.zip
- run: cd qwt-${{env.QWT_version}} ; /usr/lib/qt6/bin/qmake
- run: cd qwt-${{env.QWT_version}} ; make -j4
- run: cd qwt-${{env.QWT_version}} ; sudo make install
- run: /usr/lib/qt6/bin/qmake -spec linux-clang QMAKE_CXX="clazy"
- run: |
sudo apt update
sudo apt install -y clazy apt-utils build-essential wget qt6-base-dev-tools qt6-declarative-dev qt6-multimedia-dev libqt6charts6-dev libqt6datavisualization6-dev libqt6svg6-dev libopencv-core-dev libopencv-dev libqwt-qt5-6 libqwt-qt5-dev libarmadillo-dev libgl1-mesa-dev libglu1-mesa-dev
wget -O qwt-${{env.QWT_version}}.zip https://sourceforge.net/projects/qwt/files/qwt/${{env.QWT_version}}/qwt-${{env.QWT_version}}.zip/download?use_mirror=pilotfiber
7z x qwt-${{env.QWT_version}}.zip
cd qwt-${{env.QWT_version}}
/usr/lib/qt6/bin/qmake
make -j4
sudo make install
- run: /usr/lib/qt6/bin/qmake -spec linux-clang QMAKE_CXX="clazy"
- uses: ammaraskar/gcc-problem-matcher@master
# ignore noisy dirs from QT files itself
# all level 1 checks but ignore clazy-no-connect-by-name
# no parallel make with clazy to not mess log
- run: export CLAZY_IGNORE_DIRS=.*usr.* && export CLAZY_CHECKS="level1,no-connect-by-name" && make
- run: |
export CLAZY_IGNORE_DIRS=".*usr.*|.*bezier.*|.*boost.*|.*SingleApplication.*|.*spdlog.*|.*zernike.*" \
&& export CLAZY_CHECKS="level1,no-connect-by-name,function-args-by-value,function-args-by-ref,incorrect-emit,old-style-connect" \
&& make
11 changes: 5 additions & 6 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
** along with DFTFringe. If not, see <http://www.gnu.org/licenses/>.

****************************************************************************/
#include "mainwindow.h"
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "spdlog/spdlog.h"
#include <QtWidgets>
Expand Down Expand Up @@ -1782,7 +1782,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()

{
QString cmd = QString("ffmpeg -framerate 1 -i %1%03d.jpg -c:v libx264 -vf format=yuv420p -y -r 25 %2")
.arg(dowavefront ? waveprefix : astigprefix,
.arg(dowavefront ? waveprefix : astigprefix,
dowavefront ? "waveFronts.mp4" : "astig.mp4");

bool ok = false;
Expand Down Expand Up @@ -1813,9 +1813,9 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
qDebug() << "plain text"<< text;
QApplication::setOverrideCursor(Qt::WaitCursor);
QProcess *proc = new QProcess;

#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QObject::connect(proc, &QProcess::finished, proc, &QObject::deleteLater);
QObject::connect(proc, &QProcess::finished, proc, &QObject::deleteLater);
connect(proc, &QProcess::finished, [=](int exitCode, QProcess::ExitStatus exitStatus){ qDebug() << "what" << exitStatus << "code" << exitCode; });
#else
//QProcess::finished is overloaded in Qt5
Expand Down Expand Up @@ -1857,7 +1857,7 @@ void MainWindow::on_actionCreate_Movie_of_wavefronts_triggered()
loop.exec();

qDebug() << "done" ;


QApplication::restoreOverrideCursor();

Expand Down Expand Up @@ -2163,7 +2163,6 @@ void MainWindow::load_from_url(){
//});
loop.exec();
QByteArray buffer = reply->readAll();
QImage b(buffer);
QSettings set;
QString dirPath = set.value("importIgramPath",".").toString();
// Get the current date and time
Expand Down
4 changes: 2 additions & 2 deletions startestmoviedlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void startestMovieDlg::on_start_clicked()
}


QImage brighten(QImage image ,int brightness_factor){
QImage brighten(const QImage &image ,int brightness_factor){
QImage imaget = image.copy();

for (int y = 0; y < imaget.height(); ++y) {
Expand All @@ -61,7 +61,7 @@ QImage brighten(QImage image ,int brightness_factor){
return imaget;
}

void startestMovieDlg::setImage(QImage image){
void startestMovieDlg::setImage(const QImage &image){
m_image = image.copy();


Expand Down
2 changes: 1 addition & 1 deletion startestmoviedlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class startestMovieDlg : public QDialog
public:
explicit startestMovieDlg(SimulationsView *view);
~startestMovieDlg();
void setImage(QImage image);
void setImage(const QImage &image);
bool m_recording = false;
int m_frameNumber = 0;
int m_bright = 1;
Expand Down
Loading