Commit b18b43d9 authored by Matthias Fuchs's avatar Matthias Fuchs
Browse files

KNS3 correctly stores updated entries as installed.

* AtticaProvider also changes the cachedEntry in (!) the cache and it does that for Installed and for Updateable entries.
The later is important, since sometimes updates are not done.
* Installation only stores updateReleaseDate if it is valid.

CCBUG:256473
FIXED-IN:4.6.2
(cherry picked from commit 5627f9a9)
parent 3d44cb1f
......@@ -385,9 +385,9 @@ EntryInternal AtticaProvider::entryFromAtticaContent(const Attica::Content& cont
int index = mCachedEntries.indexOf(entry);
if (index >= 0) {
EntryInternal cacheEntry = mCachedEntries.at(index);
EntryInternal &cacheEntry = mCachedEntries[index];
// check if updateable
if ((cacheEntry.status() == Entry::Installed) &&
if (((cacheEntry.status() == Entry::Installed) || (cacheEntry.status() == Entry::Updateable)) &&
((cacheEntry.version() != entry.version()) || (cacheEntry.releaseDate() != entry.releaseDate()))) {
cacheEntry.setStatus(Entry::Updateable);
cacheEntry.setUpdateVersion(entry.version());
......
......@@ -304,7 +304,7 @@ void Installation::install(KNS3::EntryInternal entry, const QString& downloadedF
if (!entry.updateVersion().isEmpty()) {
entry.setVersion(entry.updateVersion());
}
if (!entry.updateReleaseDate().isValid()) {
if (entry.updateReleaseDate().isValid()) {
entry.setReleaseDate(entry.updateReleaseDate());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment