From 8ea0c3d70349d89b559466fc26775cb55984fc4a Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Thu, 3 Feb 2022 22:06:00 -0500 Subject: [PATCH] Revert "Create wmainmenubar controls in coreservices so they are available to controllers on startup" --- src/coreservices.cpp | 24 ------------------------ src/coreservices.h | 1 - 2 files changed, 25 deletions(-) diff --git a/src/coreservices.cpp b/src/coreservices.cpp index 371d6d7cad7..0415ec27307 100644 --- a/src/coreservices.cpp +++ b/src/coreservices.cpp @@ -423,28 +423,6 @@ void CoreServices::initialize(QApplication* pApp) { m_pTouchShift = std::make_unique(ConfigKey("[Controls]", "touch_shift")); - // The following UI controls must be created here so that controllers can bind to them - // on startup. - m_uiControls.clear(); - const std::vector uiKeys = { - ConfigKey("[Master]", "skin_settings"), - ConfigKey("[Microphone]", "show_microphone"), - ConfigKey(VINYL_PREF_KEY, "show_vinylcontrol"), - ConfigKey("[PreviewDeck]", "show_previewdeck"), - ConfigKey("[Library]", "show_coverart"), - ConfigKey("[Master]", "maximize_library"), - ConfigKey("[Samplers]", "show_samplers"), - ConfigKey("[EffectRack1]", "show"), - ConfigKey("[Skin]", "show_4effectunits"), - ConfigKey("[Master]", "show_mixer"), - }; - - m_uiControls.reserve(uiKeys.size()); - for (const auto& key : uiKeys) { - m_uiControls.emplace_back(std::make_unique(key)); - m_uiControls.back()->setButtonMode(ControlPushButton::TOGGLE); - } - // Load tracks in args.qlMusicFiles (command line arguments) into player // 1 and 2: const QList& musicFiles = m_cmdlineArgs.getMusicFiles(); @@ -619,8 +597,6 @@ void CoreServices::finalize() { m_pTouchShift.reset(); - m_uiControls.clear(); - m_pControlIndicatorTimer.reset(); t.elapsed(true); diff --git a/src/coreservices.h b/src/coreservices.h index 01c4ba4e512..b45a80cf6e0 100644 --- a/src/coreservices.h +++ b/src/coreservices.h @@ -151,7 +151,6 @@ class CoreServices : public QObject { std::shared_ptr m_pScreensaverManager; - std::vector> m_uiControls; std::unique_ptr m_pTouchShift; Timer m_runtime_timer;