diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-29 12:56:06 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-07-29 12:56:06 +0200 |
commit | ea9003268556154fdc305aa745890fdea92ac46b (patch) | |
tree | a3ed6fc20fe4be0d7d07f752942cd5b7e2e3c7de /src | |
parent | c67f7c0f0fc34887a4922a269815c460cbe3ccf8 (diff) | |
parent | 7e74f8f398deb8ed84f6c4613de6dab2066dc9de (diff) |
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
src/network/ssl/qsslsocket_openssl_symbols.cpp
Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 10 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 | ||||
-rw-r--r-- | src/gui/image/qpixmap_raster.cpp | 1 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 19 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl_p.h | 4 | ||||
-rw-r--r-- | src/network/socket/qhttpsocketengine.cpp | 3 | ||||
-rw-r--r-- | src/network/ssl/qsslcontext.cpp | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 4 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols_p.h | 2 | ||||
-rw-r--r-- | src/printsupport/dialogs/qpagesetupdialog_win.cpp | 5 | ||||
-rw-r--r-- | src/sql/doc/src/sql-driver.qdoc | 5 | ||||
-rw-r--r-- | src/tools/bootstrap-dbus/bootstrap-dbus.pro | 2 | ||||
-rw-r--r-- | src/tools/qdbuscpp2xml/qdbuscpp2xml.pro | 2 | ||||
-rw-r--r-- | src/tools/qdbusxml2cpp/qdbusxml2cpp.pro | 2 |
14 files changed, 47 insertions, 16 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index e5c708e29a..be569bcffe 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -500,7 +500,7 @@ the underlines. \value TextDontPrint Treat this text as "hidden" and don't print it. \value TextIncludeTrailingSpaces When this option is set, - QTextLine::naturalTextWidth() and naturalTextRect() will + QTextLine::naturalTextWidth() and QTextLine::naturalTextRect() will return a value that includes the width of trailing spaces in the text; otherwise this width is excluded. \value TextJustificationForced Ensures that text lines are justified. @@ -1892,7 +1892,7 @@ menu, and in contrast to \c NoContextMenu, the handling is \e not deferred to the widget's parent. This means that all right mouse button events are guaranteed to be delivered to the widget itself - through mousePressEvent(), and mouseReleaseEvent(). + through QWidget::mousePressEvent(), and QWidget::mouseReleaseEvent(). \value DefaultContextMenu the widget's QWidget::contextMenuEvent() handler is called. \value ActionsContextMenu the widget displays its QWidget::actions() as context menu. \value CustomContextMenu the widget emits the QWidget::customContextMenuRequested() signal. @@ -2248,9 +2248,9 @@ \enum Qt::TextFormat This enum is used in widgets that can display both plain text and - rich text, e.g. QLabel. It is used for deciding whether a text + rich text, for example QLabel. It is used for deciding whether a text string should be interpreted as one or the other. This is normally - done by passing one of the enum values to a setTextFormat() + done by passing one of the enum values to a QTextEdit::setTextFormat() function. \value PlainText The text string is interpreted as a plain text @@ -2450,7 +2450,7 @@ \value ImSurroundingText The plain text around the input area, for example the current paragraph. \value ImCurrentSelection The currently selected text. \value ImMaximumTextLength The maximum number of characters that the widget can hold. If there is no limit, - QVariant() is returned. + QVariant::QVariant() is returned. \value ImAnchorPosition The position of the selection anchor. This may be less or greater than \c ImCursorPosition, depending on which side of selection the cursor is. If there is no selection, it returns the same as \c ImCursorPosition. diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index b8aa98b160..e8eb04b598 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -9557,7 +9557,7 @@ QByteArray QStringRef::toUtf8() const if (isNull()) return QByteArray(); - return QUtf8::convertFromUnicode(constData(), length(), 0); + return QUtf8::convertFromUnicode(constData(), length()); } /*! diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp index d879a5cb61..639650dd89 100644 --- a/src/gui/image/qpixmap_raster.cpp +++ b/src/gui/image/qpixmap_raster.cpp @@ -343,6 +343,7 @@ void QRasterPlatformPixmap::createPixmapForImage(QImage &sourceImage, Qt::ImageC if (format == QImage::Format_RGB32 && (sourceImage.format() == QImage::Format_ARGB32 || sourceImage.format() == QImage::Format_ARGB32_Premultiplied)) { + inPlace = inPlace && sourceImage.isDetached(); image = sourceImage; if (!inPlace) image.detach(); diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 3ac8b8f56f..c5cf849a55 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -867,6 +867,11 @@ void QNetworkReplyHttpImplPrivate::postRequest() forwardUploadDevice->setParent(delegate); // needed to make sure it is moved on moveToThread() delegate->httpRequest.setUploadByteDevice(forwardUploadDevice); + // If the device in the user thread claims it has more data, keep the flow to HTTP thread going + QObject::connect(uploadByteDevice.data(), SIGNAL(readyRead()), + q, SLOT(uploadByteDeviceReadyReadSlot()), + Qt::QueuedConnection); + // From main thread to user thread: QObject::connect(q, SIGNAL(haveUploadData(QByteArray,bool,qint64)), forwardUploadDevice, SLOT(haveDataSlot(QByteArray,bool,qint64)), Qt::QueuedConnection); @@ -1288,6 +1293,13 @@ void QNetworkReplyHttpImplPrivate::wantUploadDataSlot(qint64 maxSize) // call readPointer qint64 currentUploadDataLength = 0; char *data = const_cast<char*>(uploadByteDevice->readPointer(maxSize, currentUploadDataLength)); + + if (currentUploadDataLength == 0) { + // No bytes from upload byte device. There will be bytes later, it will emit readyRead() + // and our uploadByteDeviceReadyReadSlot() is called. + return; + } + // Let's make a copy of this data QByteArray dataArray(data, currentUploadDataLength); @@ -1295,6 +1307,13 @@ void QNetworkReplyHttpImplPrivate::wantUploadDataSlot(qint64 maxSize) emit q->haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size()); } +void QNetworkReplyHttpImplPrivate::uploadByteDeviceReadyReadSlot() +{ + // Start the flow between this thread and the HTTP thread again by triggering a upload. + wantUploadDataSlot(1024); +} + + /* A simple web page that can be used to test us: http://www.procata.com/cachetest/ */ diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h index d21659ce82..06a5383ae4 100644 --- a/src/network/access/qnetworkreplyhttpimpl_p.h +++ b/src/network/access/qnetworkreplyhttpimpl_p.h @@ -129,6 +129,7 @@ public: Q_PRIVATE_SLOT(d_func(), void resetUploadDataSlot(bool *r)) Q_PRIVATE_SLOT(d_func(), void wantUploadDataSlot(qint64)) Q_PRIVATE_SLOT(d_func(), void sentUploadDataSlot(qint64)) + Q_PRIVATE_SLOT(d_func(), void uploadByteDeviceReadyReadSlot()) Q_PRIVATE_SLOT(d_func(), void emitReplyUploadProgress(qint64, qint64)) Q_PRIVATE_SLOT(d_func(), void _q_cacheSaveDeviceAboutToClose()) @@ -300,6 +301,9 @@ public: void wantUploadDataSlot(qint64); void sentUploadDataSlot(qint64); + // From user's QNonContiguousByteDevice + void uploadByteDeviceReadyReadSlot(); + Q_DECLARE_PUBLIC(QNetworkReplyHttpImpl) }; diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp index 2e920ad69f..0a25815752 100644 --- a/src/network/socket/qhttpsocketengine.cpp +++ b/src/network/socket/qhttpsocketengine.cpp @@ -568,9 +568,6 @@ void QHttpSocketEngine::slotSocketReadNotification() char dummybuffer[4096]; while (d->pendingResponseData) { int read = d->socket->read(dummybuffer, qMin(sizeof(dummybuffer), (size_t)d->pendingResponseData)); - if (read >= 0) - dummybuffer[read] = 0; - if (read == 0) return; if (read == -1) { diff --git a/src/network/ssl/qsslcontext.cpp b/src/network/ssl/qsslcontext.cpp index f5e5352d5e..addf7a2ff5 100644 --- a/src/network/ssl/qsslcontext.cpp +++ b/src/network/ssl/qsslcontext.cpp @@ -315,11 +315,13 @@ init_context: q_SSL_CTX_set_tmp_dh(sslContext->ctx, dh); q_DH_free(dh); +#ifndef OPENSSL_NO_EC // Set temp ECDH params EC_KEY *ecdh = 0; ecdh = q_EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); q_SSL_CTX_set_tmp_ecdh(sslContext->ctx, ecdh); q_EC_KEY_free(ecdh); +#endif // OPENSSL_NO_EC return sslContext; } diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index ca692510c1..6f22ab726f 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -369,8 +369,10 @@ DEFINEFUNC3(void, SSL_get0_next_proto_negotiated, const SSL *s, s, DEFINEFUNC(DH *, DH_new, DUMMYARG, DUMMYARG, return 0, return) DEFINEFUNC(void, DH_free, DH *dh, dh, return, DUMMYARG) DEFINEFUNC3(BIGNUM *, BN_bin2bn, const unsigned char *s, s, int len, len, BIGNUM *ret, ret, return 0, return) +#ifndef OPENSSL_NO_EC DEFINEFUNC(EC_KEY *, EC_KEY_new_by_curve_name, int nid, nid, return 0, return) DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, return, DUMMYARG) +#endif // OPENSSL_NO_EC DEFINEFUNC5(int, PKCS12_parse, PKCS12 *p12, p12, const char *pass, pass, EVP_PKEY **pkey, pkey, \ X509 **cert, cert, STACK_OF(X509) **ca, ca, return 1, return); @@ -858,8 +860,10 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(DH_new) RESOLVEFUNC(DH_free) RESOLVEFUNC(BN_bin2bn) +#ifndef OPENSSL_NO_EC RESOLVEFUNC(EC_KEY_new_by_curve_name) RESOLVEFUNC(EC_KEY_free) +#endif // OPENSSL_NO_EC RESOLVEFUNC(PKCS12_parse) RESOLVEFUNC(d2i_PKCS12_bio) RESOLVEFUNC(PKCS12_free) diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index 34c0040e56..66f45f4706 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -438,10 +438,12 @@ void q_DH_free(DH *dh); BIGNUM *q_BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret); #define q_SSL_CTX_set_tmp_dh(ctx, dh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_DH, 0, (char *)dh) +#ifndef OPENSSL_NO_EC // EC Diffie-Hellman support EC_KEY *q_EC_KEY_new_by_curve_name(int nid); void q_EC_KEY_free(EC_KEY *ecdh); #define q_SSL_CTX_set_tmp_ecdh(ctx, ecdh) q_SSL_CTX_ctrl((ctx), SSL_CTRL_SET_TMP_ECDH, 0, (char *)ecdh) +#endif // OPENSSL_NO_EC // PKCS#12 support int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca); diff --git a/src/printsupport/dialogs/qpagesetupdialog_win.cpp b/src/printsupport/dialogs/qpagesetupdialog_win.cpp index 5da87cce18..fd3a676369 100644 --- a/src/printsupport/dialogs/qpagesetupdialog_win.cpp +++ b/src/printsupport/dialogs/qpagesetupdialog_win.cpp @@ -137,9 +137,8 @@ int QPageSetupDialog::exec() QDialog::setVisible(false); if (result) { engine->setGlobalDevMode(psd.hDevNames, psd.hDevMode); - d->printer->setPageMargins(QMarginsF(psd.rtMargin.left / multiplier, psd.rtMargin.right / multiplier, - psd.rtMargin.top / multiplier, psd.rtMargin.bottom / multiplier), - layout.units()); + const QMarginsF margins(psd.rtMargin.left, psd.rtMargin.top, psd.rtMargin.right, psd.rtMargin.bottom); + d->printer->setPageMargins(margins / multiplier, layout.units()); // copy from our temp DEVMODE struct if (!engine->globalDevMode() && hDevMode) { diff --git a/src/sql/doc/src/sql-driver.qdoc b/src/sql/doc/src/sql-driver.qdoc index 9858e30ff9..71d2fb4f85 100644 --- a/src/sql/doc/src/sql-driver.qdoc +++ b/src/sql/doc/src/sql-driver.qdoc @@ -700,7 +700,10 @@ system. On Unix, run the command \c{ldd} and pass the name of the plugin as parameter, for example \c{ldd libqsqlmysql.so}. You will get a warning if any of the client libraries couldn't be found. - On Windows, you can use Visual Studio's dependency walker. + On Windows, you can use Visual Studio's dependency walker. With + Qt Creator, you can update the \c PATH environment variable in the + \gui Run section of the \gui Project panel to include the path to + the folder containing the client libraries. \li Compile Qt with \c{QT_DEBUG_COMPONENT} defined to get very verbose debug output when loading plugins. \endlist diff --git a/src/tools/bootstrap-dbus/bootstrap-dbus.pro b/src/tools/bootstrap-dbus/bootstrap-dbus.pro index 62f9f96a9b..fb06b4d8a2 100644 --- a/src/tools/bootstrap-dbus/bootstrap-dbus.pro +++ b/src/tools/bootstrap-dbus/bootstrap-dbus.pro @@ -15,7 +15,7 @@ MODULE_PRIVATE_INCLUDES = \ load(qt_module) -QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS +QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS SOURCES = \ ../../dbus/qdbusintrospection.cpp \ diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro index 655158e457..d65b5ce6ef 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.pro @@ -3,7 +3,7 @@ QT = core-private force_bootstrap: QT += bootstrap_dbus-private else: QT += dbus-private DEFINES += QT_NO_CAST_FROM_ASCII -QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS +QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS include(../moc/moc.pri) diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro index dcc36c7913..6efcf323b8 100644 --- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro +++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.pro @@ -3,7 +3,7 @@ QT = core-private force_bootstrap: QT += bootstrap_dbus-private else: QT += dbus-private DEFINES += QT_NO_CAST_FROM_ASCII -QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS +QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS SOURCES = qdbusxml2cpp.cpp |