From 823f3cdd4ea5fbd9cc3ed841622f336e4396d3a1 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 13 Sep 2023 14:03:34 +0200 Subject: [PATCH] Remove QML Qt5/Qt6 compatibility hacks --- src/qml/Component/Timeline/AudioDelegate.qml | 5 ++--- src/qml/Component/Timeline/OsmLocationPlugin.qml | 4 ++-- src/qml/Component/Timeline/VideoDelegate.qml | 3 +-- src/qml/Dialog/PowerLevelDialog.qml | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/qml/Component/Timeline/AudioDelegate.qml b/src/qml/Component/Timeline/AudioDelegate.qml index cfc6df288..c0549e3f0 100644 --- a/src/qml/Component/Timeline/AudioDelegate.qml +++ b/src/qml/Component/Timeline/AudioDelegate.qml @@ -4,7 +4,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 import QtQuick.Layouts 1.15 -import QtMultimedia @QTMULTIMEDIA_MODULE_QML_VERSION@ +import QtMultimedia import org.kde.kirigami 2.15 as Kirigami @@ -42,10 +42,9 @@ TimelineContainer { Layout.fillWidth: true Layout.maximumWidth: root.contentMaxWidth - @QTMULTIMEDIA_AUDIO@ { + MediaPlayer { id: audio source: root.progressInfo.localPath - @QTMULTIMEDIA_AUDIO_AUTOLOAD@ } states: [ diff --git a/src/qml/Component/Timeline/OsmLocationPlugin.qml b/src/qml/Component/Timeline/OsmLocationPlugin.qml index f936398a7..3073bc327 100644 --- a/src/qml/Component/Timeline/OsmLocationPlugin.qml +++ b/src/qml/Component/Timeline/OsmLocationPlugin.qml @@ -3,8 +3,8 @@ pragma Singleton -import QtQuick @QTQUICK_MODULE_QML_VERSION@ -import QtLocation @QTLOCATION_MODULE_QML_VERSION@ +import QtQuick +import QtLocation QtObject { property var plugin: Plugin { diff --git a/src/qml/Component/Timeline/VideoDelegate.qml b/src/qml/Component/Timeline/VideoDelegate.qml index 47c8e1180..9ee8dd20b 100644 --- a/src/qml/Component/Timeline/VideoDelegate.qml +++ b/src/qml/Component/Timeline/VideoDelegate.qml @@ -4,7 +4,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 as QQC2 import QtQuick.Layouts 1.15 -import QtMultimedia @QTMULTIMEDIA_MODULE_QML_VERSION@ +import QtMultimedia import Qt.labs.platform 1.1 as Platform import org.kde.kirigami 2.13 as Kirigami @@ -73,7 +73,6 @@ TimelineContainer { Layout.preferredHeight: mediaSizeHelper.currentSize.height fillMode: VideoOutput.PreserveAspectFit - @QTMULTIMEDIA_VIDEO_FLUSHMODE@ states: [ State { diff --git a/src/qml/Dialog/PowerLevelDialog.qml b/src/qml/Dialog/PowerLevelDialog.qml index 64ff35dc8..0bc131160 100644 --- a/src/qml/Dialog/PowerLevelDialog.qml +++ b/src/qml/Dialog/PowerLevelDialog.qml @@ -17,7 +17,7 @@ Kirigami.OverlaySheet { property var userId property int powerLevel - @OVERLAYSHEET_OPEN@: { + onOpened: { if (sheetOpen) { powerLevelComboBox.currentIndex = powerLevelComboBox.indexOfValue(root.powerLevel) }