diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/egl/qegl.cpp | 2 | ||||
-rw-r--r-- | src/gui/egl/qegl_p.h | 4 | ||||
-rw-r--r-- | src/gui/egl/qeglproperties.cpp | 14 | ||||
-rw-r--r-- | src/gui/egl/qeglproperties_p.h | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout.cpp | 15 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 8 |
7 files changed, 36 insertions, 11 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 9d0ead197d..f0df0c984b 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -402,7 +402,7 @@ void QEglContext::dumpAllConfigs() QString QEglContext::extensions() { - const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); + const char* exts = eglQueryString(QEglContext::defaultDisplay(0), EGL_EXTENSIONS); return QString(QLatin1String(exts)); } diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index bba5e59c51..97730d8263 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -122,8 +122,8 @@ public: void dumpAllConfigs(); - QString extensions(); - bool hasExtension(const char* extensionName); + static QString extensions(); + static bool hasExtension(const char* extensionName); private: QEgl::API apiType; diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 22b55feebc..7b582c43a3 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -257,6 +257,20 @@ static void addTag(QString& str, const QString& tag) str += tag; } +void QEglProperties::dumpAllConfigs() +{ + EGLint count = 0; + eglGetConfigs(QEglContext::defaultDisplay(0), 0, 0, &count); + if (count < 1) + return; + + EGLConfig *configs = new EGLConfig [count]; + eglGetConfigs(QEglContext::defaultDisplay(0), configs, count, &count); + for (EGLint index = 0; index < count; ++index) + qWarning() << QEglProperties(configs[index]).toString(); + delete [] configs; +} + // Convert a property list to a string suitable for debug output. QString QEglProperties::toString() const { diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index 4ef381496c..383a873008 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -130,6 +130,8 @@ public: QString toString() const; + static void dumpAllConfigs(); + private: QVarLengthArray<int> props; }; diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index fed0e5aed8..3c2ea37ec4 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -130,7 +130,8 @@ QGraphicsAnchorLayout::~QGraphicsAnchorLayout() * * The spacing can also be set manually by using setAnchorSpacing() method. * - * \sa removeAnchor, addCornerAnchors, addLeftAndRightAnchors, addTopAndBottomAnchors, addAllAnchors + * \sa removeAnchor(), addCornerAnchors(), addLeftAndRightAnchors(), addTopAndBottomAnchors(), + * addAllAnchors() */ void QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) @@ -251,7 +252,7 @@ qreal QGraphicsAnchorLayout::anchorSpacing(const QGraphicsLayoutItem *firstItem, \a secondItem and \a secondEdge to be the default spacing. Depending on the anchor type, the default spacing is either 0 or a value returned from the style. - \sa setAnchorSpacing, anchorSpacing, addAnchor + \sa setAnchorSpacing(), anchorSpacing(), addAnchor() */ void QGraphicsAnchorLayout::unsetAnchorSpacing(const QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, const QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) @@ -297,7 +298,7 @@ void QGraphicsAnchorLayout::removeAnchor(QGraphicsLayoutItem *firstItem, Qt::Anc /*! Sets the default horizontal spacing for the anchor layout to \a spacing. - \sa horizontalSpacing, setVerticalSpacing, setSpacing + \sa horizontalSpacing(), setVerticalSpacing(), setSpacing() */ void QGraphicsAnchorLayout::setHorizontalSpacing(qreal spacing) { @@ -309,7 +310,7 @@ void QGraphicsAnchorLayout::setHorizontalSpacing(qreal spacing) /*! Sets the default vertical spacing for the anchor layout to \a spacing. - \sa verticalSpacing, setHorizontalSpacing, setSpacing + \sa verticalSpacing(), setHorizontalSpacing(), setSpacing() */ void QGraphicsAnchorLayout::setVerticalSpacing(qreal spacing) { @@ -323,7 +324,7 @@ void QGraphicsAnchorLayout::setVerticalSpacing(qreal spacing) If an item is anchored with no spacing associated with the anchor, it will use the default spacing. - \sa setHorizontalSpacing, setVerticalSpacing + \sa setHorizontalSpacing(), setVerticalSpacing() */ void QGraphicsAnchorLayout::setSpacing(qreal spacing) { @@ -335,7 +336,7 @@ void QGraphicsAnchorLayout::setSpacing(qreal spacing) /*! Returns the default horizontal spacing for the anchor layout. - \sa verticalSpacing, setHorizontalSpacing + \sa verticalSpacing(), setHorizontalSpacing() */ qreal QGraphicsAnchorLayout::horizontalSpacing() const { @@ -346,7 +347,7 @@ qreal QGraphicsAnchorLayout::horizontalSpacing() const /*! Returns the default vertical spacing for the anchor layout. - \sa horizontalSpacing, setVerticalSpacing + \sa horizontalSpacing(), setVerticalSpacing() */ qreal QGraphicsAnchorLayout::verticalSpacing() const { diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index c137de3df6..9a34ad5a26 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1652,7 +1652,7 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin } /*! - \Internal + \internal */ QList< QList<QSimplexConstraint *> > QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 0bca8f7b67..e1a6e80f60 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2563,6 +2563,8 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op) QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint); d->state->clipEnabled = true; d->extended->clip(vp, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2609,6 +2611,8 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(rect, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2662,6 +2666,8 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(r, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(r, op, d->state->matrix); d->state->clipOperation = op; return; @@ -3066,6 +3072,8 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(path, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(path, op, d->state->matrix); d->state->clipOperation = op; return; |