Fix DXF test.
This commit is contained in:
parent
7cc560fd31
commit
a85595ef3d
|
@ -142,6 +142,7 @@ auto VTextCodec::availableCodecs() -> QList<QByteArray>
|
||||||
while (i != codecs.constEnd())
|
while (i != codecs.constEnd())
|
||||||
{
|
{
|
||||||
names.append(ConstFirst(i.value()).toLatin1());
|
names.append(ConstFirst(i.value()).toLatin1());
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
|
|
|
@ -75,6 +75,7 @@ void TST_DXF::initTestCase()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TST_DXF::TestCodecPage_data()
|
void TST_DXF::TestCodecPage_data()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QTest::addColumn<QString>("locale");
|
QTest::addColumn<QString>("locale");
|
||||||
|
|
||||||
QStringList locales = SupportedLocales();
|
QStringList locales = SupportedLocales();
|
||||||
|
@ -83,11 +84,13 @@ void TST_DXF::TestCodecPage_data()
|
||||||
{
|
{
|
||||||
QTest::newRow(locale.toLatin1()) << locale;
|
QTest::newRow(locale.toLatin1()) << locale;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TST_DXF::TestCodecPage()
|
void TST_DXF::TestCodecPage()
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
QFETCH(QString, locale);
|
QFETCH(QString, locale);
|
||||||
|
|
||||||
static QMap <QString, QString> locMap = LocaleMap();
|
static QMap <QString, QString> locMap = LocaleMap();
|
||||||
|
@ -122,4 +125,7 @@ void TST_DXF::TestCodecPage()
|
||||||
|
|
||||||
QVERIFY2(codec != nullptr, qUtf8Printable(QStringLiteral("No codec for dxf codepage %1 found.")
|
QVERIFY2(codec != nullptr, qUtf8Printable(QStringLiteral("No codec for dxf codepage %1 found.")
|
||||||
.arg(dxfCodePage)));
|
.arg(dxfCodePage)));
|
||||||
|
#else
|
||||||
|
QSKIP("No full support for old codecs since Qt6.");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,13 +30,12 @@
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include "../vmisc/defglobal.h"
|
|
||||||
|
|
||||||
class TST_DXF :public QObject
|
class TST_DXF :public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT // NOLINT
|
Q_OBJECT // NOLINT
|
||||||
public:
|
public:
|
||||||
explicit TST_DXF(QObject *parent = nullptr);
|
explicit TST_DXF(QObject *parent = nullptr);
|
||||||
|
~TST_DXF() = default;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user