-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add experimental Qt 6 support flags. #7182
Conversation
This reverts commit 42a2f19.
I was about to comment it but you came before i asked. Thanks again. |
Here's a list of the build warnings that are currently given when building commit 684afdb: build_warnings.zip. We will need to check how to deal with the different types of warnings. If we are lucky they can be fixed without some version specific I wonder if it makes sense to move the version check into a single file so that we do not have to repeat the specific code over and over again. Something along the lines of:
The other code would then only use:
Edit: the file was created with the following command in the build directory:
|
@michaelgregorius would DeprecationHelper.h help? |
Fix warnings in `AutomationClip.cpp`. These have been warnings of the type: "Warning: »QMap<int, lmms::AutomationNode>::const_iterator operator-(QMap<int, lmms::AutomationNode>::const_iterator, QMap<int, lmms::AutomationNode>::const_iterator::difference_type)« is deprecated: Use std::prev; QMap iterators are not random access [-Wdeprecated-declarations]
Fix build warning about deprecated iterator operators in `AutomationClipView`.
Fix the deprecated usage of the following methods: * `QMouseEvent:x()` * `QMouseEvent:y()` * `QDropEvent:x()` * `QDropEvent:y()` This is done by adding two new helper methods names `position` to `DeprecationHelper.h` and using these methods in the event methods.
Thanks for the hint @Rossmaxx! I have used it to remove a first set of warnings. See the commits that have been added a few minutes ago. |
Heres a list of the remaining deprecation warnings:
Getting more and more manageable. 😃 |
Fix more warnings about iterator operators by using `std::prev` and `std::next`.
Fix warnings about `QKeyCombination::operator+`.
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
Though #7212 fixed compilation without 32 bit qt, still some more errors exist for compiling on msvc. Though i wouldn't consider it a blocker as we got it working at least for linux. I can't seem to figure out from where the error is coming from as of now. |
@michaelgregorius if you don't mind, can you submit a PR, or shall i cherry pick it? |
@Rossmaxx, what's the intention for this? These changes will land in master anyway once this PR is merged. |
IF(WANT_QT6) | ||
MESSAGE("Building with Qt6 is experimental, not guaranteed to succeed") | ||
SET(QT_VERSION_MAJOR 6) | ||
SET(LMMS_QT_MIN_VERSION 6.0.0) |
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.
It might be good to require 6.2 to deal better with removal of X11 extras, but it's not a strict requirement.
To reduce diff between master and this PR but like you said, it's not really needed as it'll land in master anyway. |
@michaelgregorius me and veratil had a convo on discord about creating a seperate branch. This PR had been merged to that new branch. Now you can push stuff to lmms/qt6 instead of my branch. |
I think it's too much effort for the few lines that would be removed from the diff. |
* refactored gui_templates.h * experimental qt6 support enabled * replace qt5_wrap_ui with cmake_autouic * Make the minimum code compile for Qt6 The following changes are applied to make the minimum build configuration compile: * Remove usage of a `QKeyEvent` constructor in `ColorChooser.h` by directly forwarding the original event. * Change `QMap` to `QMulitMap` in several places in `ControlLayout.h` because that's what in fact is used. * Change the parameter from `QEvent` to `QEnterEvent` in some `enterEvent` overrides. * Add an include for `algorithm` in `MixHelpers.cpp` * Fix a problem with string argument replacement in `embed.cpp` * Introduce the usage of `QKeySequence` including the replacement of the `+` operator with the `|` operator. * Add an include for `QActionGroup` in `ProjectNotes.cpp`. * Use `QPalette::window` instead of `QPalette::background` in `ClipView.cpp` * Use `qBound<panning_t>` instead of `qBound<int>` in `PianoRoll.cpp`. Add a cast. * Replace the deprecated call to `QLayout::setMargin` with `QLayout::setContentsMargins` Note: there are still lots of warnings when you compile this state with Qt6! * Qt 5 support * Fix Qt5 build for ControlLayout Fix the Qt5 build for `ControlLayout` by intoducing typedefs depending on the Qt version and using these throughout `ControlLayout`. * Prepare LadspaMatrixControlDialog for Qt6 Use `setContentsMargins` instead of `setMargin`. * CMakeLists.txt adjustments for Qt6 Add the dependency to "Core5Compat" to the main CMakeLists.txt. It is needed so that we can use `QTextCodec` which is used by the Hydrogen importer plugin. Adjust the CMakeLists.txt of the ZynAddSubFx plugin so that it also makes use of `QT_VERSION_MAJOR` and therefore builds under Qt5 and Qt6. * force qt 5 on vst for now * cleanup qt5compat finding code * Fix build Fix the build that failed after the merge of master. The data type that `QColor::getRgbF` uses has changed between Qt5 and Qt6. This is solved with a using because changing the type to `float` which is used by Qt6 did not work with Qt5 either. * Fix warnings in AutomationClip.cpp Fix warnings in `AutomationClip.cpp`. These have been warnings of the type: "Warning: »QMap<int, lmms::AutomationNode>::const_iterator operator-(QMap<int, lmms::AutomationNode>::const_iterator, QMap<int, lmms::AutomationNode>::const_iterator::difference_type)« is deprecated: Use std::prev; QMap iterators are not random access [-Wdeprecated-declarations] * Fix warning in AutomationClipView Fix build warning about deprecated iterator operators in `AutomationClipView`. * Fix deprecated usage of x() and y() methods Fix the deprecated usage of the following methods: * `QMouseEvent:x()` * `QMouseEvent:y()` * `QDropEvent:x()` * `QDropEvent:y()` This is done by adding two new helper methods names `position` to `DeprecationHelper.h` and using these methods in the event methods. * Fix more iterator operator warnings Fix more warnings about iterator operators by using `std::prev` and `std::next`. * Fix QKeyCombination warning Fix warnings about `QKeyCombination::operator+`. * added minimum version check Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com> * zyn build fix for msvc qt6 --------- Co-authored-by: Michael Gregorius <michael.gregorius.git@arcor.de> Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
I have added some experimental Qt 6 support flags to enable compiling LMMS under Qt 6. I have disabled the flags for now and I see this PR as a step to test for Qt6 support live.
Do note that the build fails with Qt6 but the changes are for a follow up PR. I have changed only the cmake scripts and haven't touched c++ code yet.Thanks for @michaelgregorius for helping me fix the build.Also I have disabled vst support for the time being, which can be enabled after fixing the Qt5-x11embed submodule.