prevent crash when this gets called too early
svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=670543
This commit is contained in:
parent
3ccb56568f
commit
357db36e7f
10
applet.cpp
10
applet.cpp
@ -137,16 +137,24 @@ bool Applet::loadDataEngine( const QString& name )
|
||||
|
||||
void Applet::constraintsUpdated()
|
||||
{
|
||||
kDebug() << "constraints are FormFactor: " << formFactor() << ", Location: " << location() << endl;
|
||||
kDebug() << "Applet::constraintsUpdate(): constraints are FormFactor: " << formFactor() << ", Location: " << location() << endl;
|
||||
}
|
||||
|
||||
FormFactor Applet::formFactor() const
|
||||
{
|
||||
if (!scene()) {
|
||||
return Plasma::Planar;
|
||||
}
|
||||
|
||||
return static_cast<Corona*>(scene())->formFactor();
|
||||
}
|
||||
|
||||
Location Applet::location() const
|
||||
{
|
||||
if (!scene()) {
|
||||
return Plasma::Desktop;
|
||||
}
|
||||
|
||||
return static_cast<Corona*>(scene())->location();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user