Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Hotcue Color Replace Dialog #2547
Add Hotcue Color Replace Dialog #2547
Changes from 31 commits
9c719ec
febe1ae
14c507e
a05150e
d9872fe
1fece29
f3c66ac
4c74f27
fd40737
882a2b3
40cc703
b466ce9
0c5fcf2
c2d85eb
355c2c3
8802755
badf2e7
0163061
abff8d6
9b9b14e
9b6f6b4
15fe173
4947400
991668d
2942034
dd53429
a33ff49
1304b39
ed349bf
502dc8a
86f60a5
e9656a6
3aed78c
04225aa
8eef253
102290d
7a6b366
66298d3
47618c7
a020105
4e57904
62bc3db
3f20479
6dea4c0
a76d0ed
6a92df0
49a8dcf
8959be1
cfbd266
d924fe6
294f8b5
18336aa
a01675b
d256c6b
1048c8c
0080967
9ea0f26
900fb36
3b1f02f
89c58c0
415b432
b84825e
e8a363e
c92a823
37065cc
b6cfccc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
line length exceeds GitHub diff viewer. Please check the whole file.
Or wait until #2608 is merged :-)
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.
make_parented can be used here, to document the ownership. The same below.
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 results in:
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 cannot confirm that.
m_pNewColorPickerAction = make_parented(WColorPicker::Option::AllowCustomColor, colorPaletteSettings.getHotcueColorPalette(), this);
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 is a bad idea, because every other GUI slot can be executed in between. Also other DB actions or even another color change attempt. The same below.
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 suggested by @uklotzde. Also, the dialog is modal so the impact is probably neglible. As a user, if I mess around with colors while the color update is happening I'd actually not be surprised if my color gets overwritten.
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 really must not do this. This is one of the Qts anti patterns. We had some of these "solutions" in Mixxx and have removed them all. What is the issue you are trying to solve? There must be a better solution.
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.
My initial attempt was doing the DB operations in another thread, but this can cause inconsistencies. Now I moved everything into the GUI thread. Maybe @uklotzde can elaborate why we need this, but I think the GUI would freeze and the user has no possibility to hit the cancel button without this.
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 have other places in Mixxx where the GUI Freezes more badly because of all kind of Ctrl+A actions. This is nothing we can solve here. Safety over performance. Please just remove this call if we don't have a looking strategy.
I think we can effort a gui freeze here, because it is only a one time action.
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 disagree with @daschuer, see my comments (review comments appear at different places in GitHub)
@Holzhaus Please test what happens if you remove the processEvents() call. If the progress dialog becomes unresponsive then removing it is not an option imho.
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.
My test database it not big enough to test this.
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.
A modal QProgressDialog does not require to call processEvents(). Please remove it, problem solved.
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 call is redundant but still happens behind the scenes:
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.
But as already discussed this is true for this simple dialog.