Getting ready to Qt 6 (2/n). Remove QApplication::globalStrut() #579

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:220409-strut changing 1 files +1 −2
  1. hebasto commented at 11:59 pm on April 8, 2022: member
    This function has been deprecated in Qt 5.15.0, and has been removed in Qt 6.
  2. qt: Remove `QApplication::globalStrut()` call
    This function has been deprecated in Qt 5.15.0, and has been removed in
    Qt 6 (see 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b upstream commit).
    3eaf5dbfe0
  3. shaavan commented at 5:24 pm on April 10, 2022: contributor

    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 to A.
    • 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?

  4. jarolrod commented at 3:02 am on April 12, 2022: member

    ACK 3eaf5dbfe0a0c814116e92f602f3c062259b6ea3

    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.

  5. hebasto added the label Qt 6 on Apr 12, 2022
  6. luke-jr approved
  7. luke-jr commented at 2:59 am on April 13, 2022: member

    utACK 3eaf5dbfe0a0c814116e92f602f3c062259b6ea3

    From my investigation of globalStrut, Qt5 itself never actually supported it correctly in the first place.

  8. hebasto commented at 8:29 am on April 13, 2022: member

    @shaavan

    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 to A.

    • 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?

    Thank you for your review. Your analysis is correct. I’ve removed mention of user-faced behavior change from the PR description.

  9. hebasto merged this on Apr 15, 2022
  10. hebasto closed this on Apr 15, 2022

  11. hebasto deleted the branch on Apr 15, 2022
  12. sidhujag referenced this in commit 2586b3edb8 on Apr 18, 2022
  13. bitcoin-core locked this on Apr 15, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 17:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me