diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-16 23:00:21 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-16 23:00:21 (GMT) |
commit | 432cd48a777fddc04f4c323df5876bcc6c0c2829 (patch) | |
tree | 75f9580022edbe6715e8203aecb8907611d6ebbd /src | |
parent | c70b1afe694b0d32ece6b639b1e4d10501df8bb0 (diff) | |
parent | 640aad736476f7f8a4ec92fedecae234fb2e2d2e (diff) | |
download | Qt-432cd48a777fddc04f4c323df5876bcc6c0c2829.zip Qt-432cd48a777fddc04f4c323df5876bcc6c0c2829.tar.gz Qt-432cd48a777fddc04f4c323df5876bcc6c0c2829.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-water
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_unix.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeenginedebug.cpp | 5 | ||||
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 33 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster_p.h | 2 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine_unix.cpp | 13 |
7 files changed, 36 insertions, 26 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index f50994c..b2ccc68 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -501,6 +501,7 @@ bool QTimerInfoList::unregisterTimer(int timerId) } } // id not found + qWarning("Application asked to unregister timer 0x%x which is not registered in this thread. Fix application.", timerId); return false; } diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index bffe681..e54f7d6 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -146,7 +146,10 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) if (binding) rv.binding = binding->expression(); - QVariant value = prop.read(obj); + QVariant value; + if (prop.userType() != 0) { + value = prop.read(obj); + } rv.value = valueContents(value); if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index acc8deb..177b088 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -595,6 +595,8 @@ QAbstractItemView::QAbstractItemView(QAbstractItemViewPrivate &dd, QWidget *pare */ QAbstractItemView::~QAbstractItemView() { + // stop this timer here before ~QObject + d_func()->delayedReset.stop(); } /*! diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6db1fa8..181fcc7 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1174,8 +1174,10 @@ void QSymbianControl::SizeChanged() if (!slowResize && tlwExtra) tlwExtra->inTopLevelResize = false; } else { - QResizeEvent *e = new QResizeEvent(newSize, oldSize); - QApplication::postEvent(qwidget, e); + if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) { + QResizeEvent *e = new QResizeEvent(newSize, oldSize); + QApplication::postEvent(qwidget, e); + } } } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 89202ac..4d06c9f 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1212,7 +1212,7 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // There are some cases that are not supported by clip(QRect) if (op != Qt::UniteClip && (op != Qt::IntersectClip || !s->clip || s->clip->hasRectClip || s->clip->hasRegionClip)) { - if (s->matrix.type() <= QTransform::TxTranslate + if (s->matrix.type() <= QTransform::TxScale && ((path.shape() == QVectorPath::RectangleHint) || (isRect(points, path.elementCount()) && (!types || (types[0] == QPainterPath::MoveToElement @@ -1224,8 +1224,8 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) #endif QRectF r(points[0], points[1], points[4]-points[0], points[5]-points[1]); - clip(r.toRect(), op); - return; + if (setClipRectInDeviceCoords(s->matrix.mapRect(r).toRect(), op)) + return; } } @@ -1286,7 +1286,6 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) qDebug() << "QRasterPaintEngine::clip(): " << rect << op; #endif - Q_D(QRasterPaintEngine); QRasterPaintEngineState *s = state(); if (op == Qt::NoClip) { @@ -1296,11 +1295,23 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) QPaintEngineEx::clip(rect, op); return; - } else if (op == Qt::ReplaceClip || s->clip == 0) { + } else if (!setClipRectInDeviceCoords(s->matrix.mapRect(rect), op)) { + QPaintEngineEx::clip(rect, op); + return; + } +} + + +bool QRasterPaintEngine::setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op) +{ + Q_D(QRasterPaintEngine); + QRect clipRect = r & d->deviceRect; + QRasterPaintEngineState *s = state(); + + if (op == Qt::ReplaceClip || s->clip == 0) { // No current clip, hence we intersect with sysclip and be // done with it... - QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect; QRegion clipRegion = systemClip(); QClipData *clip = new QClipData(d->rasterBuffer->height()); @@ -1316,12 +1327,11 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) s->clip->enabled = true; s->flags.has_clip_ownership = true; - } else { // intersect clip with current clip + } else if (op == Qt::IntersectClip){ // intersect clip with current clip QClipData *base = s->clip; Q_ASSERT(base); if (base->hasRectClip || base->hasRegionClip) { - QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect; if (!s->flags.has_clip_ownership) { s->clip = new QClipData(d->rasterBuffer->height()); s->flags.has_clip_ownership = true; @@ -1332,11 +1342,14 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) s->clip->setClipRegion(base->clipRegion & clipRect); s->clip->enabled = true; } else { - QPaintEngineEx::clip(rect, op); - return; + return false; } + } else { + return false; } + qrasterpaintengine_dirty_clip(d, s); + return true; } diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 1016f8d..7d4d3b6 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -266,6 +266,8 @@ private: void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti); #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE + bool setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op); + inline void ensureBrush(const QBrush &brush) { if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) updateBrush(brush); diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index f6bfbac..021acd0 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -202,9 +202,6 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc return false; } - // Ensure that the socket is closed on exec*(). - ::fcntl(socket, F_SETFD, FD_CLOEXEC); - socketDescriptor = socket; return true; } @@ -565,16 +562,6 @@ int QNativeSocketEnginePrivate::nativeAccept() #else int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0); #endif - //check if we have valid descriptor at all - if(acceptedDescriptor > 0) { - // Ensure that the socket is closed on exec*() - ::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC); - } -#ifdef Q_OS_SYMBIAN - else { - qWarning("QNativeSocketEnginePrivate::nativeAccept() - acceptedDescriptor <= 0"); - } -#endif return acceptedDescriptor; } |