Add the missing qRegisterProtobufTypes call to tests

qRegisterProtobufTypes needs to be called explicitly if test never
uses methods that call qRegisterProtobufTypes implicitly.

Change-Id: I98552ed6ca364a7620c69d4fdd3d84a635d318c0
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit c2eabf1726)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2022-12-30 15:59:34 +01:00 committed by Qt Cherry-pick Bot
parent 652e8b33f8
commit 900a5573bb
3 changed files with 12 additions and 0 deletions

View File

@ -18,6 +18,10 @@ class QtProtobufTypesGenerationTest : public QObject
{
Q_OBJECT
private slots:
void initTestCase()
{
qRegisterProtobufTypes();
}
void EmptyMessageTest();
void BoolMessageTest();
void IntMessageTest();

View File

@ -17,6 +17,10 @@ class QtProtobufMapTypesGenerationTest : public QObject
{
Q_OBJECT
private slots:
void initTestCase()
{
qRegisterProtobufTypes();
}
void SInt32StringMapMessageTest();
void StringStringMapMessageTest();

View File

@ -15,6 +15,10 @@ class QtProtobufRepeatedTypesGenerationTest : public QObject
{
Q_OBJECT
private slots:
void initTestCase()
{
qRegisterProtobufTypes();
}
void RepeatedStringMessageTest();
void RepeatedIntMessageTest();
void RepeatedDoubleMessageTest();