-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CO Renaming (Pt. 1) #11980
CO Renaming (Pt. 1) #11980
Conversation
While were at it, I'd also like to propose to retire the |
: numDecks(ConfigKey("[Master]", "num_decks"), true), | ||
numSamplers(ConfigKey("[Master]", "num_samplers"), true), | ||
numPreviewDecks(ConfigKey("[Master]", "num_preview_decks"), | ||
true) { | ||
: numDecks(ConfigKey(kAppGroup, QStringLiteral("num_decks")), true), | ||
numSamplers(ConfigKey(kAppGroup, QStringLiteral("num_samplers")), true), | ||
numPreviewDecks(ConfigKey(kAppGroup, QStringLiteral("num_preview_decks")), | ||
true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please only add a test for the new CO name and leave the existing one as it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan was to remove the word from the codebase as much as possible which includes tests. Also, these tests are supposed to check if the AutoDJ processor works correctly, not if old CO names still work. I agree that it makes sense to test this, too, but that should be a different test IMHO.
I was planning to add a new test that checks if the aliases exist. This would ideally go into coreservicestest.cpp
since most other tests do not create all COs. Unfortunately this test is broken at the moment. I'm currently looking into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would / could result in warnings raised by tests though if we decided to implement the warnings on deprecated CO access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure the backward compatibility of our legacy API. I'm open for any test implementation, that ensures this.
Okay for me. By the way, should I also rename |
Sure. though I didn't check either, never heard of that CO before tbh... |
'guiTickTime' and 'guiTick50ms' have are both in seconds in terms of std::chrono. So we may think of |
Derived form that are They just cycle 0.0 ad 1.0. |
4692347
to
87407d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/util/timer.cpp
Outdated
GuiTickTimer::GuiTickTimer(QObject* pParent) | ||
: QObject(pParent), | ||
m_pGuiTick(make_parented<ControlProxy>( | ||
"[Master]", "guiTickTime", this)), | ||
QStringLiteral("[App]"), QStringLiteral("gui_tick_time"), this)), | ||
m_bActive(false) { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was removed anyway in #11850, just fyi
ConfigKey(kAppGroup, QStringLiteral("gui_tick_full_period_s"))); | ||
m_pCOGuiTickTime->addAlias(ConfigKey(kLegacyGroup, QStringLiteral("guiTickTime"))); | ||
m_pCOGuiTick50ms = std::make_unique<ControlObject>( | ||
ConfigKey(kAppGroup, QStringLiteral("gui_tick_50ms_period_s"))); | ||
m_pCOGuiTick50ms->addAlias(ConfigKey(kLegacyGroup, QStringLiteral("guiTick50ms"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for the future, we should probably not document these are they will be obsolete with QML, or rather they would have to be reimplemented.
m_pCOTGuiTick = new ControlProxy("[Master]", "guiTick50ms", this); | ||
m_pCOTGuiTick = new ControlProxy( | ||
QStringLiteral("[App]"), QStringLiteral("gui_tick_50ms_period_s"), this); | ||
m_pCOTGuiTick->connectValueChanged(this, &WTrackTableView::slotGuiTick50ms); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this dependency is... interesting... worrisome?
Anyways, obsolete with QML.
const meterConnection = engine.makeConnection("[Master]", "guiTick50ms", function(_value) { | ||
const meterConnection = engine.makeConnection("[App]", "gui_tick_50ms_period_s", function(_value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably track this in an issue on the QML project board, otherwise this will silently break under QML. putting this on an engine.beginTimer
instead should be sufficient.
87407d6
to
a086ce3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. last chance for anyone to object.
I was planning to add tests for the legacy aliases as @JoergAtGithub requested, but the |
I appreciate your effort! I think it's safer to have this test case in place before merging this. Otherwise this is LGTM! |
2ff9a88
to
08f3696
Compare
class ControlObjectAliasTest : public MixxxTest { | ||
}; | ||
|
||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be removed when merging into main, right?
Tests are in place now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Waiting for CI
Thank you! |
Thank you as well. |
This PR is part of the ongoing effort to remove offensive language from the Mixxx codebase (#11931).
Here is the first bunch of renamings discussed in #11960 (comment). I removed the
num_mics_configured
CO since it's used nowhere outside theEngineMixer
class (not even mappings or skins) and can be replaced with a simple member variable.[Master],guiTick50ms
[App],gui_tick_50ms_period_s
[Master],guiTickTime
[App],gui_tick_full_period_s
[Master],indicator_250millis
[App],indicator_250ms
[Master],indicator_500millis
[App],indicator_500ms
[Master],keylock_engine
[App],keylock_engine
[Master],num_auxiliaries
[App],num_auxiliaries
[Master],num_decks
[App],num_decks
[Master],num_microphones
[App],num_microphones
[Master],num_mics_configured
[Master],num_preview_decks
[App],num_preview_decks
[Master],num_samplers
[App],num_samplers
[Master],samplerate
[App],samplerate