-
Notifications
You must be signed in to change notification settings - Fork 314
Getting ready to Qt 6 (2/n). Remove QApplication::globalStrut()
#579
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
Conversation
This function has been deprecated in Qt 5.15.0, and has been removed in Qt 6 (see 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b upstream commit).
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.
Concept ACK
I successfully verified that the property globalStrut()
is obeselete in Qt 5. Refernce. So conceptually (and by approach), I agree with this PR. However, I would like to confirm one thing before ACKing this PR.
You mentioned that this change could have user-faced behavior changes. However, by my understanding:
QSize::expandedTo
returns a size max of caller and argument. See for reference.- By default,
GlobalStrut
has 0 widths and height value until it is not changed, which is not being done in the codebase. - Hence
A.expandedTo(0)
should be equivalent toA
. - Hence, removing
expandedTo()
should be a simple refactoring change in this case.
So would you please explain how this PR could have user-faced behavior change?
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.
ACK 3eaf5db
Visually tested on Linux, macOS, and cross compile to windows. I did not notice any visual changes between this PR and master.
I tested dynamic builds on Linux and macOS using Qt 5.15. It would be nice if someone could test this PR using our minimum supported version of 5.11.3. Currently unable to do this testing myself.
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.
utACK 3eaf5db
From my investigation of globalStrut, Qt5 itself never actually supported it correctly in the first place.
Thank you for your review. Your analysis is correct. I've removed mention of user-faced behavior change from the PR description. |
…lication::globalStrut()` 3eaf5db qt: Remove `QApplication::globalStrut()` call (Hennadii Stepanov) Pull request description: This function has been deprecated in Qt 5.15.0, and has been [removed](qt/qtbase@033d01b) in Qt 6. ACKs for top commit: jarolrod: ACK 3eaf5db luke-jr: utACK 3eaf5db Tree-SHA512: 71ee539b6ffa3755f7e6beaa72a8937886471e298830878def6dd9f48c601611d94d52c638bc1602f938df2ba84ff8b130ea8da8e6c08ae7146173fa613a5003
This function has been deprecated in Qt 5.15.0, and has been removed in Qt 6.