Commit a2851338 authored by David Edmundson's avatar David Edmundson
Browse files

Fixup deprecated use of QWeakPointer::data

Summary:
At the point init is run we can be sure that our decoration->client()
pointer is valid, but we still need to get a strongRef for the duration
of our usage for Qt6

Test Plan: Compiles

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25636
parent b04fbd88
......@@ -64,7 +64,9 @@ DecorationButton::Private::~Private() = default;
void DecorationButton::Private::init()
{
auto c = decoration->client().data();
auto clientPtr = decoration->client().toStrongRef();
Q_ASSERT(clientPtr);
auto c = clientPtr.data();
auto settings = decoration->settings();
switch (type) {
case DecorationButtonType::Menu:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment