mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Use asserts to check validity of pointers in private impl of fileproviderdomainmanager
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
30b453f85e
commit
bc3fecfb08
1 changed files with 8 additions and 0 deletions
|
@ -123,6 +123,10 @@ class FileProviderDomainManager::Private {
|
|||
|
||||
void addFileProviderDomain(const AccountState * const accountState)
|
||||
{
|
||||
Q_ASSERT(accountState);
|
||||
const auto account = accountState->account();
|
||||
Q_ASSERT(account);
|
||||
|
||||
const auto domainDisplayName = domainDisplayNameForAccount(account);
|
||||
const auto domainId = domainIdentifierForAccount(account);
|
||||
|
||||
|
@ -150,6 +154,9 @@ class FileProviderDomainManager::Private {
|
|||
|
||||
void removeFileProviderDomain(const AccountState * const accountState)
|
||||
{
|
||||
Q_ASSERT(accountState);
|
||||
const auto account = accountState->account();
|
||||
Q_ASSERT(account);
|
||||
|
||||
const auto domainId = domainIdentifierForAccount(account);
|
||||
qCDebug(lcMacFileProviderDomainManager) << "Removing file provider domain with id: " << domainId;
|
||||
|
@ -230,6 +237,7 @@ class FileProviderDomainManager::Private {
|
|||
|
||||
void signalEnumeratorChanged(const Account * const account)
|
||||
{
|
||||
Q_ASSERT(account);
|
||||
const auto domainId = domainIdentifierForAccount(account);
|
||||
|
||||
qCDebug(lcMacFileProviderDomainManager) << "Signalling enumerator changed in file provider domain for account with id: " << domainId;
|
||||
|
|
Loading…
Reference in a new issue