-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Remove support for qt5, fix build warnings in qt 6.8.0 #714
Conversation
Ugh, looks like Qt5 doesn't build because it doesn't have some of the newer functions :( As an aside, how much longer will we support Qt5 for newer builds? Qt5 5.15 LTS support has already ended May 2023, and extended lifetime support for Qt subscribers will end May 2025: https://www.qt.io/blog/qt-5.15-extended-support-for-subscription-license-holders |
To be honest, it kinda sucks that Qt 6 supports only Windows 10+ (from a specific build). Some people still uses old versions. I'm kinda split on this, but I'm leaning toward still supporting Qt 5 cause it still makes up about 20% of the downloads: https://tooomm.github.io/github-release-stats/?username=nuttyartist&repository=notes (maybe even more since I don't count the bundling of the Windows setup build). What do you guys think? |
I wasn't aware Qt6 is unsupported on versions of Windows before 10, that's annoying... At some point we do have to make a decision to stop supporting Qt5, though. Windows 10 is already almost a decade old. In my opinion users who are still on Qt5 should be recommended to upgrade to Qt6 if possible, and otherwise stay on the last Notes version that is supported on their system. Maybe we should implement some way to block automatic updates on Qt5 if the users' OS doesn't support Qt6? |
I have no strong opinion on this matter, because I barely touch the C++/QML code, so the maintenance burden of Qt 5 won't affect me as much. All the work needed for working Qt 5 builds is already done, and it's unlikely that major changes will be needed going forward. That being said, I think we should still provide a Qt 5 version, but only because of Ubuntu 20.04, which is still supported by Canonical (for 5 more months...) and can't run the Qt 6 version. Any user running a Windows or macOS version that can't run Qt 6, is deliberately running an operating system officially unsupported by Microsoft and Apple, so they are essentially "own their own", in my opinion.
I'm also not sure that's a valid indicative of how much Qt 5 is used in favor of Qt 6. I suspect that most people downloading Notes don't even know what Qt is. lol They are probably downloading the Qt 5 version because GitHub releases are listed alphabetically, and that's the first option they see... And we contribute to that, too. We don't explain the differences between the two Qt versions anywhere.
I agree, but we already do that plenty, anyway: $ git grep QT_VERSION_CHECK | wc -l
65 ¯\_(ツ)_/¯ |
Indeed, I think a lot of them are mine from when I initially added qt6 support: #386. This was a pain to add and makes the code as a whole less readable. Removing qt5 support would clean it up nicely ;) |
Alrighty, you both got some good points. I guess it's time to move to Qt 6 and streamline the development (that's what I did with Daino Notes as well). Should we move to Qt 6 now or wait the 5 months @guihkx mentioned? P.S. There are initiative to make Qt 6 work on older OSes (https://github.com/crystalidea/qt6windows7, for example). |
Alternatively, we could maintain a Then, if @zjeffer wants to, this PR could be renamed and we'd remove all the Qt 5 stuff (one big commit for that is fine by me). I can help with the CI/CD part, if necessary.
That looks interesting, but it seems that they only provide |
Sounds good to me. I think the branch should be called 'qt5', though, so it's clear what its purpose is. |
Qt5 support has now been removed in the latest commits. I also created the @guihkx Can you take care of the CI/CD? |
Sure. |
Need to update the documentation as well. At the end we should also squash those commits into just two: One for the Qt 6.8 warning fixes, and one for the Qt 5 removal. |
5ee50a3
to
9baadbe
Compare
9baadbe
to
e18a9ea
Compare
Forgot to update the minimum system requirements when building on Windows. I also added a commit message about the Qt 5 removal, so let me know if it's good enough. |
LGTM 👍 |
Thanks, @zjeffer! Testing... |
I added a fix to macOS frameless window not showing up correctly due to recent changes in Qt 6.8 (https://codereview.qt-project.org/c/qt/qtbase/+/561465). But there's still an issue with the notesList for some reason. I'm out-of-time today, but I'll try to get back to it soon (or if someone can take a stab at it). |
As time goes by, it becomes more and more laborious to maintain two major Qt versions in parallel. We had many workarounds and missing features for the Qt 5 version, which had its last public release almost 4 years ago. Additionally, the system requirements for Qt 6 are not unreasonable, so the majority of people should be able to run it. So, for those reasons, we decided to remove Qt 5 support completely. Users that can't run the Qt 6 version for whatever reason, are free to either disable updates and stay on Notes 2.3.x, or manually build Notes off of the "qt5" branch. Co-authored-by: guihkx <[email protected]>
52b039a
to
012c159
Compare
Apologies for the force-push, but I had to rebase against
IMO that work should go into a separate PR. This one fixes some compiler warnings and removes Qt 5 support. We also don't ship Notes with Qt 6.8.0 yet (though I'm planning to do that), so maybe that fix could wait a bit... But that's up to you, of course. I still left your commit here after the rebase (I fixed the linting errors as well). |
Alrighty, feel free to remove the commit and merge, I'll open a new PR for it. |
012c159
to
bfb0827
Compare
@nuttyartist I suggest you add a branch protection rule for the |
Yup, looks good! |
I notice it says "Applies to 0 targets", maybe it's incorrect? |
I'm not sure, maybe try removing the quotation marks from the name pattern of the branch? |
Worked, thanks (: |
Fixes lots of deprecation warnings I encountered with Qt 6.8.0
One more warning is present, but there's a comment next to it:
notes/src/mainwindow.cpp
Lines 3945 to 3948 in 75c876e
Why doesn't
QWidget::activateWindow()
work? I don't really know what this part of the code actually does.