lrc: adapt to API changes
Tuleap: #44
Change-Id: I0b005b7019d204e049a280819aac5f29558cafea
diff --git a/src/RingWizardWC.mm b/src/RingWizardWC.mm
index 5377104..2aa7ca8 100644
--- a/src/RingWizardWC.mm
+++ b/src/RingWizardWC.mm
@@ -62,11 +62,11 @@
[self.window setLevel:NSStatusWindowLevel];
[self.window makeMainWindow];
if(![self checkForRingAccount]) {
- accountToCreate = AccountModel::instance()->add("", Account::Protocol::RING);
+ accountToCreate = AccountModel::instance().add("", Account::Protocol::RING);
} else {
[indicationLabel setStringValue:NSLocalizedString(@"Ring is already ready to work",
@"Display message to user")];
- auto accList = AccountModel::instance()->getAccountsByProtocol(Account::Protocol::RING);
+ auto accList = AccountModel::instance().getAccountsByProtocol(Account::Protocol::RING);
[self displayHash:accList[0]->username().toNSString()];
}
@@ -77,9 +77,9 @@
- (BOOL) checkForRingAccount
{
- for (int i = 0 ; i < AccountModel::instance()->rowCount() ; ++i) {
- QModelIndex idx = AccountModel::instance()->index(i);
- Account* acc = AccountModel::instance()->getAccountByModelIndex(idx);
+ for (int i = 0 ; i < AccountModel::instance().rowCount() ; ++i) {
+ QModelIndex idx = AccountModel::instance().index(i);
+ Account* acc = AccountModel::instance().getAccountByModelIndex(idx);
if(acc->protocol() == Account::Protocol::RING) {
return YES;
}
@@ -116,7 +116,7 @@
[indicationLabel setStringValue:NSLocalizedString(@"Just a moment...",
@"Indication for user")];
- QModelIndex qIdx = AccountModel::instance()->protocolModel()->selectionModel()->currentIndex();
+ QModelIndex qIdx = AccountModel::instance().protocolModel()->selectionModel()->currentIndex();
[self setCallback];
if (isExpanded) {
@@ -149,7 +149,7 @@
- (void) setCallback
{
- QObject::connect(AccountModel::instance(),
+ QObject::connect(&AccountModel::instance(),
&AccountModel::accountStateChanged,
[=](Account *account, const Account::RegistrationState state) {
NSLog(@"Account created!");