Commit 6e26b05f authored by Prajna Sariputra's avatar Prajna Sariputra
Browse files

Don't use the appdata version in the installed version string if empty

Otherwise the output becomes " (branch)" instead of just "branch" like
what the available version string would look like if the appdata version
is empty.
parent 4ef7939e
Pipeline #159078 passed with stage
in 2 minutes and 12 seconds
......@@ -231,7 +231,10 @@ QString FlatpakResource::installedVersion() const
if (auto ref = qobject_cast<FlatpakBackend *>(backend())->getInstalledRefForApp(this)) {
return i18nc("version (branch)", "%1 (%2)", flatpak_installed_ref_get_appdata_version(ref), version);
const char *appdataVersion = flatpak_installed_ref_get_appdata_version(ref);
if (appdataVersion) {
return i18nc("version (branch)", "%1 (%2)", appdataVersion, version);
return version;
Supports Markdown
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