KDecoration2::DecorationBridge uses std::unique_ptr
This commit is contained in:
parent
e32da9d9e0
commit
c0c57d7076
2 changed files with 6 additions and 6 deletions
|
@ -102,14 +102,14 @@ void DecorationBridge::loadMetaData(const QJsonObject &object)
|
|||
}
|
||||
}
|
||||
|
||||
KDecoration2::DecoratedClientPrivate *DecorationBridge::createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration)
|
||||
std::unique_ptr<KDecoration2::DecoratedClientPrivate> DecorationBridge::createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration)
|
||||
{
|
||||
return new DecoratedClientImpl(static_cast<Client*>(decoration->parent()), client, decoration);
|
||||
return std::unique_ptr<DecoratedClientImpl>(new DecoratedClientImpl(static_cast<Client*>(decoration->parent()), client, decoration));
|
||||
}
|
||||
|
||||
KDecoration2::DecorationSettingsPrivate *DecorationBridge::settings(KDecoration2::DecorationSettings *parent)
|
||||
std::unique_ptr<KDecoration2::DecorationSettingsPrivate> DecorationBridge::settings(KDecoration2::DecorationSettings *parent)
|
||||
{
|
||||
return new SettingsImpl(parent);
|
||||
return std::unique_ptr<SettingsImpl>(new SettingsImpl(parent));
|
||||
}
|
||||
|
||||
void DecorationBridge::update(KDecoration2::Decoration *decoration, const QRect &geometry)
|
||||
|
|
|
@ -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<KDecoration2::DecoratedClientPrivate> createClient(KDecoration2::DecoratedClient *client, KDecoration2::Decoration *decoration) override;
|
||||
std::unique_ptr<KDecoration2::DecorationSettingsPrivate> settings(KDecoration2::DecorationSettings *parent) override;
|
||||
void update(KDecoration2::Decoration *decoration, const QRect &geometry) override;
|
||||
|
||||
bool needsBlur() const {
|
||||
|
|
Loading…
Reference in a new issue