Merge remote-tracking branch 'origin/5.15' into dev

Change-Id: I24461492372fb9a2e46a3b8dfb6c854b85e9c600
This commit is contained in:
Qt Forward Merge Bot 2019-10-18 01:00:52 +02:00
commit 56e5e06ff2
12 changed files with 120 additions and 124 deletions

View File

@ -1,6 +1,6 @@
TARGET = QtCore
QT =
CONFIG += exceptions
CONFIG += exceptions metatypes install_metatypes
MODULE = core # not corelib, as per project file
MODULE_CONFIG = moc resources

View File

@ -166,21 +166,6 @@ Q_STATIC_ASSERT(int(QCborStreamReader::Invalid) == CborInvalidType);
QCborStreamReader::toSimpleType(), QCborValue::isSimpleType(), QCborValue::toSimpleType()
*/
Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
{
switch (st) {
case QCborSimpleType::False:
return "False";
case QCborSimpleType::True:
return "True";
case QCborSimpleType::Null:
return "Null";
case QCborSimpleType::Undefined:
return "Undefined";
}
return nullptr;
}
#if !defined(QT_NO_DATASTREAM)
QDataStream &operator<<(QDataStream &ds, QCborSimpleType st)
{
@ -196,18 +181,6 @@ QDataStream &operator>>(QDataStream &ds, QCborSimpleType &st)
}
#endif
#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug dbg, QCborSimpleType st)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_simpletype_id(st);
if (id)
return dbg.nospace() << "QCborSimpleType::" << id;
return dbg.nospace() << "QCborSimpleType(" << uint(st) << ')';
}
#endif
/*!
\enum QCborTag
\relates <QtCborCommon>
@ -230,79 +203,6 @@ QDebug operator<<(QDebug dbg, QCborSimpleType st)
QCborValue::isTag(), QCborValue::tag()
*/
Q_CORE_EXPORT const char *qt_cbor_tag_id(QCborTag tag)
{
// Casting to QCborKnownTags's underlying type will make the comparison
// below fail if the tag value is out of range.
auto n = std::underlying_type<QCborKnownTags>::type(tag);
if (QCborTag(n) == tag) {
switch (QCborKnownTags(n)) {
case QCborKnownTags::DateTimeString:
return "DateTimeString";
case QCborKnownTags::UnixTime_t:
return "UnixTime_t";
case QCborKnownTags::PositiveBignum:
return "PositiveBignum";
case QCborKnownTags::NegativeBignum:
return "NegativeBignum";
case QCborKnownTags::Decimal:
return "Decimal";
case QCborKnownTags::Bigfloat:
return "Bigfloat";
case QCborKnownTags::COSE_Encrypt0:
return "COSE_Encrypt0";
case QCborKnownTags::COSE_Mac0:
return "COSE_Mac0";
case QCborKnownTags::COSE_Sign1:
return "COSE_Sign1";
case QCborKnownTags::ExpectedBase64url:
return "ExpectedBase64url";
case QCborKnownTags::ExpectedBase64:
return "ExpectedBase64";
case QCborKnownTags::ExpectedBase16:
return "ExpectedBase16";
case QCborKnownTags::EncodedCbor:
return "EncodedCbor";
case QCborKnownTags::Url:
return "Url";
case QCborKnownTags::Base64url:
return "Base64url";
case QCborKnownTags::Base64:
return "Base64";
case QCborKnownTags::RegularExpression:
return "RegularExpression";
case QCborKnownTags::MimeMessage:
return "MimeMessage";
case QCborKnownTags::Uuid:
return "Uuid";
case QCborKnownTags::COSE_Encrypt:
return "COSE_Encrypt";
case QCborKnownTags::COSE_Mac:
return "COSE_Mac";
case QCborKnownTags::COSE_Sign:
return "COSE_Sign";
case QCborKnownTags::Signature:
return "Signature";
}
}
return nullptr;
}
#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug dbg, QCborTag tag)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_tag_id(tag);
dbg.nospace() << "QCborTag(";
if (id)
dbg.nospace() << "QCborKnownTags::" << id;
else
dbg.nospace() << quint64(tag);
return dbg << ')';
}
#endif
/*!
\enum QCborKnownTags
\relates <QtCborCommon>
@ -381,18 +281,6 @@ QDebug operator<<(QDebug dbg, QCborTag tag)
QCborValue::isTag(), QCborValue::tag()
*/
#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug dbg, QCborKnownTags tag)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_tag_id(QCborTag(int(tag)));
if (id)
return dbg.nospace() << "QCborKnownTags::" << id;
return dbg.nospace() << "QCborKnownTags(" << int(tag) << ')';
}
#endif
/*!
\class QCborError
\inmodule QtCore

View File

@ -2976,6 +2976,112 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
dbg.nospace() << "QCborValue(";
return debugContents(dbg, v) << ')';
}
Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
{
switch (st) {
case QCborSimpleType::False:
return "False";
case QCborSimpleType::True:
return "True";
case QCborSimpleType::Null:
return "Null";
case QCborSimpleType::Undefined:
return "Undefined";
}
return nullptr;
}
QDebug operator<<(QDebug dbg, QCborSimpleType st)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_simpletype_id(st);
if (id)
return dbg.nospace() << "QCborSimpleType::" << id;
return dbg.nospace() << "QCborSimpleType(" << uint(st) << ')';
}
Q_CORE_EXPORT const char *qt_cbor_tag_id(QCborTag tag)
{
// Casting to QCborKnownTags's underlying type will make the comparison
// below fail if the tag value is out of range.
auto n = std::underlying_type<QCborKnownTags>::type(tag);
if (QCborTag(n) == tag) {
switch (QCborKnownTags(n)) {
case QCborKnownTags::DateTimeString:
return "DateTimeString";
case QCborKnownTags::UnixTime_t:
return "UnixTime_t";
case QCborKnownTags::PositiveBignum:
return "PositiveBignum";
case QCborKnownTags::NegativeBignum:
return "NegativeBignum";
case QCborKnownTags::Decimal:
return "Decimal";
case QCborKnownTags::Bigfloat:
return "Bigfloat";
case QCborKnownTags::COSE_Encrypt0:
return "COSE_Encrypt0";
case QCborKnownTags::COSE_Mac0:
return "COSE_Mac0";
case QCborKnownTags::COSE_Sign1:
return "COSE_Sign1";
case QCborKnownTags::ExpectedBase64url:
return "ExpectedBase64url";
case QCborKnownTags::ExpectedBase64:
return "ExpectedBase64";
case QCborKnownTags::ExpectedBase16:
return "ExpectedBase16";
case QCborKnownTags::EncodedCbor:
return "EncodedCbor";
case QCborKnownTags::Url:
return "Url";
case QCborKnownTags::Base64url:
return "Base64url";
case QCborKnownTags::Base64:
return "Base64";
case QCborKnownTags::RegularExpression:
return "RegularExpression";
case QCborKnownTags::MimeMessage:
return "MimeMessage";
case QCborKnownTags::Uuid:
return "Uuid";
case QCborKnownTags::COSE_Encrypt:
return "COSE_Encrypt";
case QCborKnownTags::COSE_Mac:
return "COSE_Mac";
case QCborKnownTags::COSE_Sign:
return "COSE_Sign";
case QCborKnownTags::Signature:
return "Signature";
}
}
return nullptr;
}
QDebug operator<<(QDebug dbg, QCborTag tag)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_tag_id(tag);
dbg.nospace() << "QCborTag(";
if (id)
dbg.nospace() << "QCborKnownTags::" << id;
else
dbg.nospace() << quint64(tag);
return dbg << ')';
}
QDebug operator<<(QDebug dbg, QCborKnownTags tag)
{
QDebugStateSaver saver(dbg);
const char *id = qt_cbor_tag_id(QCborTag(int(tag)));
if (id)
return dbg.nospace() << "QCborKnownTags::" << id;
return dbg.nospace() << "QCborKnownTags(" << int(tag) << ')';
}
#endif
#ifndef QT_NO_DATASTREAM

View File

@ -35,7 +35,7 @@ testcocoon {
osx: LIBS_PRIVATE += -framework AppKit
darwin: LIBS_PRIVATE += -framework CoreGraphics
CONFIG += simd optimize_full
CONFIG += simd optimize_full metatypes install_metatypes
include(accessible/accessible.pri)
include(kernel/kernel.pri)

View File

@ -351,13 +351,13 @@
<item row="0" column="0">
<widget class="QGroupBox" name="duplex">
<property name="title">
<string>Duplex Printing</string>
<string>Double Sided Printing</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="noDuplex">
<property name="text">
<string>None</string>
<string>Off</string>
</property>
<property name="checked">
<bool>true</bool>
@ -367,14 +367,14 @@
<item>
<widget class="QRadioButton" name="duplexLong">
<property name="text">
<string>Long side</string>
<string>Long side binding</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="duplexShort">
<property name="text">
<string>Short side</string>
<string>Short side binding</string>
</property>
</widget>
</item>

View File

@ -9,6 +9,8 @@ msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x65000000
TRACEPOINT_PROVIDER = $$PWD/qtwidgets.tracepoints
CONFIG += qt_tracepoints
CONFIG += metatypes install_metatypes
QMAKE_DOCS = $$PWD/doc/qtwidgets.qdocconf
#platforms

View File

@ -1,5 +1,5 @@
CONFIG += testcase
TARGET = tst_qicon
TARGET = tst_qiconhighdpi
QT += testlib
SOURCES += tst_qiconhighdpi.cpp

View File

@ -222,7 +222,7 @@ void tst_QDialog::defaultButtons()
testWidget.show();
QApplication::setActiveWindow(&testWidget);
QVERIFY(QTest::qWaitForWindowActive(&testWidget));
QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
push->setDefault(true);
QVERIFY(push->isDefault());

View File

@ -826,7 +826,7 @@ void tst_QFileSystemModel::sort()
tree.setModel(myModel.data());
tree.show();
tree.resize(800, 800);
QVERIFY(QTest::qWaitForWindowActive(&tree));
QVERIFY(QTest::qWaitForWindowExposed(&tree));
tree.header()->setSortIndicator(1, Qt::DescendingOrder);
tree.header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
QStringList dirsToOpen;

View File

@ -166,7 +166,7 @@ void tst_QGraphicsEffectSource::initTestCase()
scene->addItem(item);
view = new QGraphicsView(scene);
view->show();
QVERIFY(QTest::qWaitForWindowActive(view));
QVERIFY(QTest::qWaitForWindowExposed(view));
}
void tst_QGraphicsEffectSource::cleanupTestCase()

View File

@ -1826,7 +1826,7 @@ void tst_QGraphicsGridLayout::removeLayout()
QGraphicsView view(&scene);
view.show();
QVERIFY(QTest::qWaitForWindowActive(&view));
QVERIFY(QTest::qWaitForWindowExposed(&view));
QRectF r1 = textEdit->geometry();
QRectF r2 = pushButton->geometry();

View File

@ -1518,7 +1518,7 @@ void tst_QGraphicsLinearLayout::removeLayout()
QGraphicsView view(&scene);
view.show();
QVERIFY(QTest::qWaitForWindowActive(&view));
QVERIFY(QTest::qWaitForWindowExposed(&view));
QRectF r1 = textEdit->geometry();
QRectF r2 = pushButton->geometry();