зеркало из https://github.com/nextcloud/desktop.git
AccountState: Add helper to find navigation App
Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Родитель
b47adb7aeb
Коммит
3ae55c2555
|
@ -477,6 +477,18 @@ AccountAppList AccountState::appList() const
|
|||
return _apps;
|
||||
}
|
||||
|
||||
AccountApp* AccountState::findApp(const QString &appId) const
|
||||
{
|
||||
if(!appId.isEmpty()) {
|
||||
foreach(AccountApp *app, appList()) {
|
||||
if(app->id() == appId)
|
||||
return app;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
|
||||
AccountApp::AccountApp(const QString &name, const QUrl &url,
|
||||
|
|
|
@ -106,6 +106,7 @@ public:
|
|||
bool hasTalk() const;
|
||||
|
||||
AccountAppList appList() const;
|
||||
AccountApp* findApp(const QString &appId) const;
|
||||
|
||||
/** A user-triggered sign out which disconnects, stops syncs
|
||||
* for the account and forgets the password. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче