Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clazy action: Add missing dependency qtdeclarative5-dev #3300

Merged
merged 5 commits into from
Nov 14, 2020
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
37 changes: 36 additions & 1 deletion .github/workflows/clazy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,42 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libavformat-dev libchromaprint-dev libebur128-dev libfftw3-dev libflac-dev libid3tag0-dev liblilv-dev libmad0-dev libmodplug-dev libmp3lame-dev libopus-dev libopusfile-dev libportmidi-dev libprotobuf-dev libqt5opengl5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev librubberband-dev libshout3-dev libsndfile1-dev libsoundtouch-dev libsqlite3-dev libtag1-dev libupower-glib-dev libusb-1.0-0-dev libwavpack-dev portaudio19-dev protobuf-compiler qt5-default qtscript5-dev qt5keychain-dev clazy cmake
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends
clazy
cmake
libavformat-dev
libchromaprint-dev
libebur128-dev
libfftw3-dev
libflac-dev
libid3tag0-dev
liblilv-dev
libmad0-dev
libmodplug-dev
libmp3lame-dev
libopus-dev
libopusfile-dev
libportmidi-dev
libprotobuf-dev
libqt5opengl5-dev
libqt5sql5-sqlite
libqt5svg5-dev
libqt5x11extras5-dev
librubberband-dev
libshout3-dev
libsndfile1-dev
libsoundtouch-dev
libsqlite3-dev
libtag1-dev
libupower-glib-dev
libusb-1.0-0-dev
libwavpack-dev
portaudio19-dev
protobuf-compiler
qt5-default
qtdeclarative5-dev
qtscript5-dev
qt5keychain-dev
- name: Build
run: |
mkdir cmake_build
Expand Down
5 changes: 3 additions & 2 deletions src/engine/controls/cuecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ void CueControl::hotcueSet(HotcueControl* pControl, double value, HotcueSetMode
double cueEndPosition = Cue::kNoPosition;
mixxx::CueType cueType = mixxx::CueType::Invalid;

bool loopEnabled = m_pLoopEnabled->get();
bool loopEnabled = m_pLoopEnabled->toBool();
if (mode == HotcueSetMode::Auto) {
mode = loopEnabled ? HotcueSetMode::Loop : HotcueSetMode::Cue;
}
Expand Down Expand Up @@ -974,7 +974,8 @@ void CueControl::hotcueCueLoop(HotcueControl* pControl, double value) {
// mapping the CUE LOOP mode labeled on some controllers.
setCurrentSavedLoopControlAndActivate(nullptr);
double startPosition = pCue->getPosition();
bool loopActive = m_pLoopEnabled->get() && (startPosition == m_pLoopStartPosition->get());
bool loopActive = m_pLoopEnabled->toBool() &&
(startPosition == m_pLoopStartPosition->get());
setBeatLoop(startPosition, !loopActive);
break;
}
Expand Down
6 changes: 3 additions & 3 deletions src/engine/controls/loopingcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,10 @@ void LoopingControl::slotLoopEnabledValueChangeRequest(double value) {
return;
}

if (value) {
if (value > 0.0) {
// Requested to set loop_enabled to 1
if (m_bLoopingEnabled) {
VERIFY_OR_DEBUG_ASSERT(m_pCOLoopEnabled->get()) {
VERIFY_OR_DEBUG_ASSERT(m_pCOLoopEnabled->toBool()) {
m_pCOLoopEnabled->setAndConfirm(1.0);
}
} else {
Expand All @@ -852,7 +852,7 @@ void LoopingControl::slotLoopEnabledValueChangeRequest(double value) {
// setAndConfirm is called by setLoopingEnabled
setLoopingEnabled(false);
} else {
VERIFY_OR_DEBUG_ASSERT(!m_pCOLoopEnabled->get()) {
VERIFY_OR_DEBUG_ASSERT(!m_pCOLoopEnabled->toBool()) {
m_pCOLoopEnabled->setAndConfirm(0.0);
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/preferences/dialog/dlgpreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ DlgPreferences::DlgPreferences(MixxxMainWindow* mixxx, SkinLoader* pSkinLoader,
#endif

// Find accept and apply buttons
for (QAbstractButton* button : buttonBox->buttons()) {
const auto buttons = buttonBox->buttons();
for (QAbstractButton* button : buttons) {
QDialogButtonBox::ButtonRole role = buttonBox->buttonRole(button);
if (role == QDialogButtonBox::ButtonRole::ApplyRole) {
m_pApplyButton = button;
Expand Down Expand Up @@ -254,7 +255,7 @@ void DlgPreferences::changePage(QTreeWidgetItem* current, QTreeWidgetItem* previ
return;
}

for (PreferencesPage page : m_allPages) {
for (PreferencesPage page : qAsConst(m_allPages)) {
if (current == page.pTreeItem) {
switchToPage(page.pDlg);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/test/hotcuecontrol_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class HotcueControlTest : public BaseSignalPathTest {
}

TrackPointer loadTestTrackWithBpm(double bpm) {
DEBUG_ASSERT(!m_pPlay->get());
DEBUG_ASSERT(!m_pPlay->toBool());
// Setup fake track with 120 bpm can calculate loop size
TrackPointer pTrack = createTestTrack();
pTrack->setBpm(bpm);
Expand Down