Use std::make_unique

This commit is contained in:
Jonas Kvinge
2021-06-21 15:40:25 +02:00
parent 99ba2c2e8b
commit ed09627fdb
21 changed files with 52 additions and 30 deletions

View File

@@ -117,7 +117,7 @@ OSDDBus::~OSDDBus() = default;
void OSDDBus::Init() {
interface_.reset(new OrgFreedesktopNotificationsInterface(OrgFreedesktopNotificationsInterface::staticInterfaceName(), "/org/freedesktop/Notifications", QDBusConnection::sessionBus()));
interface_ = std::make_unique<OrgFreedesktopNotificationsInterface>(OrgFreedesktopNotificationsInterface::staticInterfaceName(), "/org/freedesktop/Notifications", QDBusConnection::sessionBus());
if (!interface_->isValid()) {
qLog(Warning) << "Error connecting to notifications service.";
}