Fix update auto selection
ClosedPublic

Authored by leinir on Apr 27 2020, 9:39 AM.

Details

Summary

The new autoselection for updating installed entries would firstly
not be looking at the right amount of download links, and further it
would not be able to identify the links it needed to, as it did not
look at the descriptive names (where the filename is often stored),
which then would not match. These changes ensure that we look at
the right bits of information when doing this check. End result is
that updating works.

  • Ensure that the cache doesn't forget installing and updating items
  • Analyse more of the download link information, and use correct counts

BUG:419959

Test Plan

Find an item in some KNS dialog in need of updating, and click the Update button

On the console, when launched using the correct logging categories, will
tell you about the selection process (and the UI will show that an update
is in progress, and eventually that it is completed). To do this check with
the icons kcm, run it like so:

QT_LOGGING_RULES="org.kde.knewstuff*=true" kcmshell5 kcm_icons

Diff Detail

Repository
R304 KNewStuff
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
leinir created this revision.Apr 27 2020, 9:39 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 27 2020, 9:39 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
leinir requested review of this revision.Apr 27 2020, 9:39 AM
leinir edited the summary of this revision. (Show Details)Apr 27 2020, 9:40 AM

Are you on a case-insensitive filesystem? 👅:p

/home/nate/kde/src/knewstuff/src/core/engine.cpp: In member function ‘void KNSCore::Engine::downloadLinkLoaded(const KNSCore::EntryInternal&)’:
/home/nate/kde/src/knewstuff/src/core/engine.cpp:650:91: error: ‘filename’ was not declared in this scope; did you mean ‘fileName’?
  650 |                         qCDebug(KNEWSTUFFCORE) << "Found a suitable download link for" << filename << "which should match" << identifiedLink;
      |                                                                                           ^~~~~~~~
      |                                                                                           fileName
leinir updated this revision to Diff 81412.Apr 28 2020, 7:33 AM

Thanks @ngraham, learn me to add debug information and then forget to commit it :P

  • Compile...
mart accepted this revision.May 4 2020, 10:32 AM
This revision is now accepted and ready to land.May 4 2020, 10:32 AM
This revision was automatically updated to reflect the committed changes.