Remove unused function _q_qgraphicsItemSetFlag
Clang reports:
graphicsview/qgraphicsitem.cpp:1779:13: error: function '_q_qgraphicsItemSetFlag' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
static void _q_qgraphicsItemSetFlag(QGraphicsItem *item, QGraphicsItem::GraphicsItemFlag flag,
^
According to the public Git history, in Qt 4.5.1 this function was
already unused. The only reason it wasn't caught so far is that it is
recursive: it calls itself. So it is used... by itself.
Change-Id: I6fc6b33cb314b845525dc9315d0ad742e113d5cd
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
parent
fbfe420aeb
commit
8094c8fe18
|
|
@ -1771,24 +1771,6 @@ void QGraphicsItem::setFlag(GraphicsItemFlag flag, bool enabled)
|
|||
setFlags(GraphicsItemFlags(d_ptr->flags) & ~flag);
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
Sets the flag \a flag on \a item and all its children, to \a enabled.
|
||||
*/
|
||||
static void _q_qgraphicsItemSetFlag(QGraphicsItem *item, QGraphicsItem::GraphicsItemFlag flag,
|
||||
bool enabled)
|
||||
{
|
||||
if (item->flags() & flag) {
|
||||
// If this item already has the correct flag set, we don't have to
|
||||
// propagate it.
|
||||
return;
|
||||
}
|
||||
item->setFlag(flag, enabled);
|
||||
foreach (QGraphicsItem *child, item->childItems())
|
||||
_q_qgraphicsItemSetFlag(child, flag, enabled);
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the item flags to \a flags. All flags in \a flags are enabled; all
|
||||
flags not in \a flags are disabled.
|
||||
|
|
|
|||
Loading…
Reference in New Issue