From d21f09d4ab2eef4741f48bee2661be9a55a4e06b Mon Sep 17 00:00:00 2001 From: Roman Gilg Date: Thu, 4 Jul 2019 20:00:20 +0200 Subject: [PATCH] Remove Compositor created check Summary: Cleans up the Compositor code some more. The check is only used in a single assert statement. Test Plan: Compiles. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Maniphest Tasks: T11071 Differential Revision: https://phabricator.kde.org/D22278 --- composite.h | 10 ---------- thumbnailitem.cpp | 1 - 2 files changed, 11 deletions(-) diff --git a/composite.h b/composite.h index 1ddd264c61..5707c2e0ce 100644 --- a/composite.h +++ b/composite.h @@ -143,16 +143,6 @@ public: return m_scene; } - /** - * @brief Checks whether the Compositor has already been created by the Workspace. - * - * This method can be used to check whether self will return the Compositor instance or @c null. - * - * @return bool @c true if the Compositor has been created, @c false otherwise - **/ - static bool isCreated() { - return s_compositor != NULL; - } /** * @brief Static check to test whether the Compositor is available and active. * diff --git a/thumbnailitem.cpp b/thumbnailitem.cpp index 566232990d..3982a9dd85 100644 --- a/thumbnailitem.cpp +++ b/thumbnailitem.cpp @@ -41,7 +41,6 @@ AbstractThumbnailItem::AbstractThumbnailItem(QQuickItem *parent) , m_saturation(1.0) , m_clipToItem() { - Q_ASSERT(Compositor::isCreated()); connect(Compositor::self(), SIGNAL(compositingToggled(bool)), SLOT(compositingToggled())); compositingToggled(); QTimer::singleShot(0, this, SLOT(init()));