From e7edddb605b058a6a6cd16eee5b666add9ca925f Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 14 Jan 2022 22:46:25 +0100 Subject: [PATCH 1/6] LaunchImage: Use proper QStyleOption::initFrom() method --- src/skin/legacy/launchimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/skin/legacy/launchimage.cpp b/src/skin/legacy/launchimage.cpp index 6f5b2cdbb1d..5e09b8d90c0 100644 --- a/src/skin/legacy/launchimage.cpp +++ b/src/skin/legacy/launchimage.cpp @@ -64,7 +64,7 @@ void LaunchImage::progress(int value, const QString& serviceName) { void LaunchImage::paintEvent(QPaintEvent *) { QStyleOption opt; - opt.init(this); + opt.initFrom(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); } From 0adfe0cc9321eed476bcf29e1a35c35a3331fe4f Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 14 Jan 2022 22:47:14 +0100 Subject: [PATCH 2/6] WColorPicker: Use obsolete QGridLayout::setMargin() This is equivalent to the newer `setContentMargins(0, 0, 0, 0)`. --- src/widget/wcolorpicker.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/widget/wcolorpicker.cpp b/src/widget/wcolorpicker.cpp index 5a22068ac7a..eb90d97cce7 100644 --- a/src/widget/wcolorpicker.cpp +++ b/src/widget/wcolorpicker.cpp @@ -44,7 +44,6 @@ WColorPicker::WColorPicker(Options options, const ColorPalette& palette, QWidget m_pNoColorButton(nullptr), m_pCustomColorButton(nullptr) { QGridLayout* pLayout = new QGridLayout(); - pLayout->setMargin(0); pLayout->setContentsMargins(0, 0, 0, 0); pLayout->setSizeConstraint(QLayout::SetFixedSize); From d02677e97e91807162434361e09350aea4ebe8b6 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 14 Jan 2022 22:48:32 +0100 Subject: [PATCH 3/6] WEffectPushButton: Include necessary QActionGroup class --- src/widget/weffectpushbutton.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widget/weffectpushbutton.cpp b/src/widget/weffectpushbutton.cpp index e94ef7f530c..a733e51dabe 100644 --- a/src/widget/weffectpushbutton.cpp +++ b/src/widget/weffectpushbutton.cpp @@ -1,5 +1,6 @@ #include "widget/weffectpushbutton.h" +#include #include #include "moc_weffectpushbutton.cpp" From 14b70b421286d8e5da56a42248ffcc0c3497efb2 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 14 Jan 2022 23:02:33 +0100 Subject: [PATCH 4/6] SeratoFeature: Add missing QTextCodec include --- src/library/serato/seratofeature.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp index a3c8772549e..0819189b6ed 100644 --- a/src/library/serato/seratofeature.cpp +++ b/src/library/serato/seratofeature.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "library/dao/trackschema.h" From 94beac615796eadd982223d0131e7c7a1418142a Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 14 Jan 2022 23:09:25 +0100 Subject: [PATCH 5/6] WTrackMenu: Use operator| instead of operator+ for QKeySequence This is forward-compatible with Qt6. --- src/widget/wtrackmenu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index f3ecc1766bb..bf7c964e52a 100644 --- a/src/widget/wtrackmenu.cpp +++ b/src/widget/wtrackmenu.cpp @@ -180,7 +180,7 @@ void WTrackMenu::createMenus() { void WTrackMenu::createActions() { const auto hideRemoveKeySequence = - QKeySequence(kHideRemoveShortcutModifier + kHideRemoveShortcutKey); + QKeySequence(kHideRemoveShortcutModifier | kHideRemoveShortcutKey); if (featureIsEnabled(Feature::AutoDJ)) { m_pAutoDJBottomAct = new QAction(tr("Add to Auto DJ Queue (bottom)"), this); @@ -245,7 +245,7 @@ void WTrackMenu::createActions() { // The keypress is caught in WTrackTableView::keyPressEvent if (m_pTrackModel) { m_pPropertiesAct->setShortcut( - QKeySequence(kPropertiesShortcutModifier + kPropertiesShortcutKey)); + QKeySequence(kPropertiesShortcutModifier | kPropertiesShortcutKey)); } connect(m_pPropertiesAct, &QAction::triggered, this, &WTrackMenu::slotShowDlgTrackInfo); } From 68e7f37f945ba2a6353f22c296b5963693138588 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Sat, 15 Jan 2022 01:58:26 +0100 Subject: [PATCH 6/6] SoundManagerConfig: Fix undefined default ctor andr remove empty dtor --- src/soundio/soundmanagerconfig.cpp | 5 ----- src/soundio/soundmanagerconfig.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/soundio/soundmanagerconfig.cpp b/src/soundio/soundmanagerconfig.cpp index 83709c336b6..0d11df70b69 100644 --- a/src/soundio/soundmanagerconfig.cpp +++ b/src/soundio/soundmanagerconfig.cpp @@ -54,11 +54,6 @@ SoundManagerConfig::SoundManagerConfig(SoundManager* pSoundManager) m_configFile = QFileInfo(QDir(CmdlineArgs::Instance().getSettingsPath()).filePath(SOUNDMANAGERCONFIG_FILENAME)); } -SoundManagerConfig::~SoundManagerConfig() { - // don't write to disk here, it's SoundManager's responsibility - // to save its own configuration -- bkgood -} - /** * Read the SoundManagerConfig xml serialization at the predetermined * path diff --git a/src/soundio/soundmanagerconfig.h b/src/soundio/soundmanagerconfig.h index 0166c216f30..033597a01b8 100644 --- a/src/soundio/soundmanagerconfig.h +++ b/src/soundio/soundmanagerconfig.h @@ -32,9 +32,6 @@ class SoundManagerConfig { static const int kDefaultAudioBufferSizeIndex; static const int kDefaultSyncBuffers; - SoundManagerConfig(); - ~SoundManagerConfig(); - bool readFromDisk(); bool writeToDisk() const; QString getAPI() const;