- // FIXME: this needs to be a qobject_cast - therefore MonolithicApplication needs to be a proper QObject... :/
- MonolithicApplication *monoApp = static_cast<MonolithicApplication *>(QApplication::instance());
- if(monoApp) {
- qDebug() << "starting core...";
- monoApp->startInternalCore();
- monoApp->connectClientSyncer(clientSyncer);
+ if(!_internalAccountId.isValid()) {
+ _internalAccountId = findFreeAccountId();
+ QVariantMap data;
+ data["InternalAccount"] = true;
+ CoreAccountSettings accountSettings;
+ accountSettings.storeAccountData(_internalAccountId, data);