Allow the user to silence some sync warnings

Review Request #130051 - Created March 26, 2017 and updated

Information
Albert Astals Cid
kdepim-runtime
377553
Reviewers
kdepim
mkoller

One user has complained that an error dialog pops up when the server can't be contacted (e.g. behind a vpn or something)

First i thought of not showing the error for ERR_UNKNOWN_HOST errors, but then i thought it would make sense to be notified at least once if you wrote the address wrong, so i went for the "don't show me again" route.


  
Martin Koller

Personally this at least solves my issue. Thanks for this.
Still I wonder why this is only done in the POP resource and not (or different) in others.
This is inconsistent.

Also I think it should not be up to the resource to decide HOW an error or warning is displayed.
AFAIK therefore the Akonadi::AgentBase signals like
void warning (const QString &message)
void error (const QString &message)
are available.

  1. Those messages end up in some log that noone will see.

    As i already said, if yahoo fails to log me in with an error that says "You need to log in the webpage first because we don't like you" (google gives similar errors) we need to show them to the user.

  2. s/Those messages/Those methods

  3. How we can reactivate after that theses messagebox ?
    Albert is right it's important to see theses warning/error otherwise we don't know why there is a problem and it's difficult to debug it.

  4. How we can reactivate after that theses messagebox ?

    You have to edit the config file like in all "Don't show me again".

    Note the "Don't show me again" is per error type and server, so if you press "Don't show me again" in a "Could not connect to host" error, it will still show an error in a "failed login because the server is weird" case, so i think it's ok.

    Eventually it would be nice to have a generic solution to be able to reenable the "Don't show me again" messages, but i think it's out of scope for this.

  5. We still need to clear the flag after the connection is succesfully established, otherwise the user won't ever again be warned about it, which is not desirable, so then you should call KMessageBox::enableMessage(), probably in loginJobResult() before calling advanceStep().

  6. Well the user clearly said he didn't want to be notified about it, given the "ignore me" is per server and per error i don't see why we need to reenable it.

  7. I am totally OK with not repeating the error message a gazillion times in succession. But once you succesfully connect, and then the server starts failing again, you should get the notification again once. Or would you rather not know your POP3 is not working and possibly miss an important email?

    Alternatively, Martin suggested using a KNotifications instead which are less obtrusive than a message box.

  8. I wouldn't have pressed the "ignore" button. It seems this is not wanted, i'll guess i'll discard this and let people propose a better solution.

Loading...