Commit 6f215a09 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈
Browse files

Clean up the plugin code (just for ease of reading and whatnot)

parent fed0cb2b
......@@ -18,25 +18,35 @@
*************************************************************************************/
#include "kaccountsdeclarativeplugin.h"
#include "createaccountjob.h"
#include "accountservicetogglejob.h"
#include "removeaccountjob.h"
#include "accountsmodel.h"
#include "servicesmodel.h"
#include "providersmodel.h"
#include "accountservicetogglejob.h"
#include "changeaccountdisplaynamejob.h"
#include "servicesmodel.h"
#include "createaccountjob.h"
#include "removeaccountjob.h"
#include <qqml.h>
void KAccountsDeclarativePlugin::registerTypes(const char* uri)
{
qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccount");
qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggle");
qmlRegisterType<RemoveAccountJob>(uri, 1, 2, "RemoveAccountJob");
qmlRegisterType<ProvidersModel>(uri, 1, 2, "ProvidersModel");
qmlRegisterType<AccountsModel>(uri, 1, 2, "AccountsModel");
qmlRegisterType<ServicesModel>(uri, 1, 2, "ServicesModel");
qmlRegisterType<CreateAccountJob>(uri, 1, 0, "CreateAccountJob");
qmlRegisterType<AccountServiceToggleJob>(uri, 1, 1, "AccountServiceToggleJob");
qmlRegisterType<ChangeAccountDisplayNameJob>(uri, 1, 2, "ChangeAccountDisplayNameJob");
qmlRegisterType<AccountServiceToggleJob>(uri, 1, 2, "AccountServiceToggleJob");
// Version 1.0
// Consider this registration deprecated - use the one named ...Job below instead
qmlRegisterType<CreateAccountJob>( uri, 1, 0, "CreateAccount");
// Version 1.1
// Consider this registration deprecated - use the one named ...Job below instead
qmlRegisterType<AccountServiceToggleJob>( uri, 1, 1, "AccountServiceToggle");
// Version 1.2
qmlRegisterType<AccountsModel>( uri, 1, 2, "AccountsModel");
qmlRegisterType<ProvidersModel>( uri, 1, 2, "ProvidersModel");
qmlRegisterType<ServicesModel>( uri, 1, 2, "ServicesModel");
qmlRegisterType<AccountServiceToggleJob>( uri, 1, 2, "AccountServiceToggleJob");
qmlRegisterType<ChangeAccountDisplayNameJob>( uri, 1, 2, "ChangeAccountDisplayNameJob");
qmlRegisterType<CreateAccountJob>( uri, 1, 2, "CreateAccountJob");
qmlRegisterType<RemoveAccountJob>( uri, 1, 2, "RemoveAccountJob");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment