Application: Use shared pointers

Fixes #1239
This commit is contained in:
Jonas Kvinge
2023-07-21 05:55:24 +02:00
parent d6b53f78ab
commit 2e61235403
316 changed files with 2170 additions and 1643 deletions

View File

@@ -24,8 +24,6 @@
#include "config.h"
#include <memory>
#include <QtGlobal>
#include <QObject>
#include <QString>
@@ -35,6 +33,7 @@
#include <QDBusArgument>
#include <QVersionNumber>
#include "core/scoped_ptr.h"
#include "osdbase.h"
class OrgFreedesktopNotificationsInterface;
@@ -47,7 +46,7 @@ class OSDDBus : public OSDBase {
Q_OBJECT
public:
explicit OSDDBus(std::shared_ptr<SystemTrayIcon> tray_icon, Application *app, QObject *parent = nullptr);
explicit OSDDBus(SharedPtr<SystemTrayIcon> tray_icon, Application *app, QObject *parent = nullptr);
~OSDDBus() override;
static const char *kSettingsGroup;
@@ -63,7 +62,7 @@ class OSDDBus : public OSDBase {
void CallFinished(QDBusPendingCallWatcher *watcher);
private:
std::unique_ptr<OrgFreedesktopNotificationsInterface> interface_;
ScopedPtr<OrgFreedesktopNotificationsInterface> interface_;
QVersionNumber version_;
uint notification_id_;
QDateTime last_notification_time_;