diff --git a/.gitignore b/.gitignore index 17f1d3b31..45a6b6d59 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ CMakeLists.txt.user /cmake-build* .clang-format app/resources.generated.qrc +smsapp/resources.generated.qrc diff --git a/smsapp/qml/AttachmentViewer.qml b/smsapp/qml/AttachmentViewer.qml index 1e2e40f45..8c43f997a 100644 --- a/smsapp/qml/AttachmentViewer.qml +++ b/smsapp/qml/AttachmentViewer.qml @@ -8,14 +8,14 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.12 import org.kde.kirigami 2.13 as Kirigami -import QtMultimedia 5.12 +import QtMultimedia Kirigami.Page { id: root property string filePath property string mimeType - contextualActions: [ + actions: [ Kirigami.Action { text: i18nd("kdeconnect-sms", "Open with default") icon.name: "window-new" @@ -66,13 +66,15 @@ Kirigami.Page { height: parent.height - mediaControls.height anchors.topMargin: root.implicitHeaderHeight - VideoOutput { - anchors.fill: parent + MediaPlayer { source: mediaPlayer - fillMode: VideoOutput.PreserveAspectFit + videoOutput: VideoOutput { + anchors.fill: parent + fillMode: VideoOutput.PreserveAspectFit - // By default QML's videoOutput element rotates the vdeeo files by 90 degrees in clockwise direction - orientation: -90 + // By default QML's videoOutput element rotates the vdeeo files by 90 degrees in clockwise direction + orientation: -90 + } } } diff --git a/smsapp/qml/ChatMessage.qml b/smsapp/qml/ChatMessage.qml index 925d31f0e..b94fd449b 100644 --- a/smsapp/qml/ChatMessage.qml +++ b/smsapp/qml/ChatMessage.qml @@ -7,8 +7,9 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.12 +import Qt5Compat.GraphicalEffects import org.kde.kirigami 2.13 as Kirigami +import org.kde.kirigamiaddons.components as KirigamiComponents Item { id: root @@ -25,7 +26,7 @@ Item { signal messageCopyRequested(string message) - Kirigami.Avatar { + KirigamiComponents.Avatar { id: avatar width: visible ? Kirigami.Units.gridUnit * 2 : 0 height: width diff --git a/smsapp/qml/ConversationDisplay.qml b/smsapp/qml/ConversationDisplay.qml index a061151e7..b7b717399 100644 --- a/smsapp/qml/ConversationDisplay.qml +++ b/smsapp/qml/ConversationDisplay.qml @@ -12,7 +12,7 @@ import QtQuick.Layouts 1.1 import org.kde.people 1.0 import org.kde.kirigami 2.4 as Kirigami import org.kde.kdeconnect.sms 1.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects Kirigami.ScrollablePage { diff --git a/smsapp/qml/ConversationList.qml b/smsapp/qml/ConversationList.qml index 918fe4fc5..39d24a065 100644 --- a/smsapp/qml/ConversationList.qml +++ b/smsapp/qml/ConversationList.qml @@ -81,7 +81,7 @@ Kirigami.ScrollablePage actions: [ Kirigami.Action { - iconName: "dialog-cancel" + icon.name: "dialog-cancel" text: i18nd("kdeconnect-sms", "Cancel") onTriggered: initialMessage = "" } diff --git a/smsapp/qml/MessageAttachments.qml b/smsapp/qml/MessageAttachments.qml index b90397fca..0296571f8 100644 --- a/smsapp/qml/MessageAttachments.qml +++ b/smsapp/qml/MessageAttachments.qml @@ -7,9 +7,9 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.12 +import Qt5Compat.GraphicalEffects import org.kde.kirigami 2.13 as Kirigami -import QtMultimedia 5.12 +import QtMultimedia Item { id: root @@ -91,16 +91,16 @@ Item { radius: messageBox.radius color: "lightgrey" - Audio { + MediaPlayer { id: audioPlayer source: root.sourcePath - onStopped: { - audioPlayButton.icon.name = "media-playback-start" - } - - onPlaying: { - audioPlayButton.icon.name = "media-playback-stop" + onPlaybackStateChanged: { + if (playbackState === MediaPlayer.PlayingState) { + audioPlayButton.icon.name = "media-playback-stop" + } else { + audioPlayButton.icon.name = "media-playback-start" + } } } diff --git a/smsapp/qml/SendingArea.qml b/smsapp/qml/SendingArea.qml index 79aed4d39..2a861c456 100644 --- a/smsapp/qml/SendingArea.qml +++ b/smsapp/qml/SendingArea.qml @@ -8,8 +8,8 @@ import QtQuick 2.1 import QtQuick.Controls 2.2 as Controls import QtQuick.Layouts 1.1 import org.kde.kirigami 2.4 as Kirigami -import QtGraphicalEffects 1.0 -import QtQuick.Dialogs 1.1 +import Qt5Compat.GraphicalEffects +import QtQuick.Dialogs import org.kde.kdeconnect.sms 1.0 ColumnLayout { @@ -31,8 +31,8 @@ ColumnLayout { FileDialog { id: fileDialog - folder: shortcuts.home - selectMultiple: true + currentFolder: shortcuts.home + fileMode: FileDialog.OpenFiles onAccepted: { root.selectedFileUrls = fileDialog.fileUrls