Skip to content

Commit

Permalink
Merge pull request mixxxdj#12268 from uklotzde/qt-6.6
Browse files Browse the repository at this point in the history
Fix Qt 6.6 build
  • Loading branch information
JoergAtGithub authored Nov 6, 2023
2 parents 9129ace + 90d206e commit ad92390
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 19 deletions.
9 changes: 7 additions & 2 deletions src/util/translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,17 @@ class Translations {
// English translation file and the fact that we don't ship a
// mixxx_en.qm.
if (locale.language() == QLocale::English &&
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
(locale.territory() == QLocale::UnitedStates ||
locale.territory() == QLocale::AnyCountry)
#else
(locale.country() == QLocale::UnitedStates ||
locale.country() == QLocale::AnyCountry)) {
locale.country() == QLocale::AnyCountry)
#endif
) {
qDebug() << "Skipping loading of translations because the locale is 'en' or 'en_US'.";
return;
}

// Load Qt translations for this locale from the system translation
// path. This is the lowest precedence QTranslator.
bool qtFound = installTranslations(pApp,
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/allshader/waveformrenderbeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void WaveformRenderBeat::initializeGL() {
}

void WaveformRenderBeat::setup(const QDomNode& node, const SkinContext& context) {
m_color.setNamedColor(context.selectString(node, "BeatColor"));
m_color = QColor(context.selectString(node, "BeatColor"));
m_color = WSkinColor::getCorrectColor(m_color).toRgb();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void WaveformRendererEndOfTrack::setup(const QDomNode& node, const SkinContext&
m_color = QColor(200, 25, 20);
const QString endOfTrackColorName = context.selectString(node, "EndOfTrackColor");
if (!endOfTrackColorName.isNull()) {
m_color.setNamedColor(endOfTrackColorName);
m_color = QColor(endOfTrackColorName);
m_color = WSkinColor::getCorrectColor(m_color);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ WaveformRendererPreroll::~WaveformRendererPreroll() = default;

void WaveformRendererPreroll::setup(
const QDomNode& node, const SkinContext& context) {
m_color.setNamedColor(context.selectString(node, "SignalColor"));
m_color = QColor(context.selectString(node, "SignalColor"));
m_color = WSkinColor::getCorrectColor(m_color);
}

Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/waveformrenderbeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WaveformRenderBeat::~WaveformRenderBeat() {
}

void WaveformRenderBeat::setup(const QDomNode& node, const SkinContext& context) {
m_beatColor.setNamedColor(context.selectString(node, "BeatColor"));
m_beatColor = QColor(context.selectString(node, "BeatColor"));
m_beatColor = WSkinColor::getCorrectColor(m_beatColor).toRgb();
}

Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/waveformrendererendoftrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void WaveformRendererEndOfTrack::setup(const QDomNode& node, const SkinContext&
m_color = QColor(200, 25, 20);
const QString endOfTrackColorName = context.selectString(node, "EndOfTrackColor");
if (!endOfTrackColorName.isNull()) {
m_color.setNamedColor(endOfTrackColorName);
m_color = QColor(endOfTrackColorName);
m_color = WSkinColor::getCorrectColor(m_color);
}
m_pen = QPen(QBrush(m_color), 2.5 * scaleFactor());
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/waveformrendererpreroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WaveformRendererPreroll::~WaveformRendererPreroll() {

void WaveformRendererPreroll::setup(
const QDomNode& node, const SkinContext& context) {
m_color.setNamedColor(context.selectString(node, "SignalColor"));
m_color = QColor(context.selectString(node, "SignalColor"));
m_color = WSkinColor::getCorrectColor(m_color);
}

Expand Down
20 changes: 10 additions & 10 deletions src/waveform/renderers/waveformsignalcolors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,51 @@ bool WaveformSignalColors::setup(const QDomNode &node, const SkinContext& contex
// toRgb(). Otherwise Mixxx will waste 3% of its CPU time while rendering
// the filtered waveform doing RGB color space conversions!

m_signalColor.setNamedColor(context.selectString(node, "SignalColor"));
m_signalColor = QColor(context.selectString(node, "SignalColor"));
m_signalColor = WSkinColor::getCorrectColor(m_signalColor).toRgb();

m_lowColor.setNamedColor(context.selectString(node, "SignalLowColor"));
m_lowColor = QColor(context.selectString(node, "SignalLowColor"));
m_lowColor = WSkinColor::getCorrectColor(m_lowColor).toRgb();

m_midColor.setNamedColor(context.selectString(node, "SignalMidColor"));
m_midColor = QColor(context.selectString(node, "SignalMidColor"));
m_midColor = WSkinColor::getCorrectColor(m_midColor).toRgb();

m_highColor.setNamedColor(context.selectString(node, "SignalHighColor"));
m_highColor = QColor(context.selectString(node, "SignalHighColor"));
m_highColor = WSkinColor::getCorrectColor(m_highColor).toRgb();

m_rgbLowColor.setNamedColor(context.selectString(node, "SignalRGBLowColor"));
m_rgbLowColor = QColor(context.selectString(node, "SignalRGBLowColor"));
if (!m_rgbLowColor.isValid()) {
m_rgbLowColor = Qt::red;
}
m_rgbLowColor = WSkinColor::getCorrectColor(m_rgbLowColor).toRgb();

m_rgbMidColor.setNamedColor(context.selectString(node, "SignalRGBMidColor"));
m_rgbMidColor = QColor(context.selectString(node, "SignalRGBMidColor"));
if (!m_rgbMidColor.isValid()) {
m_rgbMidColor = Qt::green;
}
m_rgbMidColor = WSkinColor::getCorrectColor(m_rgbMidColor).toRgb();

m_rgbHighColor.setNamedColor(context.selectString(node, "SignalRGBHighColor"));
m_rgbHighColor = QColor(context.selectString(node, "SignalRGBHighColor"));
if (!m_rgbHighColor.isValid()) {
m_rgbHighColor = Qt::blue;
}
m_rgbHighColor = WSkinColor::getCorrectColor(m_rgbHighColor).toRgb();

// filtered colors
m_rgbLowFilteredColor.setNamedColor(context.selectString(node, "SignalRGBLowFilteredColor"));
m_rgbLowFilteredColor = QColor(context.selectString(node, "SignalRGBLowFilteredColor"));
if (!m_rgbLowFilteredColor.isValid()) {
m_rgbLowFilteredColor = m_rgbLowColor.darker(300);
}
m_rgbLowFilteredColor = WSkinColor::getCorrectColor(m_rgbLowFilteredColor).toRgb();

m_rgbMidFilteredColor.setNamedColor(context.selectString(node, "SignalRGBMidFilteredColor"));
m_rgbMidFilteredColor = QColor(context.selectString(node, "SignalRGBMidFilteredColor"));
if (!m_rgbMidFilteredColor.isValid()) {
m_rgbMidFilteredColor = m_rgbMidColor.darker(300);
;
}
m_rgbMidFilteredColor = WSkinColor::getCorrectColor(m_rgbMidFilteredColor).toRgb();

m_rgbHighFilteredColor.setNamedColor(context.selectString(node, "SignalRGBHighFilteredColor"));
m_rgbHighFilteredColor = QColor(context.selectString(node, "SignalRGBHighFilteredColor"));
if (!m_rgbHighFilteredColor.isValid()) {
m_rgbHighFilteredColor = m_rgbHighColor.darker(300);
;
Expand Down
2 changes: 1 addition & 1 deletion src/widget/woverview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void WOverview::setup(const QDomNode& node, const SkinContext& context) {
m_endOfTrackColor = QColor(200, 25, 20);
const QString endOfTrackColorName = context.selectString(node, "EndOfTrackColor");
if (!endOfTrackColorName.isNull()) {
m_endOfTrackColor.setNamedColor(endOfTrackColorName);
m_endOfTrackColor = QColor(endOfTrackColorName);
m_endOfTrackColor = WSkinColor::getCorrectColor(m_endOfTrackColor);
}

Expand Down

0 comments on commit ad92390

Please sign in to comment.