get rid of desktop and lastScreen accessors

remove Containment::desktop() lastDesktop(), lastScreen()
This commit is contained in:
Marco Martin 2013-02-18 17:57:05 +01:00
parent 94720b0cb4
commit 0e8115b697
4 changed files with 1 additions and 36 deletions

View File

@ -506,21 +506,6 @@ int Containment::screen() const
return d->screen;
}
int Containment::lastScreen() const
{
return d->lastScreen;
}
int Containment::desktop() const
{
return d->desktop;
}
int Containment::lastDesktop() const
{
return d->lastDesktop;
}
KPluginInfo::List Containment::listContainments(const QString &category,
const QString &parentApp)
{

View File

@ -227,25 +227,6 @@ class PLASMA_EXPORT Containment : public Applet
*/
int screen() const;
/**
* @return the last screen number this containment had
* only returns -1 if it's never ever been on a screen
* @since 4.5
*/
int lastScreen() const;
/**
* @return the viewport (e.g. virtual desktop) this Containment is associated with.
*/
int desktop() const;
/**
* @return the viewport (e.g. virtual desktop) this Containment was associated with
* last time it had a screen
* @since 4.5
*/
int lastDesktop() const;
/**
* @reimp
* @sa Applet::save(KConfigGroup &)

View File

@ -219,7 +219,6 @@ Containment *Corona::containmentForScreen(int screen, int desktop) const
{
foreach (Containment *containment, d->containments) {
if (containment->screen() == screen &&
(desktop < 0 || containment->desktop() == desktop) &&
(containment->containmentType() == Containment::DesktopContainment ||
containment->containmentType() == Containment::CustomContainment)) {
return containment;

View File

@ -232,7 +232,7 @@ void ContainmentPrivate::setScreen(int newScreen, int newDesktop, bool preventIn
<< "and is" << currently->activity()
<< (QObject*)currently << "i'm" << (QObject*)q;
#endif
currently->setScreen(-1, currently->desktop());
currently->setScreen(-1, -1);
swapScreensWith = currently;
}
}