From f31f50852b8bbfc658708be44e7d495637a63f4f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 10 Nov 2010 19:32:29 +0100 Subject: Fix compilation by s/intptr_t/quintptr/ intptr_t is defined in some C header that we don't include. I don't know which one it is, but without it, it fails to compile with: declarative/qml/qdeclarativecontext.cpp:477: error: 'intptr_t' was not declared in this scope Reviewed-By: Trust Me --- src/declarative/qml/qdeclarativecompiledbindings.cpp | 2 +- src/declarative/qml/qdeclarativecontext.cpp | 4 ++-- src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 5f0fd56..fbe5829 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -601,7 +601,7 @@ struct QDeclarativeBindingCompilerPrivate QDeclarativeImports imports; QDeclarativeEnginePrivate *engine; - QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((intptr_t)context, 16); } + QString contextName() const { return QLatin1String("$$$SCOPE_") + QString::number((quintptr)context, 16); } bool compile(QDeclarativeJS::AST::Node *); diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index 1e58a71..3ee0e6f 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -474,7 +474,7 @@ int QDeclarativeContextPrivate::context_count(QDeclarativeListProperty { QDeclarativeContext *context = static_cast(prop->object); QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context); - int contextProperty = (int)(intptr_t)prop->data; + int contextProperty = (int)(quintptr)prop->data; if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId >()) { return 0; @@ -487,7 +487,7 @@ QObject *QDeclarativeContextPrivate::context_at(QDeclarativeListProperty(prop->object); QDeclarativeContextPrivate *d = QDeclarativeContextPrivate::get(context); - int contextProperty = (int)(intptr_t)prop->data; + int contextProperty = (int)(quintptr)prop->data; if (d->propertyValues.at(contextProperty).userType() != qMetaTypeId >()) { return 0; diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index ea92111..eff59df 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -421,7 +421,7 @@ QScriptValue QDeclarativeObjectScriptClass::tostring(QScriptContext *context, QS ret += QString::fromUtf8(obj->metaObject()->className()); ret += QLatin1String("(0x"); - ret += QString::number((intptr_t)obj,16); + ret += QString::number((quintptr)obj,16); if (!objectName.isEmpty()) { ret += QLatin1String(", \""); -- cgit v0.12 From 4f8d55c493db989984ec64bd05453e14d7a0cab2 Mon Sep 17 00:00:00 2001 From: Philip Van Hoof Date: Mon, 1 Nov 2010 16:59:44 +0100 Subject: Push and pop the thread-default context for the current thread Merge-request: 869 Reviewed-by: Thiago Macieira (cherry picked from commit aa88b7044dd86850e6986aa80104bb38bb7b12eb) --- src/corelib/kernel/qeventdispatcher_glib.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 8390275..6fa2707 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -311,6 +311,10 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) } } +#if GLIB_CHECK_VERSION (2, 22, 0) + g_main_context_push_thread_default (mainContext); +#endif + // setup post event source postEventSource = reinterpret_cast(g_source_new(&postEventSourceFuncs, sizeof(GPostEventSource))); @@ -389,6 +393,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib() d->postEventSource = 0; Q_ASSERT(d->mainContext != 0); +#if GLIB_CHECK_VERSION (2, 22, 0) + g_main_context_pop_thread_default (d->mainContext); +#endif g_main_context_unref(d->mainContext); d->mainContext = 0; } -- cgit v0.12 From 18ac111fe5fafed5ac2b5db97def3be2a898df7e Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 10 Nov 2010 11:28:36 +0100 Subject: Added an example for QTest::touchEvent to the documentation. Reviewed-by: trustme --- doc/src/snippets/code/src_qtestlib_qtestcase.cpp | 16 ++++++++++++++++ src/testlib/qtestcase.cpp | 3 +++ 2 files changed, 19 insertions(+) diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp index 6ae8939..adb0c34 100644 --- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp +++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp @@ -230,5 +230,21 @@ widget.show(); QTest::qWaitForWindowShown(&widget); //! [24] +//! [25] +QWidget widget; + +QTest::touchEvent(&widget) + .press(0, QPoint(10, 10)); +QTest::touchEvent(&widget) + .stationary(0) + .press(1, QPoint(40, 10)); +QTest::touchEvent(&widget) + .move(0, QPoint(12, 12)) + .move(1, QPoint(45, 5)); +QTest::touchEvent(&widget) + .release(0) + .release(1); +//! [25] + } diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 17f1a6b..e3a8726 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -755,6 +755,9 @@ QT_BEGIN_NAMESPACE QTest::touchEvent to create a QTouchEventSequence instance. Add touch events to the sequence by calling press(), move(), release() and stationary(), and let the instance run out of scope to commit the sequence to the event system. + + Example: + \snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 25 */ /*! -- cgit v0.12 From 7298b6b708752f68d16088e35e0aa9614052957c Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 11 Nov 2010 10:42:31 +0100 Subject: SSL internals: upon error, read all errors from OpenSSL ... and not only the last one. One call to OpenSSL can produce several errors, which we should always read all. Otherwise, malicious clients could intentionally poison the error queue. Inspired-by: Merge request 2290 Reviewed-by: Olivier Goffart Reviewed-by: Markus Goetz Task-number: QTBUG-14513 --- src/network/ssl/qsslsocket_openssl.cpp | 43 ++++++++++++++++++++-------------- src/network/ssl/qsslsocket_openssl_p.h | 1 + 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 426b07a..adeb6f9 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -81,9 +81,6 @@ QT_BEGIN_NAMESPACE bool QSslSocketPrivate::s_libraryLoaded = false; bool QSslSocketPrivate::s_loadedCiphersAndCerts = false; -// Useful defines -#define SSL_ERRORSTR() QString::fromLocal8Bit(q_ERR_error_string(q_ERR_get_error(), NULL)) - /* \internal From OpenSSL's thread(3) manual page: @@ -273,7 +270,7 @@ init_context: } // ### Bad error code - q->setErrorString(QSslSocket::tr("Error creating SSL context (%1)").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error creating SSL context (%1)").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return false; @@ -298,7 +295,7 @@ init_context: if (!q_SSL_CTX_set_cipher_list(ctx, cipherString.data())) { // ### Bad error code - q->setErrorString(QSslSocket::tr("Invalid or empty cipher list (%1)").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Invalid or empty cipher list (%1)").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return false; @@ -326,14 +323,14 @@ init_context: if (!configuration.localCertificate.isNull()) { // Require a private key as well. if (configuration.privateKey.isNull()) { - q->setErrorString(QSslSocket::tr("Cannot provide a certificate with no key, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Cannot provide a certificate with no key, %1").arg(getErrorsFromOpenSsl())); emit q->error(QAbstractSocket::UnknownSocketError); return false; } // Load certificate if (!q_SSL_CTX_use_certificate(ctx, (X509 *)configuration.localCertificate.handle())) { - q->setErrorString(QSslSocket::tr("Error loading local certificate, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error loading local certificate, %1").arg(getErrorsFromOpenSsl())); emit q->error(QAbstractSocket::UnknownSocketError); return false; } @@ -348,14 +345,14 @@ init_context: else q_EVP_PKEY_set1_DSA(pkey, (DSA *)configuration.privateKey.handle()); if (!q_SSL_CTX_use_PrivateKey(ctx, pkey)) { - q->setErrorString(QSslSocket::tr("Error loading private key, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error loading private key, %1").arg(getErrorsFromOpenSsl())); emit q->error(QAbstractSocket::UnknownSocketError); return false; } // Check if the certificate matches the private key. if (!q_SSL_CTX_check_private_key(ctx)) { - q->setErrorString(QSslSocket::tr("Private key does not certify public key, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Private key does not certify public key, %1").arg(getErrorsFromOpenSsl())); emit q->error(QAbstractSocket::UnknownSocketError); return false; } @@ -375,7 +372,7 @@ init_context: // Create and initialize SSL session if (!(ssl = q_SSL_new(ctx))) { // ### Bad error code - q->setErrorString(QSslSocket::tr("Error creating SSL session, %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error creating SSL session, %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return false; @@ -390,7 +387,7 @@ init_context: writeBio = q_BIO_new(q_BIO_s_mem()); if (!readBio || !writeBio) { // ### Bad error code - q->setErrorString(QSslSocket::tr("Error creating SSL session: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error creating SSL session: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return false; @@ -911,7 +908,7 @@ void QSslSocketBackendPrivate::transmit() int writtenBytes = q_SSL_write(ssl, writeBuffer.readPointer(), nextDataBlockSize); if (writtenBytes <= 0) { // ### Better error handling. - q->setErrorString(QSslSocket::tr("Unable to write data: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Unable to write data: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return; @@ -974,7 +971,7 @@ void QSslSocketBackendPrivate::transmit() plainSocket->read(data.data(), writtenToBio); } else { // ### Better error handling. - q->setErrorString(QSslSocket::tr("Unable to decrypt data: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Unable to decrypt data: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return; @@ -1052,7 +1049,7 @@ void QSslSocketBackendPrivate::transmit() case SSL_ERROR_SSL: // error in the SSL library // we do not know exactly what the error is, nor whether we can recover from it, // so just return to prevent an endless loop in the outer "while" statement - q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); return; @@ -1062,7 +1059,7 @@ void QSslSocketBackendPrivate::transmit() // SSL_ERROR_WANT_X509_LOOKUP: can only happen with a // SSL_CTX_set_client_cert_cb(), which we do not call. // So this default case should never be triggered. - q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::UnknownSocketError); emit q->error(QAbstractSocket::UnknownSocketError); break; @@ -1157,8 +1154,7 @@ bool QSslSocketBackendPrivate::startHandshake() // The handshake is not yet complete. break; default: - // ### Handle errors better - q->setErrorString(QSslSocket::tr("Error during SSL handshake: %1").arg(SSL_ERRORSTR())); + q->setErrorString(QSslSocket::tr("Error during SSL handshake: %1").arg(getErrorsFromOpenSsl())); q->setSocketError(QAbstractSocket::SslHandshakeFailedError); #ifdef QSSLSOCKET_DEBUG qDebug() << "QSslSocketBackendPrivate::startHandshake: error!" << q->errorString(); @@ -1334,6 +1330,19 @@ QList QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates return certificates; } +QString QSslSocketBackendPrivate::getErrorsFromOpenSsl() +{ + QString errorString; + unsigned long errNum; + while((errNum = q_ERR_get_error())) { + if (! errorString.isEmpty()) + errorString.append(QLatin1String(", ")); + const char *error = q_ERR_error_string(errNum, NULL); + errorString.append(QString::fromAscii(error)); // error is ascii according to man ERR_error_string + } + return errorString; +} + bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QString &hostname) { int wildcard = cn.indexOf(QLatin1Char('*')); diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h index b59a6c9..878c654 100644 --- a/src/network/ssl/qsslsocket_openssl_p.h +++ b/src/network/ssl/qsslsocket_openssl_p.h @@ -117,6 +117,7 @@ public: static QSslCipher QSslCipher_from_SSL_CIPHER(SSL_CIPHER *cipher); static QList STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509); Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname); + static QString getErrorsFromOpenSsl(); }; #if defined(Q_OS_SYMBIAN) -- cgit v0.12 From 852fd6b9c05fd082a6a357faae18e63c2687058b Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 11 Nov 2010 18:30:40 +0100 Subject: Add FreeBSD's certificate bundle to the certificates list. The FreeBSD base system does not ship a certificate bundle, but the ca_root_nss port provides one extracted from Mozilla's root CA list. As discussed in QTBUG-14013, it should be preferrable to have bundle files than separate certificate files, so the path for the certificate has been added directly. Signed-off-by: Raphael Kubo da Costa Merge-request: 896 Reviewed-by: Thiago Macieira --- src/network/ssl/qsslsocket_openssl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index adeb6f9..70ef7ba 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -832,6 +832,7 @@ QList QSslSocketPrivate::systemCaCertificates() systemCerts.append(QSslCertificate::fromPath(it.next())); } systemCerts.append(QSslCertificate::fromPath(QLatin1String("/etc/pki/tls/certs/ca-bundle.crt"), QSsl::Pem)); // Fedora, Mandriva + systemCerts.append(QSslCertificate::fromPath(QLatin1String("/usr/local/share/certs/ca-root-nss.crt"), QSsl::Pem)); // FreeBSD's ca_root_nss #elif defined(Q_OS_SYMBIAN) QList certs; -- cgit v0.12 From ba086383365c16f68c7032fca7631570f61de648 Mon Sep 17 00:00:00 2001 From: Sam Magnuson Date: Mon, 8 Nov 2010 13:21:05 -0800 Subject: Implement brush transformations for directfb. Merge-request: 915 Reviewed-by: Donald Carr (cherry picked from commit b62079cf17044e09999eb1808788926ea921fb05) --- .../gfxdrivers/directfb/qdirectfbpaintengine.cpp | 42 ++++++++++++++-------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index c16a242..85ff925 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -68,6 +68,14 @@ public: Matrix_BlitsUnsupported = (Matrix_NegativeScale|Matrix_RectsUnsupported) }; + inline static uint getTransformationType(const QTransform &transform) { + int ret = transform.type(); + if (qMin(transform.m11(), transform.m22()) < 0) { + ret |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale; + } + return ret; + } + enum CompositionModeStatus { PorterDuff_None = 0x0, PorterDuff_Supported = 0x1, @@ -99,7 +107,7 @@ public: inline bool isSimpleBrush(const QBrush &brush) const; - void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos); + void drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &pos, const QTransform &pixmapTransform); void blit(const QRectF &dest, IDirectFBSurface *surface, const QRectF &src); inline bool supportsStretchBlit() const; @@ -707,7 +715,8 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap pix(data); QRasterPaintEngine::drawTiledPixmap(r, pix, offset); } else { - CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset)); + QTransform transform(state()->matrix); + CLIPPED_PAINT(d->drawTiledPixmap(r, pixmap, offset, transform)); } } @@ -827,9 +836,14 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) return; } case Qt::TexturePattern: { + const QPointF &brushOrigin = state()->brushOrigin; + const QTransform stateTransform = state()->matrix; + QTransform transform(stateTransform); + transform.translate(brushOrigin.x(), brushOrigin.y()); + transform = brush.transform() * transform; if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported) - || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) - || (!d->supportsStretchBlit() && state()->matrix.isScaling())) { + || (QDirectFBPaintEnginePrivate::getTransformationType(transform) & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) + || (!d->supportsStretchBlit() && transform.isScaling())) { break; } @@ -837,7 +851,7 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) if (texture.pixmapData()->classId() != QPixmapData::DirectFBClass) break; - CLIPPED_PAINT(d->drawTiledPixmap(rect, texture, rect.topLeft() - state()->brushOrigin)); + CLIPPED_PAINT(d->drawTiledPixmap(stateTransform.mapRect(rect), texture, rect.topLeft() - brushOrigin, transform)); return; } default: break; @@ -948,10 +962,7 @@ void QDirectFBPaintEnginePrivate::unlock(QDirectFBPaintDevice *device) void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform) { - transformationType = transform.type(); - if (qMin(transform.m11(), transform.m22()) < 0) { - transformationType |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale; - } + transformationType = getTransformationType(transform); setPen(q->state()->pen); } @@ -1153,10 +1164,12 @@ static inline qreal fixCoord(qreal rect_pos, qreal pixmapSize, qreal offset) return pos; } -void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, const QPointF &off) +void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPixmap &pixmap, + const QPointF &off, const QTransform &pixmapTransform) { - Q_ASSERT(!(transformationType & Matrix_BlitsUnsupported)); const QTransform &transform = q->state()->matrix; + Q_ASSERT(!(getTransformationType(transform) & Matrix_BlitsUnsupported) && + !(getTransformationType(pixmapTransform) & Matrix_BlitsUnsupported)); const QRect destinationRect = transform.mapRect(dest).toRect().normalized(); QRect newClip = destinationRect; if (!currentClip.isEmpty()) @@ -1173,7 +1186,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix }; surface->SetClip(surface, &clip); - QPointF offset = off; + QPointF offset = pixmapTransform.inverted().map(off); Q_ASSERT(transform.type() <= QTransform::TxScale); QPixmapData *data = pixmap.pixmapData(); Q_ASSERT(data->classId() == QPixmapData::DirectFBClass); @@ -1187,13 +1200,14 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix prepareForBlit(blitFlags); QDirectFBPaintEnginePrivate::unlock(dfbData); const QSize pixmapSize = dfbData->size(); - if (transform.isScaling()) { + IDirectFBSurface *sourceSurface = dfbData->directFBSurface(); + if (transform.isScaling() || pixmapTransform.isScaling()) { Q_ASSERT(supportsStretchBlit()); Q_ASSERT(qMin(transform.m11(), transform.m22()) >= 0); offset.rx() *= transform.m11(); offset.ry() *= transform.m22(); - const QSizeF mappedSize(pixmapSize.width() * transform.m11(), pixmapSize.height() * transform.m22()); + const QSizeF mappedSize(pixmapSize.width() * pixmapTransform.m11(), pixmapSize.height() * pixmapTransform.m22()); qreal y = fixCoord(destinationRect.y(), mappedSize.height(), offset.y()); const qreal startX = fixCoord(destinationRect.x(), mappedSize.width(), offset.x()); while (y <= destinationRect.bottom()) { -- cgit v0.12 From 4034f4e99f4821947c8b4fd5e1470964ff9da740 Mon Sep 17 00:00:00 2001 From: Donald Carr Date: Thu, 11 Nov 2010 17:33:36 +0000 Subject: Minor adjustments to merge-request 915 Fix minor stylistic issue raised by Oswald Removed duplicate sourceSurface pointer introduced by sibling merge request --- src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 85ff925..ceed7ae 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -68,7 +68,8 @@ public: Matrix_BlitsUnsupported = (Matrix_NegativeScale|Matrix_RectsUnsupported) }; - inline static uint getTransformationType(const QTransform &transform) { + inline static uint getTransformationType(const QTransform &transform) + { int ret = transform.type(); if (qMin(transform.m11(), transform.m22()) < 0) { ret |= QDirectFBPaintEnginePrivate::Matrix_NegativeScale; @@ -1200,7 +1201,6 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix prepareForBlit(blitFlags); QDirectFBPaintEnginePrivate::unlock(dfbData); const QSize pixmapSize = dfbData->size(); - IDirectFBSurface *sourceSurface = dfbData->directFBSurface(); if (transform.isScaling() || pixmapTransform.isScaling()) { Q_ASSERT(supportsStretchBlit()); Q_ASSERT(qMin(transform.m11(), transform.m22()) >= 0); -- cgit v0.12 From 41cc62e076c9fc01d9cd2c66325a785d1643f6b6 Mon Sep 17 00:00:00 2001 From: Ville Pernu Date: Fri, 12 Nov 2010 14:08:54 +0200 Subject: Fix for KERN-EXEC 0 caused by QNetworkAccessManager::get QT-4155 bug. Canceling Network Session before canceling connection notifier notifications causes a call to an invalid RConnection instance. Fix: CanceL Network session after canceling notifications. --- src/plugins/bearer/symbian/qnetworksession_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index c5a39e1..53a5b4d 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1151,10 +1151,10 @@ void QNetworkSessionPrivateImpl::RunL() serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::InvalidConfigurationError; QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; case KErrCancel: // Connection attempt cancelled @@ -1173,10 +1173,10 @@ void QNetworkSessionPrivateImpl::RunL() iError = QNetworkSession::UnknownSessionError; } QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; } @@ -1268,10 +1268,10 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::SessionAbortedError; emit QNetworkSessionPrivate::error(iError); - Cancel(); if (ipConnectionNotifier) { ipConnectionNotifier->StopNotifications(); } + Cancel(); // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate iHandleStateNotificationsFromManager = true; emitSessionClosed = true; // Emit SessionClosed after state change has been reported -- cgit v0.12 From 8593133729ca2a92cd5dcc87c5e56031708949bf Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 12 Nov 2010 13:16:03 +0100 Subject: qmake vcxproj generator: fix description of custom build tools The description of custom build tools that handle more than one extra compiler cannot be separated by ampersands in Visual Studio 2010. This seems to be a msbuild bug. We'll just circumvent this issue by changing the separator in the description to comma. Task-number: QTBUG-13986 Reviewed-by: ossi --- qmake/generators/win32/msbuild_objectmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index c963f46..c3436b4 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -2507,7 +2507,7 @@ bool VCXFilter::addExtraCompiler(const VCXFilterFile &info) // Output in info.additionalFile ----------- if (!CustomBuildTool.Description.isEmpty()) - CustomBuildTool.Description += " & "; + CustomBuildTool.Description += ", "; CustomBuildTool.Description += cmd_name; CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed()); int space = cmd.indexOf(' '); -- cgit v0.12 From 69d9e773c246b39561fb86861491aad6d9d34060 Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Wed, 10 Nov 2010 12:38:22 +0200 Subject: Remove -fno-omit-frame-pointer and -fno-optimize-sibling-calls in mkspecs, add -Wno-psabi Reviewed-by: Adrian Constantin --- mkspecs/linux-g++-maemo/qmake.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf index a977e7a..f023634 100644 --- a/mkspecs/linux-g++-maemo/qmake.conf +++ b/mkspecs/linux-g++-maemo/qmake.conf @@ -21,8 +21,8 @@ QMAKE_LIBDIR_X11 = /usr/lib QMAKE_LIBDIR_OPENGL = /usr/lib # We still need to generate debug symbols in release mode to put into the *-dbg packages: -QMAKE_CFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -QMAKE_CXXFLAGS_RELEASE += -g -fno-omit-frame-pointer -fno-optimize-sibling-calls +QMAKE_CFLAGS_RELEASE += -g -Wno-psabi +QMAKE_CXXFLAGS_RELEASE += -g -Wno-psabi # Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs: DEFINES += QT_GL_NO_SCISSOR_TEST -- cgit v0.12 From 96f8a8f87c28df9c753d9f3494d806a6dea24ba7 Mon Sep 17 00:00:00 2001 From: Adrian Constantin Date: Mon, 15 Nov 2010 11:13:22 +0200 Subject: Enable OpenGL scissors test Reviewed-by: Petri Latvala --- mkspecs/linux-g++-maemo/qmake.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/mkspecs/linux-g++-maemo/qmake.conf b/mkspecs/linux-g++-maemo/qmake.conf index f023634..0178f14 100644 --- a/mkspecs/linux-g++-maemo/qmake.conf +++ b/mkspecs/linux-g++-maemo/qmake.conf @@ -24,7 +24,4 @@ QMAKE_LIBDIR_OPENGL = /usr/lib QMAKE_CFLAGS_RELEASE += -g -Wno-psabi QMAKE_CXXFLAGS_RELEASE += -g -Wno-psabi -# Work round PowerVR SGX 1.3 driver bug with glScissor & FBOs: -DEFINES += QT_GL_NO_SCISSOR_TEST - load(qt_config) -- cgit v0.12 From 22c71ed42529277caa4dc8db03efd975b3910546 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 15 Nov 2010 12:59:41 +0100 Subject: compile with quintptr instead of intptr_t --- .../declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 3dd69da..652404c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1566,7 +1566,7 @@ void tst_qdeclarativeecmascript::callQtInvokables() o.reset(); { - QString expected = "MyInvokableObject(0x" + QString::number((intptr_t)&o, 16) + ")"; + QString expected = "MyInvokableObject(0x" + QString::number((quintptr)&o, 16) + ")"; QCOMPARE(engine->evaluate("object.method_QString(object)").isUndefined(), true); QCOMPARE(o.error(), false); QCOMPARE(o.invoked(), 11); -- cgit v0.12