neovim-qt icon indicating copy to clipboard operation
neovim-qt copied to clipboard

Support builds against Qt6

Open equalsraf opened this issue 5 years ago • 7 comments

See https://github.com/equalsraf/neovim-qt/issues/839 for the list of issues

In terms of code this is ready for review. There are still runtime issues to be checked (font integer metrics and possibly imfocus). But since we continue to default to qt5, I think it is ok to proceed and handle those separately.

equalsraf avatar Apr 22 '21 01:04 equalsraf

The replacement for QDesktopWidget via QWidget::windowHandle() segfaults in Qt6. The QWidget::screen() works in qt6 but it does not exist in qt5.

equalsraf avatar Apr 23 '21 16:04 equalsraf

Most builds look ok now, the Circle CI has a failed test but code wise it seems this branch builds for all qt5 and also qt6 on Mac OS (Azure pipeline). I dont think there are packages for qt6 in linux images yet.

Most of the changes are due to compatibility between the two versions. Time to start breaking this CR apart and get some of these into the master branch.

I did not get a chance to test this properly yet, the most concerning API changes in Qt6 are the fonts and the microfocus bit.

equalsraf avatar Apr 25 '21 00:04 equalsraf

This is good to see! :+1:

Let me know if I can help in any way: testing, code-review, bug-fixes, etc.

jgehrig avatar Apr 25 '21 03:04 jgehrig

I'll break off the simple stuff into https://github.com/equalsraf/neovim-qt/pull/842

equalsraf avatar Apr 25 '21 16:04 equalsraf

Everything else seems to be done, the remaining issue is the removal of forceintegermetrics, From the docs

This style strategy has been deprecated since Qt 5.15.0. Use QFontMetrics to retrieve rounded font metrics.

I guess I need to hunt down for locations where QFontMetrics is not being used.

Attempting to run, I get a message "font reports bad fixed pitch metrics" for DejaVu Sans Mono, but i dont get the same message when running a build with qt5.

equalsraf avatar Apr 26 '21 11:04 equalsraf

Failing to get a working CI for windows. The installed version of Qt seems to be missing the compatibility module.

equalsraf avatar Apr 27 '21 00:04 equalsraf

Codecov Report

Patch coverage: 86.36% and project coverage change: -1.63 :warning:

Comparison is base (7b23076) 22.77% compared to head (3927f6d) 21.14%.

:exclamation: Current head 3927f6d differs from pull request most recent head 3ac3d4d. Consider uploading reports for the commit 3ac3d4d to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #840      +/-   ##
==========================================
- Coverage   22.77%   21.14%   -1.63%     
==========================================
  Files          81       81              
  Lines       29037    28890     -147     
==========================================
- Hits         6612     6108     -504     
- Misses      22425    22782     +357     
Impacted Files Coverage Δ
src/msgpackiodevice.h 50.00% <ø> (ø)
src/neovimconnector.h 100.00% <ø> (ø)
test/tst_msgpackiodevice.cpp 100.00% <ø> (ø)
src/gui/shell.cpp 43.75% <50.00%> (-8.18%) :arrow_down:
src/gui/shellwidget/shellwidget.cpp 34.90% <60.00%> (-17.55%) :arrow_down:
src/compat/compat_qt5.cpp 100.00% <100.00%> (ø)
src/gui/compat_gui_qt5.cpp 100.00% <100.00%> (ø)
src/gui/shellwidget/compat_shellwidget_qt5.cpp 100.00% <100.00%> (ø)
src/msgpackiodevice.cpp 55.57% <100.00%> (-1.35%) :arrow_down:
src/neovimconnector.cpp 77.65% <100.00%> (+0.93%) :arrow_up:
... and 2 more

... and 20 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Aug 13 '21 11:08 codecov-commenter

Merging, on the basis that the default is Qt5 and can continue to work on pending items as needed. The following caveats remain:

  • See https://github.com/equalsraf/neovim-qt/issues/839 for the list of remaining issues
  • the appveyor job is failing and is allowed to fail until we can fix the one failing test

equalsraf avatar Apr 02 '23 20:04 equalsraf