2018-07-07 16:55:24 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2018-09-08 16:18:16 +00:00
|
|
|
#include "testqml.h"
|
2018-07-25 19:39:04 +00:00
|
|
|
#include "core/settings/qPref.h"
|
2018-07-07 16:55:24 +00:00
|
|
|
|
2018-09-08 16:18:16 +00:00
|
|
|
#include <QtQuickTest>
|
|
|
|
|
|
|
|
// main loosely copied from QUICK_TEST_MAIN_WITH_SETUP macro
|
2018-07-07 16:55:24 +00:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2019-12-28 21:12:48 +00:00
|
|
|
//#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
|
|
|
|
#ifndef THIS_IS_REPAIRED
|
2018-09-08 16:18:16 +00:00
|
|
|
return 0;
|
|
|
|
#else
|
2018-07-07 16:55:24 +00:00
|
|
|
QTEST_ADD_GPU_BLACKLIST_SUPPORT
|
|
|
|
QTEST_SET_MAIN_SOURCE_PATH
|
2018-09-08 16:18:16 +00:00
|
|
|
QMLTestSetup setup;
|
2018-07-07 16:55:24 +00:00
|
|
|
|
2018-09-08 16:18:16 +00:00
|
|
|
// register C++ types and classes (but not objects)
|
2019-04-03 21:28:26 +00:00
|
|
|
qPref::registerQML(NULL);
|
2018-07-07 16:55:24 +00:00
|
|
|
|
2018-09-08 16:18:16 +00:00
|
|
|
return quick_test_main_with_setup(argc, argv, "TestQML", nullptr, &setup);
|
|
|
|
#endif //QT_VERSION
|
2018-07-07 16:55:24 +00:00
|
|
|
}
|
2018-09-08 16:18:16 +00:00
|
|
|
|
|
|
|
void QMLTestSetup::qmlEngineAvailable(QQmlEngine *engine)
|
|
|
|
{
|
|
|
|
// register C++ objects (but not types and classes)
|
2019-04-03 21:28:26 +00:00
|
|
|
qPref::registerQML(engine);
|
2018-09-08 16:18:16 +00:00
|
|
|
};
|
|
|
|
|