From 52d64b561c03f5d51c6e18bc0f884e867828bd10 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 11 Jan 2017 15:18:39 +0200 Subject: [PATCH] restore the init functionality --- app/dockconfigview.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/app/dockconfigview.cpp b/app/dockconfigview.cpp index 9d203f8dc..0814c25d8 100644 --- a/app/dockconfigview.cpp +++ b/app/dockconfigview.cpp @@ -67,15 +67,6 @@ DockConfigView::DockConfigView(Plasma::Containment *containment, DockView *dockV connections << connect(dockView->visibility(), &VisibilityManager::modeChanged, this, &DockConfigView::syncGeometry); connections << connect(containment, &Plasma::Containment::immutabilityChanged, this, &DockConfigView::immutabilityChanged); - - setDefaultAlphaBuffer(true); - setColor(Qt::transparent); - rootContext()->setContextProperty(QStringLiteral("dock"), m_dockView); - rootContext()->setContextProperty(QStringLiteral("dockConfig"), this); - rootContext()->setContextObject(new KLocalizedContext(this)); - auto source = QUrl::fromLocalFile(m_containment->corona()->kPackage().filePath("lattedockconfigurationui")); - setSource(source); - syncSlideEffect(); } DockConfigView::~DockConfigView() @@ -87,6 +78,14 @@ DockConfigView::~DockConfigView() void DockConfigView::init() { + setDefaultAlphaBuffer(true); + setColor(Qt::transparent); + rootContext()->setContextProperty(QStringLiteral("dock"), m_dockView); + rootContext()->setContextProperty(QStringLiteral("dockConfig"), this); + rootContext()->setContextObject(new KLocalizedContext(this)); + auto source = QUrl::fromLocalFile(m_containment->corona()->kPackage().filePath("lattedockconfigurationui")); + setSource(source); + syncSlideEffect(); } inline Qt::WindowFlags DockConfigView::wFlags() const @@ -179,13 +178,13 @@ void DockConfigView::syncSlideEffect() void DockConfigView::showEvent(QShowEvent *ev) { QQuickWindow::showEvent(ev); - + KWindowSystem::setType(winId(), NET::Dock); setFlags(wFlags()); KWindowSystem::setState(winId(), NET::KeepAbove | NET::SkipPager | NET::SkipTaskbar); KWindowSystem::forceActiveWindow(winId()); KWindowEffects::enableBlurBehind(winId(), true); - + syncGeometry(); syncSlideEffect(); @@ -195,7 +194,6 @@ void DockConfigView::showEvent(QShowEvent *ev) m_screenSyncTimer.start(); QTimer::singleShot(400, this, &DockConfigView::syncGeometry); - } void DockConfigView::hideEvent(QHideEvent *ev) @@ -237,6 +235,5 @@ void DockConfigView::setSticker(bool blockFocusLost) m_blockFocusLost = blockFocusLost; } - } // kate: indent-mode cstyle; indent-width 4; replace-tabs on;