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 17 commits into
base: master
Choose a base branch
from
Open

Add Qt6 Support #7339

wants to merge 17 commits into from

Conversation

tresf
Copy link
Member

@tresf tresf commented Jun 22, 2024

No description provided.

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 <[email protected]>

* zyn build fix for msvc qt6

---------

Co-authored-by: Michael Gregorius <[email protected]>
Co-authored-by: Dalton Messmer <[email protected]>
- 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 <[email protected]>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <[email protected]>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <[email protected]>

* Update src/gui/editors/PianoRoll.cpp

Co-authored-by: saker <[email protected]>

---------

Co-authored-by: saker <[email protected]>
* 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
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.

None yet

10 participants