Fix update scenarios with no explicit downloadlink selected

Authored by leinir on Mar 17 2020, 12:43 PM.

Description

Fix update scenarios with no explicit downloadlink selected

Summary:
The old downloadwidget's update system would explicitly require a user
to pick which download item to use for updating if there was more than
one available. This work is an attempt at implementing this at the
engine level, while also allowing for there to be no requirement to
make an active choice, unless there is no way to deduce which of
the various potential download items is the one we are trying to
update.

The current heuristics are:

  • If there is one downloaditem, that's what we're updating
  • If there are more, first try and see if one has the precise url as the previously installed payload
  • If that fails, check for filename matches (without the rest of the url)
  • Only if that fails, present the user with a choice

Add an explicit update function in the QtQuick items model

Fix erroneous uses of installItem, and use updateItem for updates
in the QtQuick components

BUG:417510

Reviewers: KNewStuff, Frameworks, Plasma, ngraham, apol, Discover Software Store, ahiemstra

Reviewed By: ngraham, ahiemstra

Subscribers: ahiemstra, alexde, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D27544

Details

Committed
leinirMar 19 2020, 10:34 AM
Reviewer
ngraham
Differential Revision
D27544: Fix update scenarios with no explicit downloadlink selected
Parents
R304:707ef3173654: GIT_SILENT Upgrade KF5 version to 5.69.0.
Branches
Unknown
Tags
Unknown