Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/text/qbytearray.cpp Change-Id: I63706409464d31391012bacdadfd1f6300509787
This commit is contained in:
commit
2cd6d76d68
26
dist/changes-5.15.0
vendored
26
dist/changes-5.15.0
vendored
@ -46,23 +46,21 @@ information about a particular change.
|
|||||||
- QtNetwork:
|
- QtNetwork:
|
||||||
* QNetworkConfigurationManager, QNetworkConfiguration and QNetworkSession
|
* QNetworkConfigurationManager, QNetworkConfiguration and QNetworkSession
|
||||||
are deprecated, to be removed in Qt 6.
|
are deprecated, to be removed in Qt 6.
|
||||||
|
* QNetworkAccessManager::activeConfiguration, configuration and
|
||||||
- [REVERTED] [QTBUG-80369] QAbstractSocket::error() (the getter) is
|
setConfiguration are deprecated, to be removed in Qt 6.
|
||||||
deprecated; superseded by socketError().
|
* QNetworkAccessManager::networkAccessible, setNetworkAccessible and
|
||||||
- [REVERTED] [QTBUG-80369] QLocalSocket::error() (the getter) is
|
the NetworkAccessibility enum are deprecated, to be removed in Qt 6.
|
||||||
deprecated; superseded by socketError().
|
* QLocalSocket::error() (the signal) is deprecated; superseded by
|
||||||
- [QTBUG-80369] QSslSocket::sslErrors() (the getter) was deprecated and
|
errorOccurred()
|
||||||
|
* QAbstractSocket::error() (the signal) is deprecated; superseded by
|
||||||
|
errorOccurred()
|
||||||
|
* QNetworkReply::error() (the signal) is deprecated; superseded by
|
||||||
|
errorOccurred()
|
||||||
|
* [QTBUG-80369] QSslSocket::sslErrors() (the getter) was deprecated and
|
||||||
superseded by sslHandshakeErrors()
|
superseded by sslHandshakeErrors()
|
||||||
- [REVERTED] [QTBUG-80369] QNetworkReply::error() (the getter) was
|
|
||||||
deprecated; superseded by networkError().
|
|
||||||
- [QTBUG-81630][QTBUG-80312] QLinkedList is deprecated and will be moved
|
- [QTBUG-81630][QTBUG-80312] QLinkedList is deprecated and will be moved
|
||||||
to Qt5Compat in Qt 6. It is recommended to use std::list instead.
|
to Qt5Compat in Qt 6. It is recommended to use std::list instead.
|
||||||
- QLocalSocket::error() (the signal) is deprecated; superseded by
|
|
||||||
errorOccurred()
|
|
||||||
- QAbstractSocket::error() (the signal) is deprecated; superseded by
|
|
||||||
errorOccurred()
|
|
||||||
- QNetworkReply::error() (the signal) is deprecated; superseded by
|
|
||||||
errorOccurred()
|
|
||||||
|
|
||||||
See also the various sections below, which include many more deprecations.
|
See also the various sections below, which include many more deprecations.
|
||||||
|
|
||||||
|
@ -42,10 +42,17 @@ defineReplace(cmakeTargetPaths) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineReplace(cmakePortablePaths) {
|
defineReplace(cmakePortablePaths) {
|
||||||
|
SYSR = $$[QT_SYSROOT]
|
||||||
|
!isEmpty(SYSR): SYSR = ${CMAKE_SYSROOT}
|
||||||
variable = $$1
|
variable = $$1
|
||||||
out =
|
out =
|
||||||
for(v, variable) {
|
for(v, variable) {
|
||||||
out += $$[QT_SYSROOT]$$cmakeTargetPath($$v)
|
path = $$cmakeTargetPath($$v)
|
||||||
|
contains(path, /.*): \
|
||||||
|
sysroot_prefix = $$SYSR
|
||||||
|
else: \
|
||||||
|
sysroot_prefix = $$SYSR/
|
||||||
|
out += $${sysroot_prefix}$${path}
|
||||||
}
|
}
|
||||||
return ($$join(out, ";"))
|
return ($$join(out, ";"))
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ contains(all_qt_module_deps, qml): \
|
|||||||
|
|
||||||
!isEmpty(SCANNERRESOURCES) {
|
!isEmpty(SCANNERRESOURCES) {
|
||||||
IMPORTPATHS += -qrcFiles
|
IMPORTPATHS += -qrcFiles
|
||||||
for (RESOURCE, SCANNERRESOURCES)
|
for (RESOURCE, SCANNERRESOURCES): \
|
||||||
IMPORTPATHS += $$absolute_path($$system_quote($$RESOURCE), $$_PRO_FILE_PWD_)
|
IMPORTPATHS += $$absolute_path($$system_quote($$RESOURCE), $$_PRO_FILE_PWD_)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include <qcoreapplication.h>
|
#include <qcoreapplication.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <qoperatingsystemversion.h>
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <intshcut.h>
|
#include <intshcut.h>
|
||||||
@ -99,7 +100,11 @@ static bool isProcessLowIntegrity() {
|
|||||||
// Disable function until Qt CI is updated
|
// Disable function until Qt CI is updated
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
HANDLE process_token = GetCurrentProcessToken(); // non-leaking pseudo-handle
|
if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8)
|
||||||
|
return false;
|
||||||
|
// non-leaking pseudo-handle. Expanded inline function GetCurrentProcessToken()
|
||||||
|
// (was made an inline function in Windows 8).
|
||||||
|
const auto process_token = HANDLE(quintptr(-4));
|
||||||
|
|
||||||
QVarLengthArray<char,256> token_info_buf(256);
|
QVarLengthArray<char,256> token_info_buf(256);
|
||||||
auto* token_info = reinterpret_cast<TOKEN_MANDATORY_LABEL*>(token_info_buf.data());
|
auto* token_info = reinterpret_cast<TOKEN_MANDATORY_LABEL*>(token_info_buf.data());
|
||||||
|
@ -1635,7 +1635,7 @@ void QCborContainerPrivate::decodeStringFromCbor(QCborStreamReader &reader)
|
|||||||
if (len == rawlen) {
|
if (len == rawlen) {
|
||||||
auto oldSize = data.size();
|
auto oldSize = data.size();
|
||||||
auto newSize = oldSize;
|
auto newSize = oldSize;
|
||||||
if (!add_overflow(newSize, len, &newSize)) {
|
if (!add_overflow(newSize, len, &newSize) && newSize < MaxByteArraySize) {
|
||||||
if (newSize != oldSize)
|
if (newSize != oldSize)
|
||||||
data.resize(newSize);
|
data.resize(newSize);
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ static bool isValidIccProfile(const ICCProfileHeader &header)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't overflow 32bit integers:
|
// Don't overflow 32bit integers:
|
||||||
if (header.tagCount >= INT32_MAX / sizeof(TagTableEntry)) {
|
if (header.tagCount >= (INT32_MAX - sizeof(ICCProfileHeader)) / sizeof(TagTableEntry)) {
|
||||||
qCWarning(lcIcc, "Failed tag count sanity");
|
qCWarning(lcIcc, "Failed tag count sanity");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -629,6 +629,7 @@ bool fromIccProfile(const QByteArray &data, QColorSpace *colorSpace)
|
|||||||
// Read tag index
|
// Read tag index
|
||||||
const TagTableEntry *tagTable = (const TagTableEntry *)(data.constData() + sizeof(ICCProfileHeader));
|
const TagTableEntry *tagTable = (const TagTableEntry *)(data.constData() + sizeof(ICCProfileHeader));
|
||||||
const qsizetype offsetToData = sizeof(ICCProfileHeader) + header->tagCount * sizeof(TagTableEntry);
|
const qsizetype offsetToData = sizeof(ICCProfileHeader) + header->tagCount * sizeof(TagTableEntry);
|
||||||
|
Q_ASSERT(offsetToData > 0);
|
||||||
if (offsetToData > data.size()) {
|
if (offsetToData > data.size()) {
|
||||||
qCWarning(lcIcc) << "fromIccProfile: failed index size sanity";
|
qCWarning(lcIcc) << "fromIccProfile: failed index size sanity";
|
||||||
return false;
|
return false;
|
||||||
|
@ -105,13 +105,14 @@ public:
|
|||||||
|
|
||||||
bool sizeDirty;
|
bool sizeDirty;
|
||||||
bool layoutDirty;
|
bool layoutDirty;
|
||||||
|
bool fullLayoutCompleted;
|
||||||
|
|
||||||
QVector<QPointer<QTextFrame> > floats;
|
QVector<QPointer<QTextFrame> > floats;
|
||||||
};
|
};
|
||||||
|
|
||||||
QTextFrameData::QTextFrameData()
|
QTextFrameData::QTextFrameData()
|
||||||
: maximumWidth(QFIXED_MAX),
|
: maximumWidth(QFIXED_MAX),
|
||||||
currentLayoutStruct(nullptr), sizeDirty(true), layoutDirty(true)
|
currentLayoutStruct(nullptr), sizeDirty(true), layoutDirty(true), fullLayoutCompleted(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2943,7 +2944,7 @@ QRectF QTextDocumentLayoutPrivate::layoutFrame(QTextFrame *f, int layoutFrom, in
|
|||||||
QTextFrameData *fd = data(f);
|
QTextFrameData *fd = data(f);
|
||||||
QFixed newContentsWidth;
|
QFixed newContentsWidth;
|
||||||
|
|
||||||
bool fullLayout = false;
|
bool fullLayout = (f == document->rootFrame() && !fd->fullLayoutCompleted);
|
||||||
{
|
{
|
||||||
QTextFrameFormat fformat = f->frameFormat();
|
QTextFrameFormat fformat = f->frameFormat();
|
||||||
// set sizes of this frame from the format
|
// set sizes of this frame from the format
|
||||||
@ -3397,6 +3398,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
|
|||||||
cp.contentsWidth = layoutStruct->contentsWidth;
|
cp.contentsWidth = layoutStruct->contentsWidth;
|
||||||
checkPoints.append(cp);
|
checkPoints.append(cp);
|
||||||
checkPoints.reserve(checkPoints.size());
|
checkPoints.reserve(checkPoints.size());
|
||||||
|
fd->fullLayoutCompleted = true;
|
||||||
} else {
|
} else {
|
||||||
currentLazyLayoutPosition = checkPoints.constLast().positionInFrame;
|
currentLazyLayoutPosition = checkPoints.constLast().positionInFrame;
|
||||||
// #######
|
// #######
|
||||||
@ -3808,6 +3810,7 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length)
|
|||||||
d->contentHasAlignment = false;
|
d->contentHasAlignment = false;
|
||||||
d->currentLazyLayoutPosition = 0;
|
d->currentLazyLayoutPosition = 0;
|
||||||
d->checkPoints.clear();
|
d->checkPoints.clear();
|
||||||
|
data(d->docPrivate->rootFrame())->fullLayoutCompleted = false;
|
||||||
d->layoutStep();
|
d->layoutStep();
|
||||||
} else {
|
} else {
|
||||||
d->ensureLayoutedByPosition(from);
|
d->ensureLayoutedByPosition(from);
|
||||||
|
@ -107,6 +107,7 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
WId winId = 0;
|
WId winId = 0;
|
||||||
|
bool directoryMode = false;
|
||||||
bool modal = false;
|
bool modal = false;
|
||||||
bool multipleFiles = false;
|
bool multipleFiles = false;
|
||||||
bool saveFile = false;
|
bool saveFile = false;
|
||||||
@ -145,6 +146,9 @@ void QXdgDesktopPortalFileDialog::initializeDialog()
|
|||||||
if (options()->fileMode() == QFileDialogOptions::ExistingFiles)
|
if (options()->fileMode() == QFileDialogOptions::ExistingFiles)
|
||||||
d->multipleFiles = true;
|
d->multipleFiles = true;
|
||||||
|
|
||||||
|
if (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)
|
||||||
|
d->directoryMode = true;
|
||||||
|
|
||||||
if (options()->isLabelExplicitlySet(QFileDialogOptions::Accept))
|
if (options()->isLabelExplicitlySet(QFileDialogOptions::Accept))
|
||||||
d->acceptLabel = options()->labelText(QFileDialogOptions::Accept);
|
d->acceptLabel = options()->labelText(QFileDialogOptions::Accept);
|
||||||
|
|
||||||
@ -179,6 +183,7 @@ void QXdgDesktopPortalFileDialog::openPortal()
|
|||||||
|
|
||||||
options.insert(QLatin1String("modal"), d->modal);
|
options.insert(QLatin1String("modal"), d->modal);
|
||||||
options.insert(QLatin1String("multiple"), d->multipleFiles);
|
options.insert(QLatin1String("multiple"), d->multipleFiles);
|
||||||
|
options.insert(QLatin1String("directory"), d->directoryMode);
|
||||||
|
|
||||||
if (d->saveFile) {
|
if (d->saveFile) {
|
||||||
if (!d->directory.isEmpty())
|
if (!d->directory.isEmpty())
|
||||||
|
@ -45,6 +45,12 @@
|
|||||||
#include <qpa/qplatformthemefactory_p.h>
|
#include <qpa/qplatformthemefactory_p.h>
|
||||||
#include <qpa/qplatformintegration.h>
|
#include <qpa/qplatformintegration.h>
|
||||||
|
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include <QDBusMessage>
|
||||||
|
#include <QDBusPendingCall>
|
||||||
|
#include <QDBusPendingCallWatcher>
|
||||||
|
#include <QDBusPendingReply>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QXdgDesktopPortalThemePrivate : public QPlatformThemePrivate
|
class QXdgDesktopPortalThemePrivate : public QPlatformThemePrivate
|
||||||
@ -60,6 +66,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
QPlatformTheme *baseTheme;
|
QPlatformTheme *baseTheme;
|
||||||
|
uint fileChooserPortalVersion = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
QXdgDesktopPortalTheme::QXdgDesktopPortalTheme()
|
QXdgDesktopPortalTheme::QXdgDesktopPortalTheme()
|
||||||
@ -90,6 +97,21 @@ QXdgDesktopPortalTheme::QXdgDesktopPortalTheme()
|
|||||||
// 3) Fall back on the built-in "null" platform theme.
|
// 3) Fall back on the built-in "null" platform theme.
|
||||||
if (!d->baseTheme)
|
if (!d->baseTheme)
|
||||||
d->baseTheme = new QPlatformTheme;
|
d->baseTheme = new QPlatformTheme;
|
||||||
|
|
||||||
|
// Get information about portal version
|
||||||
|
QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"),
|
||||||
|
QLatin1String("/org/freedesktop/portal/desktop"),
|
||||||
|
QLatin1String("org.freedesktop.DBus.Properties"),
|
||||||
|
QLatin1String("Get"));
|
||||||
|
message << QLatin1String("org.freedesktop.portal.FileChooser") << QLatin1String("version");
|
||||||
|
QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
|
||||||
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall);
|
||||||
|
QObject::connect(watcher, &QDBusPendingCallWatcher::finished, [d] (QDBusPendingCallWatcher *watcher) {
|
||||||
|
QDBusPendingReply<QVariant> reply = *watcher;
|
||||||
|
if (reply.isValid()) {
|
||||||
|
d->fileChooserPortalVersion = reply.value().toUInt();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QPlatformMenuItem* QXdgDesktopPortalTheme::createPlatformMenuItem() const
|
QPlatformMenuItem* QXdgDesktopPortalTheme::createPlatformMenuItem() const
|
||||||
@ -131,7 +153,9 @@ QPlatformDialogHelper* QXdgDesktopPortalTheme::createPlatformDialogHelper(Dialog
|
|||||||
Q_D(const QXdgDesktopPortalTheme);
|
Q_D(const QXdgDesktopPortalTheme);
|
||||||
|
|
||||||
if (type == FileDialog) {
|
if (type == FileDialog) {
|
||||||
if (d->baseTheme->usePlatformNativeDialog(type))
|
// Older versions of FileChooser portal don't support opening directories, therefore we fallback
|
||||||
|
// to native file dialog opened inside the sandbox to open a directory.
|
||||||
|
if (d->fileChooserPortalVersion < 3 && d->baseTheme->usePlatformNativeDialog(type))
|
||||||
return new QXdgDesktopPortalFileDialog(static_cast<QPlatformFileDialogHelper*>(d->baseTheme->createPlatformDialogHelper(type)));
|
return new QXdgDesktopPortalFileDialog(static_cast<QPlatformFileDialogHelper*>(d->baseTheme->createPlatformDialogHelper(type)));
|
||||||
|
|
||||||
return new QXdgDesktopPortalFileDialog;
|
return new QXdgDesktopPortalFileDialog;
|
||||||
|
@ -1378,8 +1378,8 @@ QStringList qt_make_filter_list(const QString &filter)
|
|||||||
|
|
||||||
\snippet code/src_gui_dialogs_qfiledialog.cpp 6
|
\snippet code/src_gui_dialogs_qfiledialog.cpp 6
|
||||||
|
|
||||||
\note This is not supported on Android's native file dialog. Use
|
\note With Android's native file dialog, the mime type matching the given
|
||||||
\l{setMimeTypeFilters()} instead.
|
name filter is used because only mime types are supported.
|
||||||
|
|
||||||
\sa setMimeTypeFilters(), setNameFilters()
|
\sa setMimeTypeFilters(), setNameFilters()
|
||||||
*/
|
*/
|
||||||
@ -1431,9 +1431,6 @@ QStringList qt_strip_filters(const QStringList &filters)
|
|||||||
filters for each file type. For example, JPEG images have three possible
|
filters for each file type. For example, JPEG images have three possible
|
||||||
extensions; if your application can open such files, selecting the
|
extensions; if your application can open such files, selecting the
|
||||||
\c image/jpeg mime type as a filter will allow you to open all of them.
|
\c image/jpeg mime type as a filter will allow you to open all of them.
|
||||||
|
|
||||||
\note This is not supported on Android's native file dialog. Use
|
|
||||||
\l{setMimeTypeFilters()} instead.
|
|
||||||
*/
|
*/
|
||||||
void QFileDialog::setNameFilters(const QStringList &filters)
|
void QFileDialog::setNameFilters(const QStringList &filters)
|
||||||
{
|
{
|
||||||
|
@ -81,19 +81,31 @@ qint64 LargeIODevice::readData(char *data, qint64 maxlen)
|
|||||||
|
|
||||||
void addValidationLargeData(qsizetype minInvalid, qsizetype maxInvalid)
|
void addValidationLargeData(qsizetype minInvalid, qsizetype maxInvalid)
|
||||||
{
|
{
|
||||||
char toolong[2 + sizeof(qsizetype)] = { char(0x81) };
|
char toolong[1 + sizeof(qsizetype)];
|
||||||
for (qsizetype v = maxInvalid; v >= minInvalid; --v) {
|
for (qsizetype v = maxInvalid; v >= minInvalid; --v) {
|
||||||
// 0x5a for 32-bit, 0x5b for 64-bit
|
// 0x5a for 32-bit, 0x5b for 64-bit
|
||||||
toolong[1] = sizeof(v) > 4 ? 0x5b : 0x5a;
|
toolong[0] = sizeof(v) > 4 ? 0x5b : 0x5a;
|
||||||
qToBigEndian(v, toolong + 2);
|
qToBigEndian(v, toolong + 1);
|
||||||
|
|
||||||
QTest::addRow("bytearray-too-big-for-qbytearray-%llx", v)
|
QTest::addRow("bytearray-too-big-for-qbytearray-%llx", v)
|
||||||
<< QByteArray(toolong, sizeof(toolong)) << 0 << CborErrorDataTooLarge;
|
<< QByteArray(toolong, sizeof(toolong)) << 0 << CborErrorDataTooLarge;
|
||||||
toolong[1] |= 0x20;
|
QTest::addRow("bytearray-chunked-too-big-for-qbytearray-%llx", v)
|
||||||
|
<< ('\x5f' + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
|
QTest::addRow("bytearray-2chunked-too-big-for-qbytearray-%llx", v)
|
||||||
|
<< ("\x5f\x40" + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
|
toolong[0] |= 0x20;
|
||||||
|
|
||||||
// QCborStreamReader::readString copies to a QByteArray first
|
// QCborStreamReader::readString copies to a QByteArray first
|
||||||
QTest::addRow("string-too-big-for-qbytearray-%llx", v)
|
QTest::addRow("string-too-big-for-qbytearray-%llx", v)
|
||||||
<< QByteArray(toolong, sizeof(toolong)) << 0 << CborErrorDataTooLarge;
|
<< QByteArray(toolong, sizeof(toolong)) << 0 << CborErrorDataTooLarge;
|
||||||
|
QTest::addRow("string-chunked-too-big-for-qbytearray-%llx", v)
|
||||||
|
<< ('\x7f' + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
|
QTest::addRow("string-2chunked-too-big-for-qbytearray-%llx", v)
|
||||||
|
<< ("\x7f\x60" + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1926,11 +1926,24 @@ void tst_QCborValue::validation_data()
|
|||||||
// Add QCborStreamReader-specific limitations due to use of QByteArray and
|
// Add QCborStreamReader-specific limitations due to use of QByteArray and
|
||||||
// QString, which are allocated by QArrayData::allocate().
|
// QString, which are allocated by QArrayData::allocate().
|
||||||
const qsizetype MaxInvalid = std::numeric_limits<QByteArray::size_type>::max();
|
const qsizetype MaxInvalid = std::numeric_limits<QByteArray::size_type>::max();
|
||||||
const qsizetype MinInvalid = MaxByteArraySize + 1;
|
const qsizetype MinInvalid = MaxByteArraySize + 1 - sizeof(QByteArray::size_type);
|
||||||
addValidationColumns();
|
addValidationColumns();
|
||||||
addValidationData(MinInvalid);
|
addValidationData(MinInvalid);
|
||||||
addValidationLargeData(MinInvalid, MaxInvalid);
|
addValidationLargeData(MinInvalid, MaxInvalid);
|
||||||
|
|
||||||
|
// Chunked strings whose total overflows the limit, but each individual
|
||||||
|
// chunk doesn't. 0x5a for 32-bit, 0x5b for 64-bit.
|
||||||
|
char toolong[1 + sizeof(qsizetype)];
|
||||||
|
toolong[0] = sizeof(MinInvalid) > 4 ? 0x5b : 0x5a;
|
||||||
|
qToBigEndian(MinInvalid - 1, toolong + 1);
|
||||||
|
QTest::addRow("bytearray-2chunked+1-too-big-for-qbytearray-%llx", MinInvalid)
|
||||||
|
<< ("\x5f\x41z" + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
|
toolong[0] |= 0x20;
|
||||||
|
QTest::addRow("string-2chunked+1-too-big-for-qbytearray-%llx", MinInvalid)
|
||||||
|
<< ("\x7f\x61z" + QByteArray(toolong, sizeof(toolong)) + '\xff')
|
||||||
|
<< 0 << CborErrorDataTooLarge;
|
||||||
|
|
||||||
// These tests say we have arrays and maps with very large item counts.
|
// These tests say we have arrays and maps with very large item counts.
|
||||||
// They are meant to ensure we don't pre-allocate a lot of memory
|
// They are meant to ensure we don't pre-allocate a lot of memory
|
||||||
// unnecessarily and possibly crash the application. The actual number of
|
// unnecessarily and possibly crash the application. The actual number of
|
||||||
|
@ -2,3 +2,4 @@
|
|||||||
rhel-6.6
|
rhel-6.6
|
||||||
rhel-7.4
|
rhel-7.4
|
||||||
rhel-7.6
|
rhel-7.6
|
||||||
|
sles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user