Fix MSVC compiler warning in code snippets

Fixes
 warning C5046: 'testObject::MyTestObject::toString': Symbol involving type with internal linkage not defined

Change-Id: I9925eb15e262f29e636c019c87311a6ea2c47505
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
Kai Köhne 2021-06-07 08:47:00 +02:00
parent 6ab665b9f3
commit a880c791ec

View File

@ -158,11 +158,9 @@ QTEST_MAIN(TestQString)
void testObject()
{
class MyTestObject: public QObject
{
public:
void toString();
};
class MyTestObject : public QObject
{
};
//! [18]
MyTestObject test1;
QTest::qExec(&test1);