Skip to content

Commit

Permalink
Merge branch '2.4' of github.com:mixxxdj/mixxx
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Sep 26, 2023
2 parents 998db60 + 814fd46 commit 7534092
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/encoder/encoderfdkaac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,12 @@ QString EncoderFdkAac::buttWindowsFdkAac() {

// Typical name for a butt installation folder
// is "butt-x.x.x" so list subfolders beginning with "butt"
QStringList nameFilters("butt*");
QStringList subfolders =
folder.entryList(nameFilters, QDir::Dirs, QDir::Name);
const QStringList subfolders =
folder.entryList(QStringList{"butt*"}, QDir::Dirs, QDir::Name);

// If a butt installation is found, try
// to find libfdk-aac in it
for (const auto& subName : qAsConst(subfolders)) {
for (const auto& subName : subfolders) {
if (!folder.cd(subName)) {
continue;
}
Expand Down
20 changes: 11 additions & 9 deletions src/util/font.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,23 @@ class FontUtils {
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QFontDatabase database;
#endif
QStringList families = QFontDatabase::applicationFontFamilies(result);
foreach (const QString& family, families) {
QStringList pointSizesStr;
const QStringList families = QFontDatabase::applicationFontFamilies(result);
for (const QString& family : families) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QStringList styles = QFontDatabase::styles(family);
const QStringList styles = QFontDatabase::styles(family);
#else
QStringList styles = database.styles(family);
const QStringList styles = database.styles(family);
#endif
foreach (const QString& style, styles) {
for (const QString& style : styles) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QList<int> pointSizes = QFontDatabase::pointSizes(family, style);
const QList<int> pointSizes = QFontDatabase::pointSizes(family, style);
#else
QList<int> pointSizes = database.pointSizes(family, style);
const QList<int> pointSizes = database.pointSizes(family, style);
#endif
QStringList pointSizesStr;
foreach (int point, pointSizes) {
pointSizesStr.clear();
pointSizesStr.reserve(pointSizes.count());
for (int point : pointSizes) {
pointSizesStr.append(QString::number(point));
}
qDebug() << "FONT LOADED family:" << family
Expand Down
3 changes: 2 additions & 1 deletion src/widget/weffectchainpresetbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ void WEffectChainPresetButton::populateMenu() {
// Chain preset items
const EffectsBackendManagerPointer bem = m_pEffectsManager->getBackendManager();
bool presetIsReadOnly = true;
QStringList effectNames;
for (const auto& pChainPreset : m_pChainPresetManager->getPresetsSorted()) {
QString title = pChainPreset->name();
if (title == m_pChain->presetName()) {
Expand All @@ -63,7 +64,6 @@ void WEffectChainPresetButton::populateMenu() {
}
QString tooltip =
QStringLiteral("<b>") + pChainPreset->name() + QStringLiteral("</b>");
QStringList effectNames;
for (const auto& pEffectPreset : pChainPreset->effectPresets()) {
if (!pEffectPreset->isEmpty()) {
effectNames.append(bem->getDisplayNameForEffectPreset(pEffectPreset));
Expand All @@ -73,6 +73,7 @@ void WEffectChainPresetButton::populateMenu() {
tooltip.append("<br/>");
tooltip.append(effectNames.join("<br/>"));
}
effectNames.clear();
parented_ptr<QAction> pAction = make_parented<QAction>(title, this);
connect(pAction,
&QAction::triggered,
Expand Down
3 changes: 2 additions & 1 deletion src/widget/weffectchainpresetselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void WEffectChainPresetSelector::populate() {
}

const EffectsBackendManagerPointer bem = m_pEffectsManager->getBackendManager();
QStringList effectNames;
for (int i = 0; i < presetList.size(); i++) {
auto pChainPreset = presetList.at(i);
QString elidedDisplayName = metrics.elidedText(pChainPreset->name(),
Expand All @@ -83,7 +84,6 @@ void WEffectChainPresetSelector::populate() {
addItem(elidedDisplayName, QVariant(pChainPreset->name()));
QString tooltip =
QStringLiteral("<b>") + pChainPreset->name() + QStringLiteral("</b>");
QStringList effectNames;
for (const auto& pEffectPreset : pChainPreset->effectPresets()) {
if (!pEffectPreset->isEmpty()) {
effectNames.append(bem->getDisplayNameForEffectPreset(pEffectPreset));
Expand All @@ -93,6 +93,7 @@ void WEffectChainPresetSelector::populate() {
tooltip.append("<br/>");
tooltip.append(effectNames.join("<br/>"));
}
effectNames.clear();
setItemData(i, tooltip, Qt::ToolTipRole);
}

Expand Down

0 comments on commit 7534092

Please sign in to comment.