From c0c57d7076c8b0f9cc630caf251b3524c37a483c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 20 Oct 2014 17:42:50 +0200 Subject: [PATCH] KDecoration2::DecorationBridge uses std::unique_ptr --- decorations/decorationbridge.cpp | 8 ++++---- decorations/decorationbridge.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/decorations/decorationbridge.cpp b/decorations/decorationbridge.cpp index f4468340c4..196a683a31 100644 --- a/decorations/decorationbridge.cpp +++ b/decorations/decorationbridge.cpp @@ -102,14 +102,14 @@ void DecorationBridge::loadMetaData(const QJsonObject &object) } } -KDecoration2::DecoratedClientPrivate *DecorationBridge::createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration) +std::unique_ptr DecorationBridge::createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration) { - return new DecoratedClientImpl(static_cast(decoration->parent()), client, decoration); + return std::unique_ptr(new DecoratedClientImpl(static_cast(decoration->parent()), client, decoration)); } -KDecoration2::DecorationSettingsPrivate *DecorationBridge::settings(KDecoration2::DecorationSettings *parent) +std::unique_ptr DecorationBridge::settings(KDecoration2::DecorationSettings *parent) { - return new SettingsImpl(parent); + return std::unique_ptr(new SettingsImpl(parent)); } void DecorationBridge::update(KDecoration2::Decoration *decoration, const QRect &geometry) diff --git a/decorations/decorationbridge.h b/decorations/decorationbridge.h index 9d4ac433c7..6bfc8f9cee 100644 --- a/decorations/decorationbridge.h +++ b/decorations/decorationbridge.h @@ -44,8 +44,8 @@ public: void init(); KDecoration2::Decoration *createDecoration(Client *client); - KDecoration2::DecoratedClientPrivate *createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration) override; - KDecoration2::DecorationSettingsPrivate *settings(KDecoration2::DecorationSettings *parent) override; + std::unique_ptr createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration) override; + std::unique_ptr settings(KDecoration2::DecorationSettings *parent) override; void update(KDecoration2::Decoration *decoration, const QRect &geometry) override; bool needsBlur() const {