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 experimental Qt 6 support flags. #7182

Merged
merged 60 commits into from
Apr 25, 2024
Merged

Conversation

Rossmaxx
Copy link
Contributor

@Rossmaxx Rossmaxx commented Mar 30, 2024

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.

@Rossmaxx Rossmaxx marked this pull request as draft March 30, 2024 06:26
@Rossmaxx Rossmaxx mentioned this pull request Mar 30, 2024
25 tasks
@michaelgregorius
Copy link
Contributor

@Rossmaxx: With commit 684afdb I have fixed the failing Qt6 build.

@Rossmaxx
Copy link
Contributor Author

I was about to comment it but you came before i asked. Thanks again.

@michaelgregorius
Copy link
Contributor

michaelgregorius commented Apr 20, 2024

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 ifdefs.

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:

#if (QT_VERSION > QT_VERSION_CHECK(6, 0, 0))
#define QT6_BUILD
#endif

The other code would then only use:

#ifdef QT6_BUILD
[...]
#endif

Edit: the file was created with the following command in the build directory:

make -j12 > build_out.txt 2> build_warnings.txt

@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Apr 20, 2024

@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.
@michaelgregorius
Copy link
Contributor

@michaelgregorius would DeprecationHelper.h help?

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.

@michaelgregorius
Copy link
Contributor

Heres a list of the remaining deprecation warnings:

lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/src/core/base64.cpp:35:67: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/src/core/base64.cpp:46:57: Warnung: »QVariant::Type QVariant::type() const« ist veraltet: Use typeId() or metaType(). [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/src/core/DataFile.cpp:1004:43: Warnung: »QVariant::Type QVariant::type() const« ist veraltet: Use typeId() or metaType(). [-Wdeprecated-declarations]
lmms/src/core/DataFile.cpp:1009:48: Warnung: »QVariant::Type QVariant::type() const« ist veraltet: Use typeId() or metaType(). [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:273:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:281:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:288:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:292:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:296:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:310:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:315:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:321:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:328:32: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:334:44: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:338:44: Warnung: »QAction* QMenu::addAction(const QIcon&, const QString&, const QObject*, const char*, const QKeySequence&)« ist veraltet: Use addAction(icon, text, shortcut, receiver, member) instead. [-Wdeprecated-declarations]
lmms/src/gui/MainWindow.cpp:635:38: Warnung: »QMessageBox::QMessageBox(const QString&, const QString&, Icon, int, int, int, QWidget*, Qt::WindowFlags)« ist veraltet: Use the overload taking StandardButtons instead. [-Wdeprecated-declarations]
lmms/src/gui/editors/Editor.cpp:119:52: Warnung: »constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)« ist veraltet: Use operator| instead [-Wdeprecated-declarations]
lmms/src/gui/editors/Editor.cpp:120:52: Warnung: »constexpr QKeyCombination operator+(Qt::Modifier, Qt::Key)« ist veraltet: Use operator| instead [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1316:35: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1320:66: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1343:54: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1348:62: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1352:75: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/AutomationEditor.cpp:1353:75: Warnung: »QMap<int, lmms::AutomationNode>::iterator operator+(QMap<int, lmms::AutomationNode>::iterator, QMap<int, lmms::AutomationNode>::iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/PianoRoll.cpp:1106:61: Warnung: »QMap<int, lmms::AutomationNode>::const_iterator operator-(QMap<int, lmms::AutomationNode>::const_iterator, QMap<int, lmms::AutomationNode>::const_iterator::difference_type)« ist veraltet: Use std::prev; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/editors/PianoRoll.cpp:1131:35: Warnung: »QMap<int, lmms::AutomationNode>::const_iterator operator+(QMap<int, lmms::AutomationNode>::const_iterator, QMap<int, lmms::AutomationNode>::const_iterator::difference_type)« ist veraltet: Use std::next; QMap iterators are not random access [-Wdeprecated-declarations]
lmms/src/gui/tracks/AutomationTrackView.cpp:69:43: Warnung: »QPoint QDropEvent::pos() const« ist veraltet: Use position().toPoint() [-Wdeprecated-declarations]
lmms/src/gui/tracks/TrackLabelButton.cpp:175:50: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/tracks/SampleTrackView.cpp:210:35: Warnung: »QPoint QDropEvent::pos() const« ist veraltet: Use position().toPoint() [-Wdeprecated-declarations]
lmms/src/gui/tracks/SampleTrackView.cpp:212:42: Warnung: »QPoint QDropEvent::pos() const« ist veraltet: Use position().toPoint() [-Wdeprecated-declarations]
lmms/src/gui/tracks/TrackView.cpp:349:92: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/Fader.cpp:111:64: Warnung: »int QMouseEvent::globalY() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/Fader.cpp:145:63: Warnung: »int QMouseEvent::globalY() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdSpinBox.cpp:89:50: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdSpinBox.cpp:111:40: Warnung: »int QMouseEvent::globalY() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdSpinBox.cpp:124:58: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdFloatSpinBox.cpp:140:29: Warnung: »int QMouseEvent::x() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdFloatSpinBox.cpp:147:50: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdFloatSpinBox.cpp:167:40: Warnung: »int QMouseEvent::globalY() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/gui/widgets/LcdFloatSpinBox.cpp:173:58: Warnung: »QPoint QMouseEvent::globalPos() const« ist veraltet: Use globalPosition() [-Wdeprecated-declarations]
lmms/src/core/main.cpp:359:44: Warnung: »Qt::AA_EnableHighDpiScaling« ist veraltet: High-DPI scaling is always enabled. This attribute no longer has any effect. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:263:75: Warnung: »gig::Instrument* gig::File::GetFirstInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:282:64: Warnung: »gig::Instrument* gig::File::GetNextInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:722:60: Warnung: »gig::Region* gig::Instrument::GetFirstRegion()« ist veraltet: Use GetRegionAt() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:768:54: Warnung: »gig::Region* gig::Instrument::GetNextRegion()« ist veraltet: Use GetRegionAt() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:866:83: Warnung: »gig::Instrument* gig::File::GetFirstInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/GigPlayer.cpp:878:72: Warnung: »gig::Instrument* gig::File::GetNextInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/PatchesDialog.cpp:146:73: Warnung: »gig::Instrument* gig::File::GetFirstInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/PatchesDialog.cpp:169:62: Warnung: »gig::Instrument* gig::File::GetNextInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/PatchesDialog.cpp:344:73: Warnung: »gig::Instrument* gig::File::GetFirstInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/GigPlayer/PatchesDialog.cpp:369:62: Warnung: »gig::Instrument* gig::File::GetNextInstrument()« ist veraltet: Use GetInstrument() instead. [-Wdeprecated-declarations]
lmms/plugins/Sf2Player/Sf2Player.cpp:507:34: Warnung: »void fluid_synth_set_reverb_on(fluid_synth_t*, int)« ist veraltet [-Wdeprecated-declarations]
lmms/plugins/Sf2Player/Sf2Player.cpp:515:31: Warnung: »int fluid_synth_set_reverb(fluid_synth_t*, double, double, double, double)« ist veraltet [-Wdeprecated-declarations]
lmms/plugins/Sf2Player/Sf2Player.cpp:525:34: Warnung: »void fluid_synth_set_chorus_on(fluid_synth_t*, int)« ist veraltet [-Wdeprecated-declarations]
lmms/plugins/Sf2Player/Sf2Player.cpp:533:31: Warnung: »int fluid_synth_set_chorus(fluid_synth_t*, int, double, double, double, int)« ist veraltet [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:825:48: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:825:74: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:825:105: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:826:64: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:826:90: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:826:121: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:831:48: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:831:74: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:831:105: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:832:64: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:832:90: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaSpectrumView.cpp:832:121: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:331:48: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:331:74: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:331:105: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:332:64: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:332:90: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:332:121: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:337:48: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:337:74: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:337:105: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:338:64: Warnung: »QPointF QMouseEvent::localPos() const« ist veraltet: Use position() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:338:90: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/plugins/SpectrumAnalyzer/SaWaterfallView.cpp:338:121: Warnung: »QPointF QMouseEvent::windowPos() const« ist veraltet: Use scenePosition() [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]
lmms/include/base64.h:52:72: Warnung: »Type« ist veraltet: Use QMetaType::Type instead. [-Wdeprecated-declarations]

Getting more and more manageable. 😃

CMakeLists.txt Outdated Show resolved Hide resolved
Fix more warnings about iterator operators by using `std::prev` and `std::next`.
Fix warnings about `QKeyCombination::operator+`.
CMakeLists.txt Outdated Show resolved Hide resolved
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Apr 24, 2024

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.

@Rossmaxx
Copy link
Contributor Author

Also, i believe the QKeySequence changes can go as a seperate PR to master.

@michaelgregorius if you don't mind, can you submit a PR, or shall i cherry pick it?

@michaelgregorius
Copy link
Contributor

Also, i believe the QKeySequence changes can go as a seperate PR to master.

@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)
Copy link
Member

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.

@Rossmaxx
Copy link
Contributor Author

what's the intention for this?

To reduce diff between master and this PR but like you said, it's not really needed as it'll land in master anyway.

@Veratil Veratil changed the base branch from master to qt6 April 25, 2024 03:50
@Veratil Veratil merged commit 2bd862a into LMMS:qt6 Apr 25, 2024
9 checks passed
@Rossmaxx
Copy link
Contributor Author

@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.

@michaelgregorius
Copy link
Contributor

what's the intention for this?

To reduce diff between master and this PR but like you said, it's not really needed as it'll land in master anyway.

I think it's too much effort for the few lines that would be removed from the diff.

tresf pushed a commit that referenced this pull request May 17, 2024
* 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>
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.

5 participants