aboutsummaryrefslogtreecommitdiff
path: root/src/notificationpopup.h
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahm@jadupc.com>2023-09-19 02:01:41 +0600
committerLibravatar Mubashshir <ahm@jadupc.com>2023-09-19 02:01:41 +0600
commit36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530 (patch)
treecad68505e3dcff4e8d37c5a6a052240d8a935efb /src/notificationpopup.h
parent35d85d38d02d97e1c63729bb3301f46bb6f96728 (diff)
parent906ca7eb436dc9944d43f5b7f6ae7b44afc2a3e7 (diff)
downloadwhatsie-36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530.tar.gz
whatsie-36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530.zip
Update upstream source from tag 'upstream/4.14.1'
Update to upstream version '4.14.1' with Debian dir 267b96a979689ac47077c72b576cf79da29f8ff2
Diffstat (limited to 'src/notificationpopup.h')
-rw-r--r--src/notificationpopup.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/notificationpopup.h b/src/notificationpopup.h
index 3a765e0..69aa478 100644
--- a/src/notificationpopup.h
+++ b/src/notificationpopup.h
@@ -1,9 +1,9 @@
#ifndef NOTIFICATIONPOPUP_H
#define NOTIFICATIONPOPUP_H
-#pragma once
-
+#include "settingsmanager.h"
#include "widgets/scrolltext/scrolltext.h"
+
#include <QApplication>
#include <QDebug>
#include <QDesktopWidget>
@@ -13,7 +13,6 @@
#include <QPropertyAnimation>
#include <QPushButton>
#include <QScreen>
-#include <QSettings>
#include <QSpacerItem>
#include <QTimer>
#include <QVBoxLayout>
@@ -27,7 +26,6 @@ class NotificationPopup : public QWidget {
QLabel m_icon, m_title;
ScrollText m_message;
std::unique_ptr<QWebEngineNotification> notification;
- QSettings settings;
public:
NotificationPopup(QWidget *parent) : QWidget(parent) {
@@ -62,7 +60,10 @@ public:
image.scaledToHeight(m_icon.height(), Qt::SmoothTransformation));
this->adjustSize();
- QTimer::singleShot(settings.value("notificationTimeOut", 9000).toInt(),
+ QTimer::singleShot(SettingsManager::instance()
+ .settings()
+ .value("notificationTimeOut", 9000)
+ .toInt(),
this, [=]() { onClosed(); });
animateIn(screenNumber);
@@ -87,7 +88,10 @@ public:
connect(notification.get(), &QWebEngineNotification::closed, this,
&NotificationPopup::onClosed);
- QTimer::singleShot(settings.value("notificationTimeOut", 9000).toInt(),
+ QTimer::singleShot(SettingsManager::instance()
+ .settings()
+ .value("notificationTimeOut", 9000)
+ .toInt(),
notification.get(), [&]() { onClosed(); });
animateIn(screenNumber);