123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #include <QtQuickTest>
- #include <QQmlEngine>
- #include <QQmlContext>
- #include <QQmlExtensionPlugin>
- #include "simpletest.qpb.h"
- using namespace qtprotobufnamespace::tests;
- class TestSetup : public QObject {
- Q_OBJECT
- public:
- TestSetup() {
- QtProtobuf::qRegisterProtobufTypes();
- Q_PROTOBUF_IMPORT_QUICK_PLUGIN()
- }
- ~TestSetup() = default;
- public slots:
- void qmlEngineAvailable(QQmlEngine *engine)
- {
- engine->rootContext()->setContextProperty("qVersion", QT_VERSION);
- }
- };
|