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 8fdd662 + 420b678 commit 85edc47
Show file tree
Hide file tree
Showing 10 changed files with 220 additions and 54 deletions.
163 changes: 161 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ if(APPLE)
endif()

project(mixxx VERSION 2.5.0)
enable_language(C CXX)
# Work around missing version suffixes support https://gitlab.kitware.com/cmake/cmake/-/issues/16716
set(MIXXX_VERSION_PRERELEASE "alpha") # set to "alpha" "beta" or ""

Expand Down Expand Up @@ -1096,7 +1097,6 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/util/logger.cpp
src/util/logging.cpp
src/util/mac.cpp
src/util/moc_included_test.cpp
src/util/movinginterquartilemean.cpp
src/util/rangelist.cpp
src/util/readaheadsamplebuffer.cpp
Expand Down Expand Up @@ -1197,6 +1197,164 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/widget/wwidgetgroup.cpp
src/widget/wwidgetstack.cpp
)
target_precompile_headers(mixxx-lib PUBLIC
src/audio/frame.h
src/audio/signalinfo.h
src/audio/streaminfo.h
src/audio/types.h
src/control/control.h
src/control/controlaudiotaperpot.h
src/control/controlbehavior.h
src/control/controlcompressingproxy.h
src/control/controleffectknob.h
src/control/controlencoder.h
src/control/controlindicator.h
src/control/controlindicatortimer.h
src/control/controllinpotmeter.h
src/control/controllogpotmeter.h
src/control/controlmodel.h
src/control/controlobject.h
src/control/controlobjectscript.h
src/control/controlpotmeter.h
src/control/controlproxy.h
src/control/controlpushbutton.h
src/control/controlsortfiltermodel.h
src/control/controlttrotary.h
src/control/controlvalue.h
src/control/convert.h
src/control/pollingcontrolproxy.h
src/controllers/defs_controllers.h
src/defs_urls.h
src/effects/defs.h
src/engine/channelhandle.h
src/engine/engine.h
src/errordialoghandler.h
src/track/track.h
src/track/track_decl.h
src/track/trackid.h
src/track/trackinfo.h
src/track/trackiterator.h
src/track/trackmetadata.h
src/track/tracknumbers.h
src/track/trackrecord.h
src/track/trackref.h
src/util/alphabetafilter.h
src/util/assert.h
src/util/battery/battery.h
src/util/cache.h
src/util/circularbuffer.h
src/util/class.h
src/util/cmdlineargs.h
src/util/color/color.h
src/util/color/colorpalette.h
src/util/color/predefinedcolorpalettes.h
src/util/color/rgbcolor.h
src/util/colorcomponents.h
src/util/compatibility/qatomic.h
src/util/compatibility/qbytearray.h
src/util/compatibility/qhash.h
src/util/compatibility/qmutex.h
src/util/console.h
src/util/counter.h
src/util/datetime.h
src/util/db/dbconnection.h
src/util/db/dbconnectionpool.h
src/util/db/dbconnectionpooled.h
src/util/db/dbconnectionpooler.h
src/util/db/dbentity.h
src/util/db/dbfieldindex.h
src/util/db/dbid.h
src/util/db/dbnamedentity.h
src/util/db/fwdsqlquery.h
src/util/db/fwdsqlqueryselectresult.h
src/util/db/sqlite.h
src/util/db/sqllikewildcards.h
src/util/db/sqlqueryfinisher.h
src/util/db/sqlstorage.h
src/util/db/sqlstringformatter.h
src/util/db/sqlsubselectmode.h
src/util/db/sqltransaction.h
src/util/debug.h
src/util/defs.h
src/util/denormalsarezero.h
src/util/desktophelper.h
src/util/dnd.h
src/util/duration.h
src/util/event.h
src/util/experiment.h
src/util/fifo.h
src/util/file.h
src/util/fileaccess.h
src/util/fileinfo.h
src/util/filename.h
src/util/font.h
src/util/fpclassify.h
src/util/gitinfostore.h
src/util/imagefiledata.h
src/util/imageutils.h
src/util/indexrange.h
src/util/itemiterator.h
src/util/lcs.h
src/util/logger.h
src/util/logging.h
src/util/mac.h
src/util/macros.h
src/util/math.h
src/util/memory.h
src/util/messagepipe.h
src/util/movinginterquartilemean.h
src/util/mutex.h
src/util/optional.h
src/util/painterscope.h
src/util/parented_ptr.h
src/util/path.h
src/util/performancetimer.h
src/util/platform.h
src/util/qt.h
src/util/quuid.h
src/util/rampingvalue.h
src/util/rangelist.h
src/util/readaheadsamplebuffer.h
src/util/reference.h
src/util/regex.h
src/util/rescaler.h
src/util/ringdelaybuffer.h
src/util/rotary.h
src/util/runtimeloggingcategory.h
src/util/safelywritablefile.h
src/util/sample.h
src/util/sample_autogen.h
src/util/samplebuffer.h
src/util/sandbox.h
src/util/scopedoverridecursor.h
src/util/screensaver.h
src/util/screensavermanager.h
src/util/semanticversion.h
src/util/singleton.h
src/util/span.h
src/util/stat.h
src/util/statmodel.h
src/util/statsmanager.h
src/util/string.h
src/util/tapfilter.h
src/util/task.h
src/util/taskmonitor.h
src/util/thread_affinity.h
src/util/thread_annotations.h
src/util/threadcputimer.h
src/util/time.h
src/util/timer.h
src/util/trace.h
src/util/translations.h
src/util/types.h
src/util/unique_ptr_vector.h
src/util/valuetransformer.h
src/util/versionstore.h
src/util/widgethelper.h
src/util/workerthread.h
src/util/workerthreadscheduler.h
src/util/xml.h
)
if(QML)
target_sources(mixxx-lib PRIVATE
src/qml/asyncimageprovider.cpp
Expand Down Expand Up @@ -1327,6 +1485,8 @@ if(UNIX AND NOT APPLE)
endif()

if(APPLE)
enable_language(OBJC OBJCXX)

# Enable Automatic Reference Counting (ARC) when compiling Objective-C(++).
# This frees us from having to worry about memory management when interfacing
# with Apple frameworks (e.g. as in itunesmacosimporter.mm) since the compiler
Expand Down Expand Up @@ -1931,7 +2091,6 @@ add_executable(mixxx-test
src/test/wbatterytest.cpp
src/test/wpushbutton_test.cpp
src/test/wwidgetstack_test.cpp
src/util/moc_included_test.cpp
)
find_package(GTest CONFIG REQUIRED)
set_target_properties(mixxx-test PROPERTIES AUTOMOC ON)
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Deere/tool_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<Template src="skin:vumeter_latency.xml">
<SetVariable name="TooltipId">audio_latency_usage</SetVariable>
<SetVariable name="group">[Master]</SetVariable>
<SetVariable name="group">[App]</SetVariable>
<SetVariable name="control">audio_latency_usage</SetVariable>
</Template>
</Children>
Expand Down
2 changes: 1 addition & 1 deletion res/skins/Shade/effectrow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

</Children>
<Connection>
<ConfigKey>[EffectRack1],show</ConfigKey>
<ConfigKey>[Skin],show_effectrack</ConfigKey>
<BindProperty>visible</BindProperty>
</Connection>
</WidgetGroup>
Expand Down
12 changes: 6 additions & 6 deletions src/controllers/hid/hiddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ QDebug operator<<(QDebug dbg, const DeviceInfo& deviceInfo) {
if (!usage.isEmpty()) {
parts.append(QStringLiteral("Usage: ") + usage);
}
const QString interface = deviceInfo.formatInterface();
if (!interface.isEmpty()) {
parts.append(QStringLiteral("Interface: ") + interface);
const QString interfaceId = deviceInfo.formatInterface();
if (!interfaceId.isEmpty()) {
parts.append(QStringLiteral("Interface: ") + interfaceId);
}
if (!deviceInfo.manufacturerString().isEmpty()) {
parts.append(QStringLiteral("Manufacturer: ") + deviceInfo.manufacturerString());
Expand All @@ -129,11 +129,11 @@ QString DeviceCategory::guessFromDeviceInfoImpl(
const DeviceInfo& deviceInfo) const {
// This should be done somehow else, I know. But at least we get started with
// the idea of mapping this information
const QString interface = deviceInfo.formatInterface();
if (!interface.isEmpty()) {
const QString interfaceId = deviceInfo.formatInterface();
if (!interfaceId.isEmpty()) {
// TODO: Guess linux device types somehow as well
// or maybe just fill in the interface number?
return tr("HID Interface %1: ").arg(interface) + deviceInfo.formatUsage();
return tr("HID Interface %1: ").arg(interfaceId) + deviceInfo.formatUsage();
}
if (deviceInfo.usage_page == kGenericDesktopUsagePage) {
switch (deviceInfo.usage) {
Expand Down
7 changes: 0 additions & 7 deletions src/coreservices.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class ControllerManager;
class VinylControlManager;
class TrackCollectionManager;
class Library;
class LV2Backend;

namespace mixxx {

Expand Down Expand Up @@ -82,10 +81,6 @@ class CoreServices : public QObject {
return m_pVCManager;
}

LV2Backend* getLV2Backend() const {
return m_pLV2Backend;
}

std::shared_ptr<EffectsManager> getEffectsManager() const {
return m_pEffectsManager;
}
Expand Down Expand Up @@ -129,8 +124,6 @@ class CoreServices : public QObject {
std::shared_ptr<SettingsManager> m_pSettingsManager;
std::shared_ptr<mixxx::ControlIndicatorTimer> m_pControlIndicatorTimer;
std::shared_ptr<EffectsManager> m_pEffectsManager;
// owned by EffectsManager
LV2Backend* m_pLV2Backend;
std::shared_ptr<EngineMixer> m_pEngine;
std::shared_ptr<SoundManager> m_pSoundManager;
std::shared_ptr<PlayerManager> m_pPlayerManager;
Expand Down
18 changes: 18 additions & 0 deletions src/preferences/configobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,21 @@ template <class ValueType> class ConfigObject {
// not be opened; otherwise true.
bool parse();
};

// Specialization must be declared before the first use that would cause
// implicit instantiation, in every translation unit where such use occurs.
// See <https://en.cppreference.com/w/cpp/language/template_specialization> for
// details.
template<>
template<>
QString ConfigObject<ConfigValue>::getValue(
const ConfigKey& key, const QString& default_value) const;
template<>
template<>
bool ConfigObject<ConfigValue>::getValue(const ConfigKey& key, const bool& default_value) const;
template<>
template<>
void ConfigObject<ConfigValue>::setValue(const ConfigKey& key, const QString& value);
template<>
template<>
void ConfigObject<ConfigValue>::setValue(const ConfigKey& key, const bool& value);
29 changes: 17 additions & 12 deletions src/preferences/dialog/dlgprefinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,16 @@ void DlgPrefInterface::slotUpdateSchemes() {
}

void DlgPrefInterface::slotUpdate() {
const SkinPointer pSkinOnUpdate = m_pSkinLoader->getConfiguredSkin();
if (pSkinOnUpdate != nullptr && pSkinOnUpdate->isValid()) {
m_skinNameOnUpdate = pSkinOnUpdate->name();
} else {
m_skinNameOnUpdate = m_pSkinLoader->getDefaultSkinName();
if (m_pSkinLoader) {
const SkinPointer pSkinOnUpdate = m_pSkinLoader->getConfiguredSkin();
if (pSkinOnUpdate != nullptr && pSkinOnUpdate->isValid()) {
m_skinNameOnUpdate = pSkinOnUpdate->name();
} else {
m_skinNameOnUpdate = m_pSkinLoader->getDefaultSkinName();
}
ComboBoxSkinconf->setCurrentIndex(ComboBoxSkinconf->findText(m_skinNameOnUpdate));
slotUpdateSchemes();
}
ComboBoxSkinconf->setCurrentIndex(ComboBoxSkinconf->findText(m_skinNameOnUpdate));
slotUpdateSchemes();

m_localeOnUpdate = m_pConfig->getValue(ConfigKey(kConfigGroup, kLocaleKey));
ComboBoxLocale->setCurrentIndex(ComboBoxLocale->findData(m_localeOnUpdate));
Expand All @@ -286,9 +288,11 @@ void DlgPrefInterface::slotUpdate() {
}

void DlgPrefInterface::slotResetToDefaults() {
int index = ComboBoxSkinconf->findText(m_pSkinLoader->getDefaultSkinName());
ComboBoxSkinconf->setCurrentIndex(index);
slotSetSkin(index);
if (m_pSkinLoader) {
int index = ComboBoxSkinconf->findText(m_pSkinLoader->getDefaultSkinName());
ComboBoxSkinconf->setCurrentIndex(index);
slotSetSkin(index);
}

// Use System locale
ComboBoxLocale->setCurrentIndex(0);
Expand Down Expand Up @@ -428,8 +432,9 @@ void DlgPrefInterface::slotApply() {
}

// load skin/scheme if necessary
if (m_pSkin->name() != m_skinNameOnUpdate ||
m_colorScheme != m_colorSchemeOnUpdate) {
if (m_pSkin &&
(m_pSkin->name() != m_skinNameOnUpdate ||
m_colorScheme != m_colorSchemeOnUpdate)) {
// ColorSchemeParser::setupLegacyColorSchemes() reads scheme from config
emit reloadUserInterface();
// Allow switching skins multiple times without closing the dialog
Expand Down
Loading

0 comments on commit 85edc47

Please sign in to comment.