use isEmpty() instead
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=791612
This commit is contained in:
parent
18fdd9515c
commit
f9d6be9626
@ -343,14 +343,14 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QList<QAction*> containmentActions = contextActions();
|
QList<QAction*> containmentActions = contextActions();
|
||||||
if (containmentActions.count() > 0) {
|
if (!containmentActions.isEmpty()) {
|
||||||
if (hasEntries) {
|
if (hasEntries) {
|
||||||
desktopMenu.addSeparator();
|
desktopMenu.addSeparator();
|
||||||
}
|
}
|
||||||
hasEntries = true;
|
hasEntries = true;
|
||||||
QMenu *containmentActionMenu = &desktopMenu;
|
QMenu *containmentActionMenu = &desktopMenu;
|
||||||
|
|
||||||
if (actions.count() > 0 && containmentActions.count() > 2) {
|
if (!actions.isEmpty() && containmentActions.count() > 2) {
|
||||||
containmentActionMenu = new KMenu(i18n("%1 Options", name()), &desktopMenu);
|
containmentActionMenu = new KMenu(i18n("%1 Options", name()), &desktopMenu);
|
||||||
desktopMenu.addMenu(containmentActionMenu);
|
desktopMenu.addMenu(containmentActionMenu);
|
||||||
}
|
}
|
||||||
@ -1135,7 +1135,7 @@ void Containment::dropEvent(QGraphicsSceneDragDropEvent *event)
|
|||||||
addApplet("icon", args, 0, geom);
|
addApplet("icon", args, 0, geom);
|
||||||
} else {
|
} else {
|
||||||
//TODO: should we show a dialog here to choose which plasmoid load if
|
//TODO: should we show a dialog here to choose which plasmoid load if
|
||||||
//appletList.count() > 0?
|
//!appletList.isEmpty()
|
||||||
addApplet(appletList.first().pluginName(), args, 0, geom);
|
addApplet(appletList.first().pluginName(), args, 0, geom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user