drop the requirement of a containment on construction
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=852337
This commit is contained in:
parent
e293d7d785
commit
364aabf073
18
view.cpp
18
view.cpp
@ -108,20 +108,24 @@ View::View(Containment *containment, QWidget *parent)
|
||||
: QGraphicsView(parent),
|
||||
d(new ViewPrivate(this, 0))
|
||||
{
|
||||
Q_ASSERT(containment);
|
||||
d->initGraphicsView();
|
||||
setScene(containment->scene());
|
||||
setContainment(containment);
|
||||
|
||||
if (containment) {
|
||||
setScene(containment->scene());
|
||||
setContainment(containment);
|
||||
}
|
||||
}
|
||||
|
||||
View::View(Containment *containment, int viewId, QWidget *parent)
|
||||
: QGraphicsView(parent),
|
||||
d(new ViewPrivate(this, viewId))
|
||||
{
|
||||
Q_ASSERT(containment);
|
||||
d->initGraphicsView();
|
||||
setScene(containment->scene());
|
||||
setContainment(containment);
|
||||
|
||||
if (containment) {
|
||||
setScene(containment->scene());
|
||||
setContainment(containment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -200,6 +204,8 @@ void View::setContainment(Plasma::Containment *containment)
|
||||
int screen = -1;
|
||||
if (oldContainment) {
|
||||
screen = d->containment->screen();
|
||||
} else {
|
||||
setScene(containment->scene());
|
||||
}
|
||||
|
||||
d->containment = containment;
|
||||
|
Loading…
Reference in New Issue
Block a user