merge setGroup methods

This commit is contained in:
Aaron Seigo 2011-05-06 11:54:45 +02:00
parent b55e308e7d
commit 31c2b3fd86
3 changed files with 1 additions and 18 deletions

View File

@ -379,7 +379,6 @@ int ExtenderGroupPrivate::insertIndexFromPos(const QPointF &pos) const
{
int insertIndex = -1;
//XXX: duplicated from panel
if (pos != QPointF(-1, -1)) {
for (int i = 0; i < layout->count(); ++i) {
QRectF siblingGeometry = layout->itemAt(i)->geometry();

View File

@ -433,12 +433,6 @@ Extender *ExtenderItem::extender() const
return d->extender;
}
//TODO KDE5: only one setGroup()
void ExtenderItem::setGroup(ExtenderGroup *group)
{
setGroup(group, QPointF(-1, -1));
}
void ExtenderItem::setGroup(ExtenderGroup *group, const QPointF &pos)
{
if (isGroup()) {

View File

@ -176,19 +176,9 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget
/**
* @param group the group you want this item to belong to. Note that you can't nest
* ExtenderGroups.
* @since 4.3
*/
void setGroup(ExtenderGroup *group);
/**
* @param group the group you want this item to belong to. Note that you can't nest
* ExtenderGroups.
*
* @param group the new group
* @param pos position inside the extender group
* @since 4.5
*/
void setGroup(ExtenderGroup *group, const QPointF &pos);
void setGroup(ExtenderGroup *group, const QPointF &pos = QPointF(-1, -1));
/**
* @returns the group this item belongs to.