diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index ed5e31ea2..582578c8a 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1708,18 +1708,6 @@ void QGraphicsItem::setParentItem(QGraphicsItem *newParent) d_ptr->setParentItemHelper(newParent, &newParentVariant, &thisPointerVariant); } -/*! - \obsolete - - Use childItems() instead. - - \sa setParentItem() -*/ -QList QGraphicsItem::children() const -{ - return childItems(); -} - /*! \since 4.4 @@ -1797,24 +1785,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->children()) - _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. @@ -2975,16 +2945,6 @@ bool QGraphicsItem::acceptHoverEvents() const return d_ptr->acceptsHover; } -/*! - \obsolete - - Call acceptHoverEvents() instead. -*/ -bool QGraphicsItem::acceptsHoverEvents() const -{ - return d_ptr->acceptsHover; -} - /*! \since 4.4 @@ -3027,16 +2987,6 @@ void QGraphicsItem::setAcceptHoverEvents(bool enabled) } } -/*! - \obsolete - - Use setAcceptHoverEvents(\a enabled) instead. -*/ -void QGraphicsItem::setAcceptsHoverEvents(bool enabled) -{ - setAcceptHoverEvents(enabled); -} - /*! \since 4.6 Returns true if an item accepts \l{QTouchEvent}{touch events}; @@ -5077,21 +5027,6 @@ QList QGraphicsItem::collidingItems(Qt::ItemSelectionMode mode) return QList(); } -/*! - Returns true if this item's bounding rect is completely obscured by the - opaque shape of any of colliding items above it (i.e., with a higher Z - value than this item). - - Its implementation is based on calling isObscuredBy(), which you can - reimplement to provide a custom obscurity algorithm. - - \sa opaqueArea() -*/ -bool QGraphicsItem::isObscured() const -{ - return isObscured(QRectF()); -} - /*! \internal @@ -5110,15 +5045,11 @@ static bool qt_QGraphicsItem_isObscured(const QGraphicsItem *item, } /*! - \overload \since 4.3 Returns true if \a rect is completely obscured by the opaque shape of any of colliding items above it (i.e., with a higher Z value than this item). - Unlike the default isObscured() function, this function does not call - isObscuredBy(). - \sa opaqueArea() */ bool QGraphicsItem::isObscured(const QRectF &rect) const diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h index df6f4cc32..3c3ff096f 100644 --- a/src/gui/graphicsview/qgraphicsitem.h +++ b/src/gui/graphicsview/qgraphicsitem.h @@ -179,7 +179,6 @@ public: QGraphicsWidget *window() const; QGraphicsItem *panel() const; void setParentItem(QGraphicsItem *parent); - QList children() const; // ### obsolete QList childItems() const; bool isWidget() const; bool isWindow() const; @@ -242,8 +241,6 @@ public: Qt::MouseButtons acceptedMouseButtons() const; void setAcceptedMouseButtons(Qt::MouseButtons buttons); - bool acceptsHoverEvents() const; // ### obsolete - void setAcceptsHoverEvents(bool enabled); // ### obsolete bool acceptHoverEvents() const; void setAcceptHoverEvents(bool enabled); bool acceptTouchEvents() const; @@ -336,8 +333,7 @@ public: virtual bool collidesWithItem(const QGraphicsItem *other, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; virtual bool collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; QList collidingItems(Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; - bool isObscured() const; - bool isObscured(const QRectF &rect) const; // ### Qt 5: merge with isObscured(), add QRectF arg to isObscuredBy() + bool isObscured(const QRectF &rect = QRectF()) const; inline bool isObscured(qreal x, qreal y, qreal w, qreal h) const; virtual bool isObscuredBy(const QGraphicsItem *item) const; virtual QPainterPath opaqueArea() const; diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index 48cd34108..0de8987b7 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -287,7 +287,7 @@ void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent(QGraphicsSceneMouseEvent // grabber child widget. if (embeddedMouseGrabber && type == QEvent::MouseButtonRelease && !event->buttons()) { Q_Q(QGraphicsProxyWidget); - if (q->rect().contains(event->pos()) && q->acceptsHoverEvents()) + if (q->rect().contains(event->pos()) && q->acceptHoverEvents()) lastWidgetUnderMouse = alienWidget ? alienWidget : widget; else // released on the frame our outside the item, or doesn't accept hover events. lastWidgetUnderMouse = 0; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 07e1c35fb..391bc82a1 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2501,7 +2501,7 @@ QGraphicsItemGroup *QGraphicsScene::createItemGroup(const QList */ void QGraphicsScene::destroyItemGroup(QGraphicsItemGroup *group) { - foreach (QGraphicsItem *item, group->children()) + foreach (QGraphicsItem *item, group->childItems()) group->removeFromGroup(item); removeItem(group); delete group; @@ -5710,7 +5710,7 @@ void QGraphicsScene::setActiveWindow(QGraphicsWidget *widget) QList siblingWindows; QGraphicsItem *parent = panel->parentItem(); // Raise ### inefficient for toplevels - foreach (QGraphicsItem *sibling, parent ? parent->children() : items()) { + foreach (QGraphicsItem *sibling, parent ? parent->childItems() : items()) { if (sibling != panel && sibling->isWindow()) siblingWindows << sibling; } diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 39b6234a4..576465b33 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -1454,7 +1454,7 @@ bool QGraphicsWidget::event(QEvent *event) windowFrameEvent(event); // Filter out hover events if they were sent to us only because of the // decoration (special case in QGraphicsScenePrivate::dispatchHoverEvent). - if (!acceptsHoverEvents()) + if (!acceptHoverEvents()) return true; } break; diff --git a/src/svg/CMakeLists.txt b/src/svg/CMakeLists.txt index cccaf7e25..9d29404b0 100644 --- a/src/svg/CMakeLists.txt +++ b/src/svg/CMakeLists.txt @@ -65,8 +65,7 @@ endif() katie_generate_misc("${SVG_HEADERS}" QtSvg) katie_generate_public("${SVG_PUBLIC_HEADERS}" QtSvg) katie_generate_map(QtSvg Q_SVG_EXPORT) -katie_resources("${SVG_SOURCES}") -katie_resources("${SVG_HEADERS}") +katie_resources(${SVG_SOURCES} ${SVG_HEADERS}) katie_setup_flags() add_library(KtSvg ${KATIE_TYPE} ${SVG_SOURCES} ${SVG_HEADERS})