Skip to content

Commit

Permalink
Merge pull request #66 from chriadam/libaccountsqt113
Browse files Browse the repository at this point in the history
[qmf] Update to libaccounts-qt version 1.13
  • Loading branch information
VDVsx committed Feb 3, 2015
2 parents 4fb106c + a0db44d commit b403d61
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions qmf/src/libraries/qmfclient/qmailstore_p.cpp
Expand Up @@ -3022,7 +3022,7 @@ QMailStorePrivate::QMailStorePrivate(QMailStore* parent)
QSharedPointer<Accounts::Account> QMailStorePrivate::getEmailAccount(const Accounts::AccountId id)
{
//get account from the manager
QSharedPointer<Accounts::Account> ssoAccount(manager->account(id));
QSharedPointer<Accounts::Account> ssoAccount(Accounts::Account::fromId(manager, id, this));

if (!ssoAccount) {
qWarning() << Q_FUNC_INFO << "Account with was not found" ;
Expand Down Expand Up @@ -10355,14 +10355,16 @@ bool QMailStorePrivate::deleteAccounts(const QMailAccountKey& key,
// Remove accounts from SSO
foreach (const QMailAccountId& accountID, deletedAccountIds) {

QSharedPointer<Accounts::Account> ssoAccount(manager->account(accountID.toULongLong()));
QSharedPointer<Accounts::Account> ssoAccount(Accounts::Account::fromId(manager, accountID.toULongLong(), this));

if (ssoAccount) {
ssoAccount->remove();
if (!ssoAccount->syncAndBlock())
if (!ssoAccount->syncAndBlock()) {
return false;
} else
}
} else {
SSOHandleError(manager->lastError());
}
}
}
#else
Expand Down Expand Up @@ -10754,7 +10756,7 @@ QMailAccountIdList QMailStorePrivate::searchSSOAccounts(const QMailAccountKey& k
QMailAccountIdList accountList;

foreach (const Accounts::AccountId& accountID, accountIDList) {
Accounts::Account* ssoAccount = manager->account(accountID);
Accounts::Account* ssoAccount = Accounts::Account::fromId(manager, accountID, const_cast<QMailStorePrivate*>(this));
if (!ssoAccount) {
SSOHandleError(manager->lastError());
continue;
Expand Down Expand Up @@ -10833,7 +10835,7 @@ void QMailStorePrivate::accountUpdated(Accounts::AccountId id)

bool QMailStorePrivate::accountValid(Accounts::AccountId id) const
{
QSharedPointer<Accounts::Account> account(manager->account(id));
QSharedPointer<Accounts::Account> account(Accounts::Account::fromId(manager, id, const_cast<QMailStorePrivate*>(this)));

if (!account) {
SSOHandleError(manager->lastError());
Expand Down
2 changes: 1 addition & 1 deletion qmf/src/libraries/qmfclient/ssosessionmanager.cpp
Expand Up @@ -132,7 +132,7 @@ bool SSOSessionManager::createSsoIdentity(const QMailAccountId &id, const QStrin
_accountId = id.toULongLong();

SSOAccountManager manager;
QScopedPointer<Accounts::Account> account(manager->account(static_cast<Accounts::AccountId>(_accountId)));
QScopedPointer<Accounts::Account> account(Accounts::Account::fromId(manager, static_cast<Accounts::AccountId>(_accountId), this));
if (!account)
return false;

Expand Down
2 changes: 1 addition & 1 deletion rpm/qmf-qt5.spec
Expand Up @@ -15,7 +15,7 @@ BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5Network)
#BuildRequires: pkgconfig(Qt5Webkit)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(accounts-qt5)
BuildRequires: pkgconfig(accounts-qt5) >= 1.13
BuildRequires: pkgconfig(libsignon-qt5)
BuildRequires: pkgconfig(keepalive)
BuildRequires: pkgconfig(qt5-boostable)
Expand Down

0 comments on commit b403d61

Please sign in to comment.