-
-
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
Changed ControlObjectThreadMain instances to ControlObjectThread where no direct connection is used. #43
Conversation
no direct connection is used.
ControlObjectThread if no direct connection is used.
ControlObjectThread where no direct connection is used.
pHeadphones->slotSet(defaultHeadphones); | ||
delete pHeadphones; | ||
ControlObject::set(ConfigKey(getGroup(), "master"), (double)defaultMaster); | ||
ControlObject::set(ConfigKey(getGroup(), "pfl"), (double)defaultHeadphones); |
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.
saves memory allocation.
This patch is starting to rod. I would like to have a second pair of eyes to confirm my changes. |
@@ -30,16 +23,16 @@ bool WaveformMarkRange::active() { | |||
|
|||
bool WaveformMarkRange::enabled() { | |||
// Default to enabled if there is no enabled control. | |||
return m_markEnabledControl == NULL || |
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.
If setup() is not called yet, this will segfault. Shouldn't the NULL check stay (for enabled(), start() and end()) as a safety?
LGTM other than my comment about WaveformMarkRange. Thank you! |
Conflicts: src/dlgprefcontrols.cpp src/dlgprefrecord.cpp src/dlgprefrecord.h src/widget/wnumberpos.h
Thank you for review! |
Changed ControlObjectThreadMain instances to ControlObjectThread where no direct connection is used.
implement Aux,master in skins, hide unconfigured Mic units
put Cue Shift buttons below CurPos button
According to our previous discussion ControlObjectThreadMain ensures that the valueChanged signals are propagated by the Main Thread. This makes a different, when Qt::DirectConnection is used in the using code.
I have checked all occurrences of ControlObjectThreadMain and changed them to ControlObjectThread if no direct connection is used. Most of them does not use any connection. So we save a unnecessary round trip thought the Qt event queue.
If my other refactoring branch #38 is accepted, we can change most (or all) of them to ControlObjectSlave. This will save some direct connected function calls ass well because it is optimized for no connection.