mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #8028 from nextcloud/backport/8027/stable-3.16
[stable-3.16] gui/macOS: Avoid UB in edge cases where there is no matching accountstate for a domain
This commit is contained in:
commit
b234cd2e2f
@ -27,6 +27,12 @@
|
||||
#include "gui/accountmanager.h"
|
||||
#include "libsync/account.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcMacFileProviderDomainManager, "nextcloud.gui.macfileproviderdomainmanager", QtInfoMsg)
|
||||
|
||||
}
|
||||
|
||||
// Ensure that conversion to/from domain identifiers and display names
|
||||
// are consistent throughout these classes
|
||||
namespace {
|
||||
@ -118,7 +124,8 @@ QString accountIdFromDomainId(NSString * const domainId)
|
||||
return account->userIdAtHostWithPort();
|
||||
}
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
qCWarning(OCC::lcMacFileProviderDomainManager) << "Could not find account id for domain id:" << qDomainId;
|
||||
return {};
|
||||
}
|
||||
|
||||
API_AVAILABLE(macos(11.0))
|
||||
@ -131,8 +138,6 @@ inline QString accountIdFromDomain(NSFileProviderDomain * const domain)
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcMacFileProviderDomainManager, "nextcloud.gui.macfileproviderdomainmanager", QtInfoMsg)
|
||||
|
||||
namespace Mac {
|
||||
|
||||
class API_AVAILABLE(macos(11.0)) FileProviderDomainManager::MacImplementation
|
||||
|
||||
Loading…
Reference in New Issue
Block a user