Commit 1942de87 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

kns: show the release date if the version isn't available

CCBUG: 417192
parent 10b9f259
......@@ -140,12 +140,13 @@ int KNSResource::size()
QString KNSResource::installedVersion() const
{
return m_entry.version();
return !m_entry.version().isEmpty() ? m_entry.version() : m_entry.releaseDate().toString();
}
QString KNSResource::availableVersion() const
{
return !m_entry.updateVersion().isEmpty() ? m_entry.updateVersion()
: m_entry.updateReleaseDate().isEmpty() ? m_entry.updateReleaseDate().toString()
: !m_entry.version().isEmpty() ? m_entry.version()
: releaseDate().toString();
}
......
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