Skip to content
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 Qt6 Support #7339

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open

Add Qt6 Support #7339

wants to merge 23 commits into from

Conversation

tresf
Copy link
Member

@tresf tresf commented Jun 22, 2024

Resolves #6614.

Rossmaxx and others added 17 commits May 17, 2024 11:15
* 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>
- Fix linking issues with Qt Framework files
- Fix qmake detection
Fix implicit conversion from int when using QString.arg(...)
* Adds win32EventFilter a wrapper for nativeEventFilter on Windows
* win32EventFilter is currently used to intercept top-level Window events (currently, to avoid VSTs setting transparency of the parent application)
QComboBox activated() replaced with textActivated() since Qt 5.14
* enabled VST support for Qt 6 builds
* Note : Embedding on QT6 will be buggy on linux as a result of using qt embedding, which unfortunately is a qt bug which hasn't been resolved.
* Update widths of combo boxes

* Update src/gui/editors/PianoRoll.cpp

no space right after brace

Co-authored-by: saker <sakertooth@gmail.com>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <sakertooth@gmail.com>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <sakertooth@gmail.com>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <sakertooth@gmail.com>

---------

Co-authored-by: saker <sakertooth@gmail.com>
Co-authored-by: Dalton Messmer <messmer.dalton@gmail.com>
* Added lines in between bars
* Changed bar lines to follow snap size
* Changed default zoom and quantization value
* Added constants for line widths
* Added QSS configuration for new grid line colors
* Tied line widths to QSS properties
* Changed default quantization to 1/4
* Removed clear() from destructor model
* Removed destructor in ComboBoxModel.h
* Changed member set/get functions to pass by value
* Updated signal connection with newer syntax
Fix the missing initialization of some variables in `TrackContentWidget`.
This led to some performances issues when the widget was painted because
a for loop was executed for which the variable started at a very large
negative number and was then incremented.
Adds QWheelEvent::inverted() support to spinboxes, knobs, sliders
@JohannesLorenz JohannesLorenz added this to the 1.3 milestone Aug 4, 2024
PhysSong and others added 6 commits September 16, 2024 11:27
* ensured mouse event != nullptr before deref

* separation of concerns: AFP WaveView updateCursor

extract check to pointerCloseToStartEndOrLoop()

* marked some function parameters as const
Conflicts included:
- plugins/AudioFileProcessor/AudioFileProcessorWaveView.cpp
- plugins/SlicerT/SlicerTWaveform.cpp
- src/gui/tracks/TrackView.cpp
- src/gui/widgets/ComboBox.cpp
@messmerd
Copy link
Member

I successfully built LMMS with Qt 6.8.0 on Linux without the Core5Compat module.

When compiling, there were a number of deprecation warnings unrelated to that change that we should probably address in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Qt 6 support