more correct fix for #57

This commit is contained in:
arcan1s
2015-07-19 00:14:49 +03:00
parent eb63ef5e96
commit c7d998eb12
18 changed files with 172 additions and 127 deletions

View File

@ -23,28 +23,10 @@
#include "awkeys.h"
static QObject *awactions_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new AWActions();
}
static QObject *awkeys_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new AWKeys();
}
void AWPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.awesomewidget"));
qmlRegisterSingletonType<AWActions>(uri, 1, 0, "AWActions", awactions_singletontype_provider);
qmlRegisterSingletonType<AWKeys>(uri, 1, 0, "AWKeys", awkeys_singletontype_provider);
qmlRegisterType<AWActions>(uri, 1, 0, "AWActions");
qmlRegisterType<AWKeys>(uri, 1, 0, "AWKeys");
}