mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-07 09:45:25 +08:00
qt 6.6.0 clean
This commit is contained in:
@ -295,6 +295,7 @@ static int NColorRoles[] = {
|
||||
QPalette::PlaceholderText + 1, // Qt_5_12
|
||||
QPalette::PlaceholderText + 1, // Qt_5_13, Qt_5_14, Qt_5_15
|
||||
QPalette::PlaceholderText + 1, // Qt_6_0
|
||||
QPalette::Accent + 1, // Qt_6_6
|
||||
0 // add the correct value for Qt_5_14 here later
|
||||
};
|
||||
|
||||
@ -2392,8 +2393,8 @@ void tst_QDataStream::setVersion()
|
||||
*/
|
||||
|
||||
// revise the test if new color roles or color groups are added
|
||||
QVERIFY(QPalette::NColorRoles == QPalette::PlaceholderText + 1);
|
||||
QCOMPARE(int(QPalette::NColorGroups), 3);
|
||||
QCOMPARE(QPalette::NColorRoles, QPalette::Accent + 1);
|
||||
QCOMPARE(static_cast<int>(QPalette::NColorGroups), 3);
|
||||
|
||||
QByteArray ba2;
|
||||
QPalette pal1, pal2;
|
||||
|
@ -19,7 +19,7 @@ qt_internal_add_test(tst_qxmlstream
|
||||
tst_qxmlstream.cpp
|
||||
LIBRARIES
|
||||
Qt::Network
|
||||
Qt::GuiPrivate
|
||||
Qt::CorePrivate
|
||||
TESTDATA
|
||||
${test_data}
|
||||
${tokenError}
|
||||
|
@ -1,10 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QIODevice)
|
||||
QT_FORWARD_DECLARE_CLASS(QString)
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QFlags>
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
class QC14N
|
||||
{
|
||||
@ -93,18 +94,11 @@ bool QC14N::isAttributesEqual(const QXmlStreamReader &r1,
|
||||
|
||||
const QXmlStreamAttributes &attrs1 = r1.attributes();
|
||||
const QXmlStreamAttributes &attrs2 = r2.attributes();
|
||||
const int len = attrs1.size();
|
||||
|
||||
if(len != attrs2.size())
|
||||
if (attrs1.size() != attrs2.size())
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < len; ++i)
|
||||
{
|
||||
if(!attrs2.contains(attrs1.at(i)))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
auto existsInOtherList = [&attrs2](const auto &attr) { return attrs2.contains(attr); };
|
||||
return std::all_of(attrs1.cbegin(), attrs1.cend(), existsInOtherList);
|
||||
}
|
||||
|
||||
bool QC14N::isDifferent(const QXmlStreamReader &r1,
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <QXmlStreamReader>
|
||||
#include <QBuffer>
|
||||
#include <QStack>
|
||||
#include <QtGui/private/qzipreader_p.h>
|
||||
#include <private/qzipreader_p.h>
|
||||
|
||||
#include "qc14n.h"
|
||||
|
||||
@ -542,6 +542,7 @@ public:
|
||||
private slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void runTestSuite();
|
||||
void reportFailures() const;
|
||||
void reportFailures_data();
|
||||
void checkBaseline() const;
|
||||
@ -629,7 +630,14 @@ void tst_QXmlStream::initTestCase()
|
||||
QFile::remove(destinationPath); // copy will fail if file exists
|
||||
QVERIFY(QFile::copy(fileInfo.filePath(), destinationPath));
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QXmlStream::cleanupTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QXmlStream::runTestSuite()
|
||||
{
|
||||
QFile file(m_tempDir.filePath(catalogFile));
|
||||
QVERIFY2(file.open(QIODevice::ReadOnly),
|
||||
qPrintable(QString::fromLatin1("Failed to open the test suite catalog; %1").arg(file.fileName())));
|
||||
@ -637,10 +645,6 @@ void tst_QXmlStream::initTestCase()
|
||||
QVERIFY(m_handler.runTests(&file));
|
||||
}
|
||||
|
||||
void tst_QXmlStream::cleanupTestCase()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QXmlStream::reportFailures() const
|
||||
{
|
||||
QFETCH(bool, isError);
|
||||
@ -1292,6 +1296,14 @@ void tst_QXmlStream::hasAttribute() const
|
||||
// α is not representable in L1...
|
||||
QVERIFY(!atts.hasAttribute(QLatin1String("DOESNOTEXIST")));
|
||||
|
||||
/* string literals (UTF-8/16) */
|
||||
QVERIFY(atts.hasAttribute(u8"atträbute"));
|
||||
QVERIFY(atts.hasAttribute( u"atträbute"));
|
||||
QVERIFY(atts.hasAttribute(u8"α"));
|
||||
QVERIFY(atts.hasAttribute( u"α"));
|
||||
QVERIFY(!atts.hasAttribute(u8"β"));
|
||||
QVERIFY(!atts.hasAttribute( u"β"));
|
||||
|
||||
/* Test with an empty & null namespaces. */
|
||||
QVERIFY(atts.hasAttribute(QString(), QLatin1String("attr2"))); /* A null string. */
|
||||
QVERIFY(atts.hasAttribute(QLatin1String(""), QLatin1String("attr2"))); /* An empty string. */
|
||||
@ -1900,4 +1912,3 @@ void tst_QXmlStream::tokenErrorHandling() const
|
||||
}
|
||||
|
||||
#include "tst_qxmlstream.moc"
|
||||
// vim: et:ts=4:sw=4:sts=4
|
||||
|
Reference in New Issue
Block a user