-
-
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
Fix various compiler warnings in main branch #3320
Conversation
Fixes: src/widget/wsearchrelatedtracksmenu.cpp:79:5: error: Pass a context object as 2nd singleShot parameter [-Wclazy-connect-3arg-lambda] addAction( ^
Fixes: src/widget/wsearchrelatedtracksmenu.cpp:98:5: error: auto deduced to be QStringBuilder instead of QString. Possible crash. [-Wclazy-auto-unexpected-qstringbuilder] const auto actionTextPrefixWithSeparator = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ const QString actionTextPrefixWithSeparator src/widget/wsearchrelatedtracksmenu.cpp:321:13: error: auto deduced to be QStringBuilder instead of QString. Possible crash. [-Wclazy-auto-unexpected-qstringbuilder] const auto locationPathWithTerminator = ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ const QString locationPathWithTerminator
Fixes: src/library/dao/playlistdao.cpp:177:9: error: c++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop] for (const auto& trackId : getTrackIds(playlistId)) { ^
Thanks for taking this task, Jan! It was also on my list, but didn't have to time to start it ;) |
src/library/dao/playlistdao.cpp
Outdated
// TODO: QSet<T>::fromList(const QList<T>&) is deprecated and should be | ||
// replaced with QSet<T>(list.begin(), list.end()). | ||
// However, the proposed alternative has just been introduced in Qt | ||
// 5.14. Until the minimum required Qt version of Mixx is increased, |
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.
// 5.14. Until the minimum required Qt version of Mixx is increased, | |
// 5.14. Until the minimum required Qt version of Mixxx is increased, |
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
@@ -78,6 +78,7 @@ void WSearchRelatedTracksMenu::addTriggerSearchAction( | |||
elidableTextSuffix); | |||
addAction( | |||
mixxx::escapeTextPropertyWithoutShortcuts(elidedActionText), | |||
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.
Good catch 👍 This is easy to get wrong. Though here it is not essential, because everything happens in the UI thread.
@@ -95,7 +96,7 @@ QString WSearchRelatedTracksMenu::elideActionText( | |||
// This should never fail | |||
return actionTextPrefix; | |||
} | |||
const auto actionTextPrefixWithSeparator = | |||
const QString actionTextPrefixWithSeparator = |
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 warning is a false positive if at least one argument is a QString as is here. But it doesn't hurt to be explicit.
Waiting for at least one of the macOS builds to finish, just in case. |
@Be-ing I'll fix the typo right before merging. |
There are many more of those "Mixx" typos that need to be fixed separately starting with 2.3. |
macOS build passed. Merging. |
No description provided.