Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
This commit is contained in:
commit
104f0535a1
@ -300,7 +300,8 @@ mac {
|
|||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
||||||
} else {
|
} else {
|
||||||
qt_framework {
|
qt_framework {
|
||||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
|
# Intentionally there is no '_debug' infix for framework builds.
|
||||||
|
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||||
} else {
|
} else {
|
||||||
|
@ -1235,7 +1235,8 @@ void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(const QHostInfo &info)
|
|||||||
emitReplyError(channels[0].socket, channels[0].reply, QNetworkReply::HostNotFoundError);
|
emitReplyError(channels[0].socket, channels[0].reply, QNetworkReply::HostNotFoundError);
|
||||||
networkLayerState = QHttpNetworkConnectionPrivate::Unknown;
|
networkLayerState = QHttpNetworkConnectionPrivate::Unknown;
|
||||||
} else if (connectionType == QHttpNetworkConnection::ConnectionTypeSPDY
|
} else if (connectionType == QHttpNetworkConnection::ConnectionTypeSPDY
|
||||||
|| connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2) {
|
|| connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2
|
||||||
|
|| connectionType == QHttpNetworkConnection::ConnectionTypeHTTP2Direct) {
|
||||||
for (const HttpMessagePair &spdyPair : qAsConst(channels[0].spdyRequestsToSend)) {
|
for (const HttpMessagePair &spdyPair : qAsConst(channels[0].spdyRequestsToSend)) {
|
||||||
// emit error for all replies
|
// emit error for all replies
|
||||||
QHttpNetworkReply *currentReply = spdyPair.second;
|
QHttpNetworkReply *currentReply = spdyPair.second;
|
||||||
|
@ -1108,6 +1108,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
|
|||||||
|| !connection->d_func()->lowPriorityQueue.isEmpty());
|
|| !connection->d_func()->lowPriorityQueue.isEmpty());
|
||||||
|
|
||||||
if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2
|
if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2
|
||||||
|
|| connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2Direct
|
||||||
#ifndef QT_NO_SSL
|
#ifndef QT_NO_SSL
|
||||||
|| connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY
|
|| connection->connectionType() == QHttpNetworkConnection::ConnectionTypeSPDY
|
||||||
#endif
|
#endif
|
||||||
|
@ -297,6 +297,11 @@ void QHttpThreadDelegate::startRequest()
|
|||||||
connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2Direct;
|
connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2Direct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(ssl)
|
||||||
|
// See qnetworkreplyhttpimpl, delegate's initialization code.
|
||||||
|
Q_ASSERT(!ssl || incomingSslConfiguration.data());
|
||||||
|
#endif // QT_CONFIG(ssl)
|
||||||
|
|
||||||
const bool isH2 = httpRequest.isHTTP2Allowed() || httpRequest.isHTTP2Direct();
|
const bool isH2 = httpRequest.isHTTP2Allowed() || httpRequest.isHTTP2Direct();
|
||||||
if (isH2) {
|
if (isH2) {
|
||||||
#if QT_CONFIG(ssl)
|
#if QT_CONFIG(ssl)
|
||||||
@ -316,9 +321,6 @@ void QHttpThreadDelegate::startRequest()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_SSL
|
#ifndef QT_NO_SSL
|
||||||
if (ssl && !incomingSslConfiguration.data())
|
|
||||||
incomingSslConfiguration.reset(new QSslConfiguration);
|
|
||||||
|
|
||||||
if (!isH2 && httpRequest.isSPDYAllowed() && ssl) {
|
if (!isH2 && httpRequest.isSPDYAllowed() && ssl) {
|
||||||
connectionType = QHttpNetworkConnection::ConnectionTypeSPDY;
|
connectionType = QHttpNetworkConnection::ConnectionTypeSPDY;
|
||||||
urlCopy.setScheme(QStringLiteral("spdy")); // to differentiate SPDY requests from HTTPS requests
|
urlCopy.setScheme(QStringLiteral("spdy")); // to differentiate SPDY requests from HTTPS requests
|
||||||
|
@ -828,12 +828,17 @@ bool QSslSocketBackendPrivate::acceptContext()
|
|||||||
&expiry // ptsTimeStamp
|
&expiry // ptsTimeStamp
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (status == SEC_E_INCOMPLETE_MESSAGE) {
|
||||||
|
// Need more data
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (inBuffers[1].BufferType == SECBUFFER_EXTRA) {
|
if (inBuffers[1].BufferType == SECBUFFER_EXTRA) {
|
||||||
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
|
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
|
||||||
// inBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
|
// inBuffers[1].cbBuffer indicates the amount of bytes _NOT_ processed, the rest need to
|
||||||
// be stored.
|
// be stored.
|
||||||
intermediateBuffer = intermediateBuffer.right(int(inBuffers[1].cbBuffer));
|
intermediateBuffer = intermediateBuffer.right(int(inBuffers[1].cbBuffer));
|
||||||
} else if (status != SEC_E_INCOMPLETE_MESSAGE) {
|
} else { /* No 'extra' data, message not incomplete */
|
||||||
intermediateBuffer.clear();
|
intermediateBuffer.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1069,7 +1074,6 @@ bool QSslSocketBackendPrivate::verifyHandshake()
|
|||||||
}
|
}
|
||||||
|
|
||||||
schannelState = SchannelState::Done;
|
schannelState = SchannelState::Done;
|
||||||
peerCertVerified = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1152,7 +1156,6 @@ void QSslSocketBackendPrivate::reset()
|
|||||||
|
|
||||||
connectionEncrypted = false;
|
connectionEncrypted = false;
|
||||||
shutdown = false;
|
shutdown = false;
|
||||||
peerCertVerified = false;
|
|
||||||
renegotiating = false;
|
renegotiating = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1315,7 +1318,9 @@ void QSslSocketBackendPrivate::transmit()
|
|||||||
#endif
|
#endif
|
||||||
intermediateBuffer = ciphertext.right(int(dataBuffer[3].cbBuffer));
|
intermediateBuffer = ciphertext.right(int(dataBuffer[3].cbBuffer));
|
||||||
}
|
}
|
||||||
} else if (status == SEC_E_INCOMPLETE_MESSAGE) {
|
}
|
||||||
|
|
||||||
|
if (status == SEC_E_INCOMPLETE_MESSAGE) {
|
||||||
// Need more data before we can decrypt.. to the buffer it goes!
|
// Need more data before we can decrypt.. to the buffer it goes!
|
||||||
#ifdef QSSLSOCKET_DEBUG
|
#ifdef QSSLSOCKET_DEBUG
|
||||||
qCDebug(lcSsl, "We didn't have enough data to decrypt anything, will try again!");
|
qCDebug(lcSsl, "We didn't have enough data to decrypt anything, will try again!");
|
||||||
@ -1361,17 +1366,6 @@ void QSslSocketBackendPrivate::transmit()
|
|||||||
schannelState = SchannelState::Renegotiate;
|
schannelState = SchannelState::Renegotiate;
|
||||||
renegotiating = true;
|
renegotiating = true;
|
||||||
|
|
||||||
if (dataBuffer[3].BufferType == SECBUFFER_EXTRA) {
|
|
||||||
// https://docs.microsoft.com/en-us/windows/desktop/secauthn/extra-buffers-returned-by-schannel
|
|
||||||
// dataBuffer[3].cbBuffer indicates the amount of bytes _NOT_ processed,
|
|
||||||
// the rest need to be stored.
|
|
||||||
#ifdef QSSLSOCKET_DEBUG
|
|
||||||
qCDebug(lcSsl) << "We've got excess data, moving it to the intermediate buffer:"
|
|
||||||
<< dataBuffer[3].cbBuffer << "bytes";
|
|
||||||
#endif
|
|
||||||
intermediateBuffer = ciphertext.right(int(dataBuffer[3].cbBuffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need to call 'continueHandshake' or else there's no guarantee it ever gets called
|
// We need to call 'continueHandshake' or else there's no guarantee it ever gets called
|
||||||
continueHandshake();
|
continueHandshake();
|
||||||
break;
|
break;
|
||||||
@ -1537,7 +1531,7 @@ void QSslSocketBackendPrivate::continueHandshake()
|
|||||||
case SchannelState::VerifyHandshake:
|
case SchannelState::VerifyHandshake:
|
||||||
// if we're in shutdown or renegotiating then we might not need to verify
|
// if we're in shutdown or renegotiating then we might not need to verify
|
||||||
// (since we already did)
|
// (since we already did)
|
||||||
if (!peerCertVerified && !verifyHandshake()) {
|
if (!verifyHandshake()) {
|
||||||
shutdown = true; // Skip sending shutdown alert
|
shutdown = true; // Skip sending shutdown alert
|
||||||
q->abort(); // We don't want to send buffered data
|
q->abort(); // We don't want to send buffered data
|
||||||
disconnectFromHost();
|
disconnectFromHost();
|
||||||
|
@ -147,7 +147,6 @@ private:
|
|||||||
ULONG contextAttributes = 0;
|
ULONG contextAttributes = 0;
|
||||||
|
|
||||||
bool renegotiating = false;
|
bool renegotiating = false;
|
||||||
bool peerCertVerified = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -270,6 +270,7 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
|||||||
// The drag was started from within the application
|
// The drag was started from within the application
|
||||||
response = QWindowSystemInterface::handleDrop(target, nativeDrag->dragMimeData(),
|
response = QWindowSystemInterface::handleDrop(target, nativeDrag->dragMimeData(),
|
||||||
point, qtAllowed, buttons, modifiers);
|
point, qtAllowed, buttons, modifiers);
|
||||||
|
nativeDrag->setAcceptedAction(response.acceptedAction());
|
||||||
} else {
|
} else {
|
||||||
QCocoaDropData mimeData(sender.draggingPasteboard);
|
QCocoaDropData mimeData(sender.draggingPasteboard);
|
||||||
response = QWindowSystemInterface::handleDrop(target, &mimeData,
|
response = QWindowSystemInterface::handleDrop(target, &mimeData,
|
||||||
@ -282,6 +283,7 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
|||||||
{
|
{
|
||||||
Q_UNUSED(session);
|
Q_UNUSED(session);
|
||||||
Q_UNUSED(screenPoint);
|
Q_UNUSED(screenPoint);
|
||||||
|
Q_UNUSED(operation);
|
||||||
|
|
||||||
if (!m_platformWindow)
|
if (!m_platformWindow)
|
||||||
return;
|
return;
|
||||||
@ -290,8 +292,7 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
|||||||
if (!target)
|
if (!target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
|
QCocoaIntegration::instance()->drag();
|
||||||
nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
|
|
||||||
|
|
||||||
// Qt starts drag-and-drop on a mouse button press event. Cococa in
|
// Qt starts drag-and-drop on a mouse button press event. Cococa in
|
||||||
// this case won't send the matching release event, so we have to
|
// this case won't send the matching release event, so we have to
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
|
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
|
||||||
|
typedef const GLubyte *(*glGetStringiProc)(GLenum, GLuint);
|
||||||
|
|
||||||
#ifndef GLX_CONTEXT_CORE_PROFILE_BIT_ARB
|
#ifndef GLX_CONTEXT_CORE_PROFILE_BIT_ARB
|
||||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||||
@ -145,6 +146,27 @@ static inline QByteArray getGlString(GLenum param)
|
|||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool hasGlExtension(const QSurfaceFormat &format, const char *ext)
|
||||||
|
{
|
||||||
|
if (format.majorVersion() < 3) {
|
||||||
|
auto exts = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
|
||||||
|
return exts && strstr(exts, ext);
|
||||||
|
} else {
|
||||||
|
auto glGetStringi = reinterpret_cast<glGetStringiProc>(
|
||||||
|
glXGetProcAddress(reinterpret_cast<const GLubyte*>("glGetStringi")));
|
||||||
|
if (glGetStringi) {
|
||||||
|
GLint n = 0;
|
||||||
|
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
|
||||||
|
for (GLint i = 0; i < n; ++i) {
|
||||||
|
const char *p = reinterpret_cast<const char *>(glGetStringi(GL_EXTENSIONS, i));
|
||||||
|
if (p && !strcmp(p, ext))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void updateFormatFromContext(QSurfaceFormat &format)
|
static void updateFormatFromContext(QSurfaceFormat &format)
|
||||||
{
|
{
|
||||||
// Update the version, profile, and context bit of the format
|
// Update the version, profile, and context bit of the format
|
||||||
@ -163,7 +185,7 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
|||||||
format.setOption(QSurfaceFormat::StereoBuffers);
|
format.setOption(QSurfaceFormat::StereoBuffers);
|
||||||
|
|
||||||
if (format.renderableType() == QSurfaceFormat::OpenGL) {
|
if (format.renderableType() == QSurfaceFormat::OpenGL) {
|
||||||
if (format.version() >= qMakePair(4, 0)) {
|
if (hasGlExtension(format, "GL_ARB_robustness")) {
|
||||||
GLint value = 0;
|
GLint value = 0;
|
||||||
glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, &value);
|
glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, &value);
|
||||||
if (value == GL_LOSE_CONTEXT_ON_RESET_ARB)
|
if (value == GL_LOSE_CONTEXT_ON_RESET_ARB)
|
||||||
|
@ -685,9 +685,6 @@ static inline QByteArray msgProcessError(const QString &binary, const QStringLis
|
|||||||
|
|
||||||
void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments, bool crashes)
|
void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& loggers, QStringList const& arguments, bool crashes)
|
||||||
{
|
{
|
||||||
if (EmulationDetector::isRunningArmOnX86() && (subdir == "crashes"))
|
|
||||||
QSKIP("Skipping \"crashes\" due to QTBUG-71915");
|
|
||||||
|
|
||||||
#if defined(__GNUC__) && defined(__i386) && defined(Q_OS_LINUX)
|
#if defined(__GNUC__) && defined(__i386) && defined(Q_OS_LINUX)
|
||||||
if (arguments.contains("-callgrind")) {
|
if (arguments.contains("-callgrind")) {
|
||||||
QProcess checkProcess;
|
QProcess checkProcess;
|
||||||
|
Loading…
Reference in New Issue
Block a user