Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.3' into 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Mar 7, 2023
2 parents 8d435da + 47834be commit f47475a
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
[#8818](https://github.com/mixxxdj/mixxx/pull/8818)
[#4907](https://github.com/mixxxdj/mixxx/pull/4907)

## [2.3.4](https://launchpad.net/mixxx/+milestone/2.3.4) (unreleased)
## [2.3.4](https://launchpad.net/mixxx/+milestone/2.3.4) (2023-03-03)

* Track Properties: Show 'date added' as local time [#4838](https://github.com/mixxxdj/mixxx/pull/4838) [lp:1980658](https://bugs.launchpad.net/mixxx/+bug/1980658)
* Shade: Fix library sidebar splitter glitch [#4828](https://github.com/mixxxdj/mixxx/pull/4828) [lp:1979823](https://bugs.launchpad.net/mixxx/+bug/1979823)
Expand Down
4 changes: 2 additions & 2 deletions res/linux/org.mixxx.Mixxx.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
Do not edit it manually.
-->
<releases>
<release version="2.4.0" type="development" date="2023-02-22" timestamp="1677050229">
<release version="2.4.0" type="development" date="2023-02-26" timestamp="1677398113">
<description>
<p>
Cover Art
Expand Down Expand Up @@ -1529,7 +1529,7 @@
</ul>
</description>
</release>
<release version="2.3.4" type="development" date="2023-02-22" timestamp="1677050229">
<release version="2.3.4" type="stable" date="2023-03-03" timestamp="1677801600">
<description>
<ul>
<li>
Expand Down
1 change: 0 additions & 1 deletion src/skin/legacy/legacyskinparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,6 @@ QWidget* LegacySkinParser::parseWidgetGroup(const QDomElement& node) {

QWidget* LegacySkinParser::parseWidgetStack(const QDomElement& node) {
ControlObject* pNextControl = controlFromConfigNode(node.toElement(), "NextControl");
;
ConfigKey nextConfigKey;
if (pNextControl != nullptr) {
nextConfigKey = pNextControl->getKey();
Expand Down
48 changes: 48 additions & 0 deletions src/test/enginemastertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ TEST_F(EngineMasterTest, SingleChannelOutputWorks) {
EXPECT_CALL(*pChannel, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel, process(_, MAX_BUFFER_LEN))
Expand Down Expand Up @@ -117,6 +121,10 @@ TEST_F(EngineMasterTest, SingleChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel, process(_, _))
Expand Down Expand Up @@ -163,6 +171,10 @@ TEST_F(EngineMasterTest, TwoChannelOutputWorks) {
EXPECT_CALL(*pChannel1, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel1, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel1, postProcess(160000))
.Times(1);

// Instruct channel 2 to claim it is active, master and not PFL.
EXPECT_CALL(*pChannel2, updateActiveState())
Expand All @@ -177,6 +189,10 @@ TEST_F(EngineMasterTest, TwoChannelOutputWorks) {
EXPECT_CALL(*pChannel2, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel2, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel2, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel1, process(_, MAX_BUFFER_LEN))
Expand Down Expand Up @@ -226,6 +242,10 @@ TEST_F(EngineMasterTest, TwoChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel1, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel1, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel1, postProcess(160000))
.Times(1);

// Instruct channel 2 to claim it is active, master and PFL.
EXPECT_CALL(*pChannel2, updateActiveState())
Expand All @@ -240,6 +260,10 @@ TEST_F(EngineMasterTest, TwoChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel2, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel2, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel2, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel1, process(_, MAX_BUFFER_LEN))
Expand Down Expand Up @@ -294,6 +318,10 @@ TEST_F(EngineMasterTest, ThreeChannelOutputWorks) {
EXPECT_CALL(*pChannel1, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel1, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel1, postProcess(160000))
.Times(1);

// Instruct channel 2 to claim it is active, master and not PFL.
EXPECT_CALL(*pChannel2, updateActiveState())
Expand All @@ -308,6 +336,10 @@ TEST_F(EngineMasterTest, ThreeChannelOutputWorks) {
EXPECT_CALL(*pChannel2, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel2, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel2, postProcess(160000))
.Times(1);

// Instruct channel 3 to claim it is active, master and not PFL.
EXPECT_CALL(*pChannel3, updateActiveState())
Expand All @@ -322,6 +354,10 @@ TEST_F(EngineMasterTest, ThreeChannelOutputWorks) {
EXPECT_CALL(*pChannel3, isPflEnabled())
.Times(1)
.WillOnce(Return(false));
EXPECT_CALL(*pChannel3, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel3, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel1, process(_, MAX_BUFFER_LEN))
Expand Down Expand Up @@ -379,6 +415,10 @@ TEST_F(EngineMasterTest, ThreeChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel1, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel1, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel1, postProcess(160000))
.Times(1);

// Instruct channel 2 to claim it is active, master and not PFL.
EXPECT_CALL(*pChannel2, updateActiveState())
Expand All @@ -393,6 +433,10 @@ TEST_F(EngineMasterTest, ThreeChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel2, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel2, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel2, postProcess(160000))
.Times(1);

// Instruct channel 3 to claim it is active, master and not PFL.
EXPECT_CALL(*pChannel3, updateActiveState())
Expand All @@ -407,6 +451,10 @@ TEST_F(EngineMasterTest, ThreeChannelPFLOutputWorks) {
EXPECT_CALL(*pChannel3, isPflEnabled())
.Times(1)
.WillOnce(Return(true));
EXPECT_CALL(*pChannel3, collectFeatures(_))
.Times(1);
EXPECT_CALL(*pChannel3, postProcess(160000))
.Times(1);

// Instruct the mock to just return when process() gets called.
EXPECT_CALL(*pChannel1, process(_, MAX_BUFFER_LEN))
Expand Down
6 changes: 4 additions & 2 deletions src/widget/woverviewhsv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ bool WOverviewHSV::drawNextPixmapPart() {

const int dataSize = pWaveform->getDataSize();
const double audioVisualRatio = pWaveform->getAudioVisualRatio();
if (dataSize <= 0 || audioVisualRatio <= 0) {
const double trackSamples = getTrackSamples();
if (dataSize <= 0 || audioVisualRatio <= 0 || trackSamples <= 0) {
return false;
}

Expand All @@ -38,11 +39,12 @@ bool WOverviewHSV::drawNextPixmapPart() {
// by total_gain
// We keep full range waveform data to scale it on paint
m_waveformSourceImage = QImage(
static_cast<int>(getTrackSamples() / audioVisualRatio / 2),
static_cast<int>(trackSamples / audioVisualRatio / 2),
2 * 255,
QImage::Format_ARGB32_Premultiplied);
m_waveformSourceImage.fill(QColor(0, 0, 0, 0).value());
}
DEBUG_ASSERT(!m_waveformSourceImage.isNull());

// Always multiple of 2
const int waveformCompletion = pWaveform->getCompletion();
Expand Down
6 changes: 4 additions & 2 deletions src/widget/woverviewlmh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ bool WOverviewLMH::drawNextPixmapPart() {

const int dataSize = pWaveform->getDataSize();
const double audioVisualRatio = pWaveform->getAudioVisualRatio();
if (dataSize <= 0 || audioVisualRatio <= 0) {
const double trackSamples = getTrackSamples();
if (dataSize <= 0 || audioVisualRatio <= 0 || trackSamples <= 0) {
return false;
}

Expand All @@ -39,11 +40,12 @@ bool WOverviewLMH::drawNextPixmapPart() {
// by total_gain
// We keep full range waveform data to scale it on paint
m_waveformSourceImage = QImage(
static_cast<int>(getTrackSamples() / audioVisualRatio / 2),
static_cast<int>(trackSamples / audioVisualRatio / 2),
2 * 255,
QImage::Format_ARGB32_Premultiplied);
m_waveformSourceImage.fill(QColor(0, 0, 0, 0).value());
}
DEBUG_ASSERT(!m_waveformSourceImage.isNull());

// Always multiple of 2
const int waveformCompletion = pWaveform->getCompletion();
Expand Down
6 changes: 4 additions & 2 deletions src/widget/woverviewrgb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ bool WOverviewRGB::drawNextPixmapPart() {

const int dataSize = pWaveform->getDataSize();
const double audioVisualRatio = pWaveform->getAudioVisualRatio();
if (dataSize <= 0 || audioVisualRatio <= 0) {
const double trackSamples = getTrackSamples();
if (dataSize <= 0 || audioVisualRatio <= 0 || trackSamples <= 0) {
return false;
}

Expand All @@ -37,11 +38,12 @@ bool WOverviewRGB::drawNextPixmapPart() {
// by total_gain
// We keep full range waveform data to scale it on paint
m_waveformSourceImage = QImage(
static_cast<int>(getTrackSamples() / audioVisualRatio / 2),
static_cast<int>(trackSamples / audioVisualRatio / 2),
2 * 255,
QImage::Format_ARGB32_Premultiplied);
m_waveformSourceImage.fill(QColor(0, 0, 0, 0).value());
}
DEBUG_ASSERT(!m_waveformSourceImage.isNull());

// Always multiple of 2
const int waveformCompletion = pWaveform->getCompletion();
Expand Down
17 changes: 9 additions & 8 deletions src/widget/wsearchlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ void WSearchLineEdit::saveQueriesInConfig() {

void WSearchLineEdit::resizeEvent(QResizeEvent* e) {
QComboBox::resizeEvent(e);
m_innerHeight = height() - 2 * kBorderWidth;
int innerHeight = height() - 2 * kBorderWidth;
// Test if this is a vertical resize due to changed library font.
// Assuming current button height is innerHeight from last resize,
// we will resize the Clear button icon only if height has changed.
if (m_clearButton->size().height() != m_innerHeight) {
QSize newSize = QSize(m_innerHeight, m_innerHeight);
if (m_clearButton->size().height() != innerHeight) {
QSize newSize = QSize(innerHeight, innerHeight);
m_clearButton->resize(newSize);
m_clearButton->setIconSize(newSize);
// Needed to update the Clear button and the down arrow
Expand All @@ -299,10 +299,10 @@ void WSearchLineEdit::resizeEvent(QResizeEvent* e) {
int top = rect().top() + kBorderWidth;
if (layoutDirection() == Qt::LeftToRight) {
m_clearButton->move(rect().right() -
static_cast<int>(1.7 * m_innerHeight) - kBorderWidth,
static_cast<int>(1.7 * innerHeight) - kBorderWidth,
top);
} else {
m_clearButton->move(static_cast<int>(0.7 * m_innerHeight) + kBorderWidth,
m_clearButton->move(static_cast<int>(0.7 * innerHeight) + kBorderWidth,
top);
}
}
Expand Down Expand Up @@ -685,11 +685,12 @@ void WSearchLineEdit::updateClearAndDropdownButton(const QString& text) {

// Ensure the text is not obscured by the clear button. Otherwise no text,
// no clear button, so the placeholder should use the entire width.
const int paddingPx = text.isEmpty() ? 0 : m_innerHeight;
int innerHeight = height() - 2 * kBorderWidth;
const int paddingPx = text.isEmpty() ? 0 : innerHeight;
const QString clearPos(layoutDirection() == Qt::RightToLeft ? "left" : "right");

// Hide the nonfunctional drop-down button (set width to 0) if the search is disabled.
const int dropDownWidth = isEnabled() ? static_cast<int>(m_innerHeight * 0.7) : 0;
const int dropDownWidth = isEnabled() ? static_cast<int>(innerHeight * 0.7) : 0;

const QString styleSheet = QStringLiteral(
"WSearchLineEdit { padding-%1: %2px; }"
Expand All @@ -703,7 +704,7 @@ void WSearchLineEdit::updateClearAndDropdownButton(const QString& text) {
.arg(clearPos,
QString::number(paddingPx),
QString::number(dropDownWidth),
QString::number(m_innerHeight));
QString::number(innerHeight));
setStyleSheet(styleSheet);
}

Expand Down
2 changes: 0 additions & 2 deletions src/widget/wsearchlineedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ class WSearchLineEdit : public QComboBox, public WBaseWidget {
parented_ptr<QCompleter> m_completer;
parented_ptr<QToolButton> const m_clearButton;

int m_innerHeight;

QTimer m_debouncingTimer;
QTimer m_saveTimer;
bool m_queryEmitted;
Expand Down

0 comments on commit f47475a

Please sign in to comment.