minor cleanups and better use of convenience api's

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738770
This commit is contained in:
Aaron J. Seigo 2007-11-19 16:37:46 +00:00
parent fb73ea9e37
commit 364b0dca90
3 changed files with 5 additions and 3 deletions

View File

@ -1036,7 +1036,7 @@ QStringList Applet::knownCategories(const QString &parentApp, bool visibleOnly)
QStringList categories;
foreach (const KService::Ptr applet, offers) {
QString appletCategory = applet->property("X-KDE-PluginInfo-Category").toString();
if (visibleOnly && applet->property("NoDisplay").toBool()) {
if (visibleOnly && applet->noDisplay()) {
// we don't want to show the hidden category
continue;
}

View File

@ -427,7 +427,7 @@ bool DataEngine::isValid() const
bool DataEngine::isEmpty() const
{
return d->sources.count() < 1;
return d->sources.isEmpty();
}
void DataEngine::setValid(bool valid)

View File

@ -119,14 +119,15 @@ void LayoutAnimator::setAutoDeleteOnRemoval(bool autoDelete)
SLOT(itemAutoDeleter(LayoutItem*,State,State)) );
}
}
bool LayoutAnimator::autoDeleteOnRemoval() const
{
return d->autoDeleteOnRemoval;
}
void LayoutAnimator::itemAutoDeleter(LayoutItem *item , State oldState , State newState)
{
if ( oldState == RemovedState && newState == DeadState ) {
if ( item->graphicsItem() ) {
item->graphicsItem()->scene()->removeItem( item->graphicsItem() );
@ -137,6 +138,7 @@ void LayoutAnimator::itemAutoDeleter(LayoutItem *item , State oldState , State n
delete item;
}
}
void LayoutAnimator::setEffect( State action , int effect )
{
d->effects[action] = effect;