From 14e4f547d7afe4cc2c214806a08624946fce2ce7 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 31 May 2021 16:28:00 +0300 Subject: [PATCH] fix qt6 --- NotifyModule/BasePopUp.qml | 9 --------- NotifyModule/NotificationServiceView.qml | 19 +++++++++---------- notificationdata.h | 11 ++++++----- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/NotifyModule/BasePopUp.qml b/NotifyModule/BasePopUp.qml index dbcba2f..398d0a4 100644 --- a/NotifyModule/BasePopUp.qml +++ b/NotifyModule/BasePopUp.qml @@ -9,7 +9,6 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Controls.Material 2.15 import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.15 Dialog { id : basePopup @@ -38,14 +37,6 @@ Dialog { color: backgroundColor radius: metrix.mm } - - DropShadow { - anchors.fill: parent - source: backCorner - color: "#80000000" - verticalOffset: 10 - samples: 30 - } } function _show() { diff --git a/NotifyModule/NotificationServiceView.qml b/NotifyModule/NotificationServiceView.qml index e424f83..a4f7f32 100644 --- a/NotifyModule/NotificationServiceView.qml +++ b/NotifyModule/NotificationServiceView.qml @@ -9,7 +9,6 @@ import QtQuick 2.15 import QtQuick.Controls.Material 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.3 -import QtGraphicalEffects 1.15 Item { readonly property var model: notificationService; @@ -24,10 +23,10 @@ Item { NotificationForm { id: notyfyView - titleText : msg.title; - text: (msg)? msg.text: ""; - img: (msg && msg.img.length)? msg.img: getDefaultImage((msg)? msg.type: 0); - type: (msg)? msg.type: 0; + titleText : msg.title(); + text: (msg)? msg.text(): ""; + img: (msg && msg.img().length)? msg.img(): getDefaultImage((msg)? msg.type(): 0); + type: (msg)? msg.type(): 0; x: parent.width - width - margin; y: margin; @@ -38,9 +37,9 @@ Item { YesNoQuestion { id: questionMsgBox - titleText : qst.title; - text: (qst)? qst.text: ""; - img: (qst && qst.img.length)? qst.img: defImg; + titleText : qst.title(); + text: (qst)? qst.text(): ""; + img: (qst && qst.img().length)? qst.img(): defImg; type: 0; x: parent.width / 2 - width / 2; @@ -51,13 +50,13 @@ Item { onAccepted: { if (model) { - model.questionComplete(true, qst.type) + model.questionComplete(true, qst.type()) } } onRejected: { if (model) { - model.questionComplete(false, qst.type) + model.questionComplete(false, qst.type()) } } } diff --git a/notificationdata.h b/notificationdata.h index 035612c..5806e47 100644 --- a/notificationdata.h +++ b/notificationdata.h @@ -16,11 +16,6 @@ class NOTIFYSERVICESHARED_EXPORT NotificationData Q_PROPERTY(QString title READ title) Q_PROPERTY(int type READ type) - QString _text; - QString _img; - QString _title; - int _type; - public: /** @@ -79,6 +74,12 @@ public: bool operator ==(const NotificationData &righ); bool operator !=(const NotificationData &righ); +private: + QString _text; + QString _img; + QString _title; + int _type; + }; } #endif // NOTIFICATIONDATA_H