diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2022-01-15 17:45:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-15 17:45:04 +0100 |
commit | 22f4d7da510ff048da92730c8da4c28e42873ce4 (patch) | |
tree | 28409efc4327cff3563aa2abdf90dae98f8c1754 | |
parent | f1c721757085d9b81b92a6d61d7f5528ecca840d (diff) | |
parent | 68e7f37f945ba2a6353f22c296b5963693138588 (diff) |
Merge pull request #4620 from Holzhaus/cleanup
Qt cleanups
-rw-r--r-- | src/library/serato/seratofeature.cpp | 1 | ||||
-rw-r--r-- | src/skin/legacy/launchimage.cpp | 2 | ||||
-rw-r--r-- | src/soundio/soundmanagerconfig.cpp | 5 | ||||
-rw-r--r-- | src/soundio/soundmanagerconfig.h | 3 | ||||
-rw-r--r-- | src/widget/wcolorpicker.cpp | 1 | ||||
-rw-r--r-- | src/widget/weffectpushbutton.cpp | 1 | ||||
-rw-r--r-- | src/widget/wtrackmenu.cpp | 4 |
7 files changed, 5 insertions, 12 deletions
diff --git a/src/library/serato/seratofeature.cpp b/src/library/serato/seratofeature.cpp index a3c8772549..0819189b6e 100644 --- a/src/library/serato/seratofeature.cpp +++ b/src/library/serato/seratofeature.cpp @@ -3,6 +3,7 @@ #include <QMap> #include <QMessageBox> #include <QSettings> +#include <QTextCodec> #include <QtDebug> #include "library/dao/trackschema.h" diff --git a/src/skin/legacy/launchimage.cpp b/src/skin/legacy/launchimage.cpp index 6f5b2cdbb1..5e09b8d90c 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); } diff --git a/src/soundio/soundmanagerconfig.cpp b/src/soundio/soundmanagerconfig.cpp index 83709c336b..0d11df70b6 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 0166c216f3..033597a01b 100644 --- a/src/soundio/soundmanagerconfig.h +++ b/src/soundio/soundmanagerconfig.h @@ -32,9 +32,6 @@ public: static const int kDefaultAudioBufferSizeIndex; static const int kDefaultSyncBuffers; - SoundManagerConfig(); - ~SoundManagerConfig(); - bool readFromDisk(); bool writeToDisk() const; QString getAPI() const; diff --git a/src/widget/wcolorpicker.cpp b/src/widget/wcolorpicker.cpp index 5a22068ac7..eb90d97cce 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); diff --git a/src/widget/weffectpushbutton.cpp b/src/widget/weffectpushbutton.cpp index e94ef7f530..a733e51dab 100644 --- a/src/widget/weffectpushbutton.cpp +++ b/src/widget/weffectpushbutton.cpp @@ -1,5 +1,6 @@ #include "widget/weffectpushbutton.h" +#include <QActionGroup> #include <QtDebug> #include "moc_weffectpushbutton.cpp" diff --git a/src/widget/wtrackmenu.cpp b/src/widget/wtrackmenu.cpp index f3ecc1766b..bf7c964e52 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); } |