2022-02-15 10:03:18 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2022 MBition GmbH
|
|
|
|
SPDX-FileContributor: Kai Uwe Broulik <kai_uwe.broulik@mbition.io>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-05-17 10:36:34 +00:00
|
|
|
#include <memory>
|
2022-02-15 10:03:18 +00:00
|
|
|
|
|
|
|
class QQmlEngine;
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
class SharedQmlEngine
|
|
|
|
{
|
|
|
|
public:
|
2022-05-17 10:36:34 +00:00
|
|
|
using Ptr = std::shared_ptr<QQmlEngine>;
|
2022-02-15 10:03:18 +00:00
|
|
|
static Ptr engine();
|
|
|
|
|
|
|
|
private:
|
2022-05-17 10:36:34 +00:00
|
|
|
static std::weak_ptr<QQmlEngine> s_engine;
|
2022-02-15 10:03:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|