libkwineffects: Use more conventional constructor argument order in OffscreenQuickView

This commit is contained in:
Vlad Zahorodnii 2023-10-23 15:25:58 +03:00
parent 0f7369ed1b
commit 1ca4c23db1
3 changed files with 7 additions and 7 deletions

View file

@ -74,11 +74,11 @@ public:
};
OffscreenQuickView::OffscreenQuickView(QObject *parent)
: OffscreenQuickView(parent, effects ? ExportMode::Texture : ExportMode::Image)
: OffscreenQuickView(effects ? ExportMode::Texture : ExportMode::Image, parent)
{
}
OffscreenQuickView::OffscreenQuickView(QObject *parent, ExportMode exportMode)
OffscreenQuickView::OffscreenQuickView(ExportMode exportMode, QObject *parent)
: QObject(parent)
, d(new OffscreenQuickView::Private)
{
@ -526,8 +526,8 @@ OffscreenQuickScene::OffscreenQuickScene(QObject *parent)
{
}
OffscreenQuickScene::OffscreenQuickScene(QObject *parent, OffscreenQuickView::ExportMode exportMode)
: OffscreenQuickView(parent, exportMode)
OffscreenQuickScene::OffscreenQuickScene(OffscreenQuickView::ExportMode exportMode, QObject *parent)
: OffscreenQuickView(exportMode, parent)
, d(new OffscreenQuickScene::Private)
{
}

View file

@ -65,7 +65,7 @@ public:
/**
* Construct a new KWinQuickView explicitly stating an export mode
*/
OffscreenQuickView(QObject *parent, ExportMode exportMode);
OffscreenQuickView(ExportMode exportMode, QObject *parent);
/**
* Note that this may change the current GL Context
@ -165,7 +165,7 @@ class KWINEFFECTS_EXPORT OffscreenQuickScene : public OffscreenQuickView
{
public:
OffscreenQuickScene(QObject *parent);
OffscreenQuickScene(QObject *parent, ExportMode exportMode);
OffscreenQuickScene(ExportMode exportMode, QObject *parent);
~OffscreenQuickScene();
/** top level item in the given source*/

View file

@ -288,7 +288,7 @@ bool Decoration::init()
m_item->setParentItem(visualParent.value<QQuickItem *>());
visualParent.value<QQuickItem *>()->setProperty("drawBackground", false);
} else {
m_view = std::make_unique<KWin::OffscreenQuickView>(this, KWin::OffscreenQuickView::ExportMode::Image);
m_view = std::make_unique<KWin::OffscreenQuickView>(KWin::OffscreenQuickView::ExportMode::Image, this);
m_item->setParentItem(m_view->contentItem());
auto updateSize = [this]() {
m_item->setSize(m_view->contentItem()->size());