If it's an automatically triggered refresh, the first time it fails a likely
transient (no network, locking failed, init failed) error is not shown.
Details
Started zypper in the background, which locks the database.
Reset the timestamp to 0 and started the applet in plasmawindowed.
The first autorefresh error wasn't displayed, but the subsequent ones were.
After quitting zypper it refreshed successfully and the count was reset.
Diff Detail
- Repository
- R623 Plasma PackageKit Updater
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Save the comments, this looks reasonable to me.
src/declarative/pkupdates.cpp | ||
---|---|---|
491 | indentation | |
501 | maybe change this to: auto isTransientError = [] (PackageKit::Transaction::Error error) { return (error == PackageKit::Transaction::ErrorFailedInitialization) || (error == PackageKit::Transaction::ErrorNoNetwork) || (error == PackageKit::Transaction::ErrorCannotGetLock); }; ... if (failCount <= 1 && isTransientError(error) { ... } | |
507 | void function with return value. | |
src/declarative/pkupdates.h | ||
183–184 | The second parameter is missing documentation. Can you make at least the second parameter an enum, e.g. RefreshReason::Manual, RefreshReason::Automatic. Even with a comment I find it hard to read - is false /* manual */ the same as 'manual == false' or 'automatic == false, thus manual'. The first parameter should IMHO also be an enum, but I have not checked if this broke API/ABI. |
src/declarative/pkupdates.cpp | ||
---|---|---|
507 | Returning void explicitly is just fine :-) I'll remove it though. | |
src/declarative/pkupdates.h | ||
183–184 | This lib isn't public (or at least not supposed to be used), so ABI/API breakage doesn't really matter. I'll just add documentation, once the next option gets added I'll convert it into an enum. |
Save the comments, this looks reasonable to me.
Comments got addressed, so landing now