Getting ready to Qt 6 (9/n). Apply Qt 6 specific changes #623

pull hebasto wants to merge 4 commits into bitcoin-core:master from hebasto:220622-qt6 changing 1 files +19 −4
  1. hebasto commented at 11:56 am on June 21, 2022: member

    One more step in migration to Qt 6.

    Could be tested with hebasto/bitcoin#3 or bitcoin/bitcoin#24798.

    No behavior change when compiling with Qt 5.

  2. qt6: Fix type registration
    In Qt 6, registration of `QDataStream` streaming operators is done
    automatically. Consequently, `qRegisterMetaTypeStreamOperators()` does
    no longer exist. Calls to this method have to be removed when porting
    to Qt 6.
    
    See https://doc.qt.io/qt-6/qtcore-changes-qt6.html#the-qmetatype-class
    3f51d0b8b2
  3. qt6: Do not use deprecated `QLibraryInfo::path` in Qt 6
    See https://doc.qt.io/qt-6/qtcore-changes-qt6.html#other-classes
    ad73447dc2
  4. refactor: Fix style in `initTranslations()` function 8927bb8f06
  5. qt6: Do not use deprecated high DPI attributes in Qt 6
    In Qt 6, high DPI pixmaps and scaling are always enabled.
    
    https://doc.qt.io/qt-6/highdpi.html
    d8d99d041a
  6. hebasto added the label Qt 6 on Jun 21, 2022
  7. DrahtBot commented at 5:03 pm on June 21, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  8. jarolrod commented at 7:11 am on June 23, 2022: member

    Concept ACK, need to finish testing

    • 3f51d0b8b2b2fabf5e305bd71226a8e3e5f3ad2d

      • I have confirmed with Qt Docs that the commit description is correct and we do in fact need to remove the qRegisterMetaTypeStreamOperator when building with Qt6. The usage of qRegisterMetaType is the appropriate call for Qt6.
    • ad73447dc2bd04120c4eb7f5757613ad35a35cf5

      • Confirmed with Qt docs that for Qt6 we should use QLibraryInfo::path instead of QLibraryInfo::location. The new code here is correct as we use QLibraryInfoPath and we pass in a valid ::LibraryPath enum in ::TranslationsPath
    • d8d99d041a063a1719fc1d43ecd4a6365e0657ca

      • Confirming with Qtdocs that we don’t need to set hidpi flags with Qt6: “… Qt 5 behavior assumes that AA_EnableHighDpiScaling has been set (this flag is not needed on Qt 6)”
  9. jarolrod approved
  10. jarolrod commented at 8:58 am on June 23, 2022: member

    ACK d8d99d041a063a1719fc1d43ecd4a6365e0657ca

    Tested with Qt6 and the experimental Cmake branch and confirmed the window size and components look fine on a HIDPI and low dpi display. Also tested that I can still choose and switch through translations. Additionally, I performed a sanity check building with Qt5.

  11. laanwj commented at 9:46 am on June 23, 2022: member
    Code review ACK d8d99d041a063a1719fc1d43ecd4a6365e0657ca (and lightly tested on Qt5 only, the GUI starts, doesn’t look weird, translations still work)
  12. laanwj merged this on Jun 23, 2022
  13. laanwj closed this on Jun 23, 2022

  14. hebasto deleted the branch on Jun 23, 2022
  15. sidhujag referenced this in commit f1d6dc31e4 on Jun 23, 2022
  16. bitcoin-core locked this on Jun 23, 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-11-23 09:20 UTC

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