mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Show systray error message when there is a network error.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
9dbf43c6fd
commit
1b305e4c6a
2 changed files with 11 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "networkjobs.h"
|
||||
#include "clientproxy.h"
|
||||
#include <creds/abstractcredentials.h>
|
||||
#include "systray.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
|
@ -328,7 +329,15 @@ void ConnectionValidator::reportConnected() {
|
|||
void ConnectionValidator::reportResult(Status status)
|
||||
{
|
||||
emit connectionResult(status, _errors);
|
||||
showSystrayErrorMessage();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void ConnectionValidator::showSystrayErrorMessage()
|
||||
{
|
||||
Systray::instance()->showMessage(tr("Network Error"),
|
||||
_errors.join("<br>"),
|
||||
QSystemTrayIcon::Warning);
|
||||
}
|
||||
|
||||
} // namespace OCC
|
||||
|
|
|
@ -146,6 +146,8 @@ private:
|
|||
AccountStatePtr _accountState;
|
||||
AccountPtr _account;
|
||||
bool _isCheckingServerAndAuth = false;
|
||||
|
||||
void showSystrayErrorMessage();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue