Skip to content

Commit

Permalink
Merge pull request #4620 from Holzhaus/cleanup
Browse files Browse the repository at this point in the history
Qt cleanups
  • Loading branch information
Holzhaus authored Jan 15, 2022
2 parents f1c7217 + 68e7f37 commit 22f4d7d
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/library/serato/seratofeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <QMap>
#include <QMessageBox>
#include <QSettings>
#include <QTextCodec>
#include <QtDebug>

#include "library/dao/trackschema.h"
Expand Down
2 changes: 1 addition & 1 deletion src/skin/legacy/launchimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
5 changes: 0 additions & 5 deletions src/soundio/soundmanagerconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/soundio/soundmanagerconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class SoundManagerConfig {
static const int kDefaultAudioBufferSizeIndex;
static const int kDefaultSyncBuffers;

SoundManagerConfig();
~SoundManagerConfig();

bool readFromDisk();
bool writeToDisk() const;
QString getAPI() const;
Expand Down
1 change: 0 additions & 1 deletion src/widget/wcolorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/widget/weffectpushbutton.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "widget/weffectpushbutton.h"

#include <QActionGroup>
#include <QtDebug>

#include "moc_weffectpushbutton.cpp"
Expand Down
4 changes: 2 additions & 2 deletions src/widget/wtrackmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 22f4d7d

Please sign in to comment.