From 7b5ec8f63fd8cb1fa9bd91cb1ad4a7bed0c64955 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 13 Apr 2023 16:21:36 +0300 Subject: [PATCH] There were fixed typos --- historynotificationsmodel.cpp | 3 +-- notificationdata.cpp | 8 ++++---- notificationdata.h | 4 ++-- notificationservice.h | 1 - 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/historynotificationsmodel.cpp b/historynotificationsmodel.cpp index 1049dd5..3c63e59 100644 --- a/historynotificationsmodel.cpp +++ b/historynotificationsmodel.cpp @@ -44,8 +44,7 @@ void HistoryNotificationsModel::addHistoryObject(const QmlNotificationService::N endInsertRows(); } -void HistoryNotificationsModel::setHistory(const QList &historyList) -{ +void HistoryNotificationsModel::setHistory(const QList &historyList) { notificationsList = std::move(historyList); } diff --git a/notificationdata.cpp b/notificationdata.cpp index bed8df2..072e368 100644 --- a/notificationdata.cpp +++ b/notificationdata.cpp @@ -1,4 +1,4 @@ -/* + /* * Copyright (C) 2018-2023 QuasarApp. * Distributed under the lgplv3 software license, see the accompanying * Everyone is permitted to copy and distribute verbatim copies @@ -24,10 +24,10 @@ QString NotificationData::text() const { QString NotificationData::img() const { const QString imageSrc = imgSrc(); - if(imageSrc != "") + if(imageSrc.size()) return imageSrc; - else - return this->getDefaultImage(_type); + + return this->getDefaultImage(_type); } QString NotificationData::imgSrc() const diff --git a/notificationdata.h b/notificationdata.h index a77557d..996eb15 100644 --- a/notificationdata.h +++ b/notificationdata.h @@ -38,8 +38,8 @@ public: Q_INVOKABLE QString text() const; /** - * @brief img This method return url to image of a question/notification object. - * @return url of image. + * @brief img This method return url to image of a question/notification object if it exisis or return url of default question/notification image. + * @return url of image or url of default image. */ Q_INVOKABLE QString img() const; diff --git a/notificationservice.h b/notificationservice.h index 87ddc14..af7320f 100644 --- a/notificationservice.h +++ b/notificationservice.h @@ -6,7 +6,6 @@ #include #include -#include #include namespace QmlNotificationService {