[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-runtime] plasma/kpart: assert plasma kpart on various "should never happen" cases
From: Shaun Reich <shaun.reich () kdemail ! net>
Date: 2012-02-11 16:39:57
Message-ID: 20120211163957.C586DA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 285def60408038c86f4283fde42210b284d6e659 by Shaun Reich.
Committed on 11/02/2012 at 17:38.
Pushed by sreich into branch 'master'.
assert plasma kpart on various "should never happen" cases
M +4 -0 plasma/kpart/plasmakpart.cpp
http://commits.kde.org/kde-runtime/285def60408038c86f4283fde42210b284d6e659
diff --git a/plasma/kpart/plasmakpart.cpp b/plasma/kpart/plasmakpart.cpp
index 9259a20..3eb5f6e 100644
--- a/plasma/kpart/plasmakpart.cpp
+++ b/plasma/kpart/plasmakpart.cpp
@@ -127,11 +127,13 @@ PlasmaKPartCorona* PlasmaKPart::corona() const
void PlasmaKPart::createView(Plasma::Containment *containment)
{
+ Q_ASSERT(containment);
m_view->setContainment(containment);
}
void PlasmaKPart::addApplet(const QString& name, const QVariantList& args, const QRectF& geometry )
{
+ Q_ASSERT(containment());
containment()->addApplet(name, args, geometry);
}
@@ -155,6 +157,8 @@ void PlasmaKPart::setConfigFile(const QString &file)
Plasma::Containment* PlasmaKPart::containment() const
{
+ Q_ASSERT(corona());
+ Q_ASSERT(!corona()->containments().isEmpty());
return corona()->containments().first();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic