/*
* Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
#include "testplugin.h"
#include
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include
#else
#include
#endif
#include "uctestextras.h"
UT_USE_NAMESPACE
static QObject *registerExtras(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new UCTestExtras;
}
void TestPlugin::registerTypes(const char *uri)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
qmlRegisterModule(uri, 2, 0);
qmlRegisterSingletonType(uri, 2, 0, "TestExtras", registerExtras);
qmlRegisterSingletonType(uri, 2, 0, "MouseTouchAdaptor", MouseTouchAdaptor::registerQmlSingleton);
#else
qmlRegisterModule(uri, 0, 1);
qmlRegisterSingletonType(uri, 1, 0, "TestExtras", registerExtras);
qmlRegisterSingletonType(uri, 1, 0, "MouseTouchAdaptor", MouseTouchAdaptor::registerQmlSingleton);
#endif
}