Skip to content

Commit

Permalink
update qt version for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pifopi committed Dec 4, 2024
1 parent 177e8cc commit 906be91
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cpp-ci-serial-programs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
fail-fast: false
matrix:
os: [windows-2022, macos-13, ubuntu-24.04]
qt_version: ['5.12.12', '6.7.2']
qt_version: ['5.12.12', '6.8.1']
include:
- qt_version: '5.12.12'
qt_version_major: '5'
qt_modules: ''

- qt_version: '6.7.2'
- qt_version: '6.8.1'
qt_version_major: '6'
qt_modules: 'qtmultimedia qtserialport'

Expand All @@ -37,7 +37,7 @@ jobs:
if: startsWith(matrix.os, 'mac')
run: |
brew install opencv
- uses: jurplel/install-qt-action@v3
- uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
modules: ${{ matrix.qt_modules }}
Expand Down
18 changes: 18 additions & 0 deletions Common/Qt/Options/BooleanCheckBoxWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,21 @@ BooleanCheckBoxCellWidget::BooleanCheckBoxCellWidget(QWidget& parent, BooleanChe
m_box = new QCheckBox(this);
m_box->setChecked(m_value);
layout->addWidget(m_box);
#if QT_VERSION < 0x060700
connect(
m_box, &QCheckBox::stateChanged,
this, [this](int){
m_value = m_box->isChecked();
}
);
#else
connect(
m_box, &QCheckBox::checkStateChanged,
this, [this](Qt::CheckState){
m_value = m_box->isChecked();
}
);
#endif
value.add_listener(*this);
}
void BooleanCheckBoxCellWidget::update_value(){
Expand Down Expand Up @@ -81,12 +90,21 @@ BooleanCheckBoxOptionWidget::BooleanCheckBoxOptionWidget(QWidget& parent, Boolea
m_box = new QCheckBox(this);
m_box->setChecked(m_value);
layout->addWidget(m_box, 1);
#if QT_VERSION < 0x060700
connect(
m_box, &QCheckBox::stateChanged,
this, [this](int){
m_value = m_box->isChecked();
}
);
#else
connect(
m_box, &QCheckBox::checkStateChanged,
this, [this](int){
m_value = m_box->isChecked();
}
);
#endif
value.add_listener(*this);
}
void BooleanCheckBoxOptionWidget::update_value(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ CommandRow::CommandRow(
m_overlay_boxes, &QCheckBox::clicked,
this, [this](bool checked){ m_session.set_enabled_boxes(checked); }
);
#if QT_VERSION < 0x060700
connect(
m_overlay_text, &QCheckBox::stateChanged,
this, [this](bool checked){ m_session.set_enabled_text(checked); }
Expand All @@ -91,6 +92,20 @@ CommandRow::CommandRow(
m_overlay_stats, &QCheckBox::stateChanged,
this, [this](bool checked){ m_session.set_enabled_stats(checked); }
);
#else
connect(
m_overlay_text, &QCheckBox::checkStateChanged,
this, [this](Qt::CheckState state){ m_session.set_enabled_text(state == Qt::Checked); }
);
connect(
m_overlay_log, &QCheckBox::checkStateChanged,
this, [this](Qt::CheckState state){ m_session.set_enabled_log(state == Qt::Checked); }
);
connect(
m_overlay_stats, &QCheckBox::checkStateChanged,
this, [this](Qt::CheckState state){ m_session.set_enabled_stats(state == Qt::Checked); }
);
#endif
connect(
m_load_profile_button, &QPushButton::clicked,
this, [this](bool) { emit load_profile(); }
Expand Down

0 comments on commit 906be91

Please sign in to comment.