From 1d9833366010e3861491178eca1a9cb6d8f35108 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Wed, 21 Dec 2022 21:12:24 +0100 Subject: [PATCH] effects/tileseditor: don't mix QObject and std::unique_ptr ownership --- src/effects/tileseditor/tileseditoreffect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/effects/tileseditor/tileseditoreffect.cpp b/src/effects/tileseditor/tileseditoreffect.cpp index 6cf8c0cb87..1bfdc0baba 100644 --- a/src/effects/tileseditor/tileseditoreffect.cpp +++ b/src/effects/tileseditor/tileseditoreffect.cpp @@ -16,14 +16,14 @@ namespace KWin { TilesEditorEffect::TilesEditorEffect() - : m_shutdownTimer(new QTimer(this)) + : m_shutdownTimer(std::make_unique()) { m_shutdownTimer->setSingleShot(true); connect(m_shutdownTimer.get(), &QTimer::timeout, this, &TilesEditorEffect::realDeactivate); connect(effects, &EffectsHandler::screenAboutToLock, this, &TilesEditorEffect::realDeactivate); const QKeySequence defaultToggleShortcut = Qt::META | Qt::Key_T; - m_toggleAction.reset(new QAction(this)); + m_toggleAction = std::make_unique(); connect(m_toggleAction.get(), &QAction::triggered, this, &TilesEditorEffect::toggle); m_toggleAction->setObjectName(QStringLiteral("Edit Tiles")); m_toggleAction->setText(i18n("Toggle Tiles Editor"));