minor cleanups and better use of convenience api's
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=738770
This commit is contained in:
parent
fb73ea9e37
commit
364b0dca90
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user