Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
This commit is contained in:
commit
a2b221e595
@ -1,7 +1,7 @@
|
|||||||
isEmpty(QMAKE_INCDIR_VULKAN) {
|
isEmpty(QMAKE_INCDIR_VULKAN) {
|
||||||
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
||||||
# headers are found out-of-the-box on typical Windows setups.
|
# headers are found out-of-the-box on typical Windows setups.
|
||||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
|
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
|
||||||
|
|
||||||
# Do not export the include dir but resolve it on every qmake call.
|
# Do not export the include dir but resolve it on every qmake call.
|
||||||
QMAKE_EXPORT_INCDIR_VULKAN = -
|
QMAKE_EXPORT_INCDIR_VULKAN = -
|
||||||
|
@ -903,6 +903,10 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
|||||||
|
|
||||||
\snippet code/src_corelib_global_qrandom.cpp 12
|
\snippet code/src_corelib_global_qrandom.cpp 12
|
||||||
|
|
||||||
|
If the \a highest parameter is negative, the result will be negative too;
|
||||||
|
if it is infinite or NaN, the result will be infinite or NaN too (that is,
|
||||||
|
not random).
|
||||||
|
|
||||||
\sa generateDouble(), bounded()
|
\sa generateDouble(), bounded()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -934,7 +938,7 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
|||||||
\overload
|
\overload
|
||||||
|
|
||||||
Generates one random 32-bit quantity in the range between 0 (inclusive) and
|
Generates one random 32-bit quantity in the range between 0 (inclusive) and
|
||||||
\a highest (exclusive). \a highest must not be negative.
|
\a highest (exclusive). \a highest must be positive.
|
||||||
|
|
||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of int. Instead, use generate() and cast to int.
|
range of int. Instead, use generate() and cast to int.
|
||||||
@ -946,8 +950,11 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
|||||||
\fn quint32 QRandomGenerator::bounded(quint32 lowest, quint32 highest)
|
\fn quint32 QRandomGenerator::bounded(quint32 lowest, quint32 highest)
|
||||||
\overload
|
\overload
|
||||||
|
|
||||||
Generates one random 32-bit quantity in the range between \a lowest (inclusive)
|
Generates one random 32-bit quantity in the range between \a lowest
|
||||||
and \a highest (exclusive). The same result may also be obtained by using
|
(inclusive) and \a highest (exclusive). The \a highest parameter must be
|
||||||
|
greater than \a lowest.
|
||||||
|
|
||||||
|
The same result may also be obtained by using
|
||||||
\l{http://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution}{\c std::uniform_int_distribution}
|
\l{http://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution}{\c std::uniform_int_distribution}
|
||||||
with parameters \a lowest and \c{\a highest - 1}. That class can also be used to
|
with parameters \a lowest and \c{\a highest - 1}. That class can also be used to
|
||||||
obtain quantities larger than 32 bits.
|
obtain quantities larger than 32 bits.
|
||||||
@ -968,7 +975,8 @@ inline QRandomGenerator::SystemGenerator &QRandomGenerator::SystemGenerator::sel
|
|||||||
\overload
|
\overload
|
||||||
|
|
||||||
Generates one random 32-bit quantity in the range between \a lowest
|
Generates one random 32-bit quantity in the range between \a lowest
|
||||||
(inclusive) and \a highest (exclusive), both of which may be negative.
|
(inclusive) and \a highest (exclusive), both of which may be negative, but
|
||||||
|
\a highest must be greater than \a lowest.
|
||||||
|
|
||||||
Note that this function cannot be used to obtain values in the full 32-bit
|
Note that this function cannot be used to obtain values in the full 32-bit
|
||||||
range of int. Instead, use generate() and cast to int.
|
range of int. Instead, use generate() and cast to int.
|
||||||
|
@ -122,16 +122,18 @@ public:
|
|||||||
return quint32(value);
|
return quint32(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bounded(int highest)
|
|
||||||
{
|
|
||||||
return int(bounded(quint32(highest)));
|
|
||||||
}
|
|
||||||
|
|
||||||
quint32 bounded(quint32 lowest, quint32 highest)
|
quint32 bounded(quint32 lowest, quint32 highest)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(highest > lowest);
|
||||||
return bounded(highest - lowest) + lowest;
|
return bounded(highest - lowest) + lowest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int bounded(int highest)
|
||||||
|
{
|
||||||
|
Q_ASSERT(highest > 0);
|
||||||
|
return int(bounded(0U, quint32(highest)));
|
||||||
|
}
|
||||||
|
|
||||||
int bounded(int lowest, int highest)
|
int bounded(int lowest, int highest)
|
||||||
{
|
{
|
||||||
return bounded(highest - lowest) + lowest;
|
return bounded(highest - lowest) + lowest;
|
||||||
|
@ -2167,6 +2167,8 @@ void QObject::removeEventFilter(QObject *obj)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
\threadsafe
|
||||||
|
|
||||||
Schedules this object for deletion.
|
Schedules this object for deletion.
|
||||||
|
|
||||||
The object will be deleted when control returns to the event
|
The object will be deleted when control returns to the event
|
||||||
|
@ -1194,7 +1194,7 @@ bool QRect::intersects(const QRect &r) const Q_DECL_NOTHROW
|
|||||||
\fn QRect operator-(const QRect &lhs, const QMargins &rhs)
|
\fn QRect operator-(const QRect &lhs, const QMargins &rhs)
|
||||||
\relates QRect
|
\relates QRect
|
||||||
|
|
||||||
Returns the \a lhs rectangle shrunken by the \a rhs margins.
|
Returns the \a lhs rectangle shrunk by the \a rhs margins.
|
||||||
|
|
||||||
\since 5.3
|
\since 5.3
|
||||||
*/
|
*/
|
||||||
@ -2417,7 +2417,7 @@ QRect QRectF::toAlignedRect() const Q_DECL_NOTHROW
|
|||||||
\relates QRectF
|
\relates QRectF
|
||||||
\since 5.3
|
\since 5.3
|
||||||
|
|
||||||
Returns the \a lhs rectangle grown by the \a rhs margins.
|
Returns the \a lhs rectangle shrunk by the \a rhs margins.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -608,13 +608,13 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
|
|||||||
socketType = qt_socket_getType(socketDescriptor);
|
socketType = qt_socket_getType(socketDescriptor);
|
||||||
|
|
||||||
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
QString socketProtocolStr = "UnknownProtocol";
|
QString socketProtocolStr = QStringLiteral("UnknownProtocol");
|
||||||
if (socketProtocol == QAbstractSocket::IPv4Protocol) socketProtocolStr = "IPv4Protocol";
|
if (socketProtocol == QAbstractSocket::IPv4Protocol) socketProtocolStr = QStringLiteral("IPv4Protocol");
|
||||||
else if (socketProtocol == QAbstractSocket::IPv6Protocol) socketProtocolStr = "IPv6Protocol";
|
else if (socketProtocol == QAbstractSocket::IPv6Protocol) socketProtocolStr = QStringLiteral("IPv6Protocol");
|
||||||
|
|
||||||
QString socketTypeStr = "UnknownSocketType";
|
QString socketTypeStr = QStringLiteral("UnknownSocketType");
|
||||||
if (socketType == QAbstractSocket::TcpSocket) socketTypeStr = "TcpSocket";
|
if (socketType == QAbstractSocket::TcpSocket) socketTypeStr = QStringLiteral("TcpSocket");
|
||||||
else if (socketType == QAbstractSocket::UdpSocket) socketTypeStr = "UdpSocket";
|
else if (socketType == QAbstractSocket::UdpSocket) socketTypeStr = QStringLiteral("UdpSocket");
|
||||||
|
|
||||||
qDebug("QNativeSocketEnginePrivate::fetchConnectionParameters() localAddress == %s, localPort = %i, peerAddress == %s, peerPort = %i, socketProtocol == %s, socketType == %s", localAddress.toString().toLatin1().constData(), localPort, peerAddress.toString().toLatin1().constData(), peerPort, socketProtocolStr.toLatin1().constData(), socketTypeStr.toLatin1().constData());
|
qDebug("QNativeSocketEnginePrivate::fetchConnectionParameters() localAddress == %s, localPort = %i, peerAddress == %s, peerPort = %i, socketProtocol == %s, socketType == %s", localAddress.toString().toLatin1().constData(), localPort, peerAddress.toString().toLatin1().constData(), peerPort, socketProtocolStr.toLatin1().constData(), socketTypeStr.toLatin1().constData());
|
||||||
#endif
|
#endif
|
||||||
@ -1477,8 +1477,8 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
qDebug("QNativeSocketEnginePrivate::nativeWrite(%p \"%s\", %li) == %li",
|
qDebug("QNativeSocketEnginePrivate::nativeWrite(%p \"%s\", %lli) == %lli",
|
||||||
data, qt_prettyDebug(data, qMin((int)ret, 16), (int)ret).data(), (int)len, (int)ret);
|
data, qt_prettyDebug(data, qMin(int(ret), 16), int(ret)).data(), len, ret);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -1520,11 +1520,11 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxLength)
|
|||||||
|
|
||||||
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
#if defined (QNATIVESOCKETENGINE_DEBUG)
|
||||||
if (ret != -2) {
|
if (ret != -2) {
|
||||||
qDebug("QNativeSocketEnginePrivate::nativeRead(%p \"%s\", %li) == %li",
|
qDebug("QNativeSocketEnginePrivate::nativeRead(%p \"%s\", %lli) == %lli",
|
||||||
data, qt_prettyDebug(data, qMin((int)bytesRead, 16), (int)bytesRead).data(), (int)maxLength, (int)ret);
|
data, qt_prettyDebug(data, qMin(int(bytesRead), 16), int(bytesRead)).data(), maxLength, ret);
|
||||||
} else {
|
} else {
|
||||||
qDebug("QNativeSocketEnginePrivate::nativeRead(%p, %li) == -2 (WOULD BLOCK)",
|
qDebug("QNativeSocketEnginePrivate::nativeRead(%p, %lli) == -2 (WOULD BLOCK)",
|
||||||
data, int(maxLength));
|
data, maxLength);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1188,6 +1188,8 @@ void QSocks5SocketEnginePrivate::_q_controlSocketReadNotification()
|
|||||||
break;
|
break;
|
||||||
case RequestMethodSent:
|
case RequestMethodSent:
|
||||||
parseRequestMethodReply();
|
parseRequestMethodReply();
|
||||||
|
if (socks5State == Connected && data->controlSocket->bytesAvailable())
|
||||||
|
_q_controlSocketReadNotification();
|
||||||
break;
|
break;
|
||||||
case Connected: {
|
case Connected: {
|
||||||
QByteArray buf;
|
QByteArray buf;
|
||||||
@ -1751,6 +1753,11 @@ bool QSocks5SocketEngine::waitForRead(int msecs, bool *timedOut)
|
|||||||
return false;
|
return false;
|
||||||
if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState)
|
if (d->data->controlSocket->state() == QAbstractSocket::UnconnectedState)
|
||||||
return true;
|
return true;
|
||||||
|
if (bytesAvailable() && d->readNotificationPending) {
|
||||||
|
// We've got some data incoming, but the queued call hasn't been performed yet.
|
||||||
|
// The data is where we expect it to be already, so just return true.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// we're connected
|
// we're connected
|
||||||
if (d->mode == QSocks5SocketEnginePrivate::ConnectMode ||
|
if (d->mode == QSocks5SocketEnginePrivate::ConnectMode ||
|
||||||
|
@ -11476,10 +11476,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::WA_TranslucentBackground:
|
case Qt::WA_TranslucentBackground:
|
||||||
if (on) {
|
if (on)
|
||||||
setAttribute(Qt::WA_NoSystemBackground);
|
setAttribute(Qt::WA_NoSystemBackground);
|
||||||
d->updateIsTranslucent();
|
d->updateIsTranslucent();
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case Qt::WA_AcceptTouchEvents:
|
case Qt::WA_AcceptTouchEvents:
|
||||||
|
@ -328,8 +328,8 @@ void tst_QTcpSocket::initTestCase_data()
|
|||||||
|
|
||||||
qDebug() << QtNetworkSettings::serverName();
|
qDebug() << QtNetworkSettings::serverName();
|
||||||
QTest::newRow("WithoutProxy") << false << 0 << false;
|
QTest::newRow("WithoutProxy") << false << 0 << false;
|
||||||
//QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy) << false; ### temporarily disabled, QTBUG-38385
|
QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy) << false;
|
||||||
//QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic) << false; ### temporarily disabled, QTBUG-38385
|
QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic) << false;
|
||||||
|
|
||||||
QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false;
|
QTest::newRow("WithHttpProxy") << true << int(HttpProxy) << false;
|
||||||
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
|
QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic) << false;
|
||||||
@ -337,8 +337,8 @@ void tst_QTcpSocket::initTestCase_data()
|
|||||||
|
|
||||||
#ifndef QT_NO_SSL
|
#ifndef QT_NO_SSL
|
||||||
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
|
QTest::newRow("WithoutProxy SSL") << false << 0 << true;
|
||||||
//QTest::newRow("WithSocks5Proxy SSL") << true << int(Socks5Proxy) << true; ### temporarily disabled, QTBUG-38385
|
QTest::newRow("WithSocks5Proxy SSL") << true << int(Socks5Proxy) << true;
|
||||||
//QTest::newRow("WithSocks5AuthProxy SSL") << true << int(Socks5Proxy | AuthBasic) << true; ### temporarily disabled, QTBUG-38385
|
QTest::newRow("WithSocks5AuthProxy SSL") << true << int(Socks5Proxy | AuthBasic) << true;
|
||||||
|
|
||||||
QTest::newRow("WithHttpProxy SSL") << true << int(HttpProxy) << true;
|
QTest::newRow("WithHttpProxy SSL") << true << int(HttpProxy) << true;
|
||||||
QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
|
QTest::newRow("WithHttpProxyBasicAuth SSL") << true << int(HttpProxy | AuthBasic) << true;
|
||||||
|
@ -5055,6 +5055,12 @@ public:
|
|||||||
|
|
||||||
void tst_QGraphicsItem::paint()
|
void tst_QGraphicsItem::paint()
|
||||||
{
|
{
|
||||||
|
#if defined(Q_OS_MACOS)
|
||||||
|
if (QSysInfo::productVersion() == QLatin1String("10.12")) {
|
||||||
|
QSKIP("Test is very flaky on MacOS_10_12, see QTBUG-76566");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QGraphicsScene scene;
|
QGraphicsScene scene;
|
||||||
|
|
||||||
PaintTester paintTester;
|
PaintTester paintTester;
|
||||||
|
@ -8856,6 +8856,12 @@ void tst_QWidget::translucentWidget()
|
|||||||
QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
|
QEXPECT_FAIL("", "WinRT: This fails. QTBUG-68297.", Abort);
|
||||||
QCOMPARE(actual.size(),expected.size());
|
QCOMPARE(actual.size(),expected.size());
|
||||||
QCOMPARE(actual,expected);
|
QCOMPARE(actual,expected);
|
||||||
|
|
||||||
|
const QWindow *window = label.windowHandle();
|
||||||
|
const QSurfaceFormat translucentFormat = window->requestedFormat();
|
||||||
|
label.setAttribute(Qt::WA_TranslucentBackground, false);
|
||||||
|
const QSurfaceFormat opaqueFormat = window->requestedFormat();
|
||||||
|
QVERIFY(translucentFormat != opaqueFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MaskResizeTestWidget : public QWidget
|
class MaskResizeTestWidget : public QWidget
|
||||||
|
Loading…
x
Reference in New Issue
Block a user