[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace/mart/plasma-windowed] plasma-windowed: ome checks
From: Marco Martin <notmart () gmail ! com>
Date: 2014-08-25 15:46:28
Message-ID: E1XLwTU-0007jY-AP () scm ! kde ! org
[Download RAW message or body]
Git commit 94f36a6a3566a133204e2b9e3be3870bd9824365 by Marco Martin.
Committed on 25/08/2014 at 15:45.
Pushed by mart into branch 'mart/plasma-windowed'.
ome checks
M +16 -0 plasma-windowed/plasmawindowedview.cpp
http://commits.kde.org/plasma-workspace/94f36a6a3566a133204e2b9e3be3870bd9824365
diff --git a/plasma-windowed/plasmawindowedview.cpp b/plasma-windowed/plasmawindowedview.cpp
index ff1e232..5ffebd8 100644
--- a/plasma-windowed/plasmawindowedview.cpp
+++ b/plasma-windowed/plasmawindowedview.cpp
@@ -45,7 +45,15 @@ PlasmaWindowedView::~PlasmaWindowedView()
void PlasmaWindowedView::setApplet(Plasma::Applet *applet)
{
m_applet = applet;
+ if (!applet) {
+ return;
+ }
+
QQuickItem *i = applet->property("_plasma_graphicObject").value<QQuickItem *>();
+ if (!i) {
+ return;
+ }
+
i->setParentItem(contentItem());
i->setVisible(true);
setTitle(applet->title());
@@ -53,7 +61,15 @@ void PlasmaWindowedView::setApplet(Plasma::Applet *applet)
void PlasmaWindowedView::resizeEvent(QResizeEvent *ev)
{
+ if (!m_applet) {
+ return;
+ }
+
QQuickItem *i = m_applet->property("_plasma_graphicObject").value<QQuickItem *>();
+ if (!i) {
+ return;
+ }
+
i->setWidth(ev->size().width());
i->setHeight(ev->size().height());
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic