Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Discover
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Discover
Commits
61f520f9
Commit
61f520f9
authored
Jan 15, 2018
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract the version number from the AppStream information
BUG: 388968
parent
718483ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
libdiscover/backends/FlatpakBackend/FlatpakResource.cpp
libdiscover/backends/FlatpakBackend/FlatpakResource.cpp
+10
-5
No files found.
libdiscover/backends/FlatpakBackend/FlatpakResource.cpp
View file @
61f520f9
...
...
@@ -41,6 +41,7 @@
#include <QNetworkRequest>
#include <QStringList>
#include <QTimer>
#include <AppStreamQt/release.h>
static
QString
iconCachePath
(
const
AppStream
::
Icon
&
icon
)
{
...
...
@@ -100,13 +101,17 @@ QList<PackageState> FlatpakResource::addonsInformation()
QString
FlatpakResource
::
availableVersion
()
const
{
// TODO check if there is actually version available
QString
version
=
branch
();
if
(
version
.
isEmpty
())
{
version
=
i18n
(
"Unknown"
);
QString
theBranch
=
branch
();
if
(
theBranch
.
isEmpty
())
{
theBranch
=
i18n
(
"Unknown"
);
}
return
version
;
if
(
!
m_appdata
.
releases
().
isEmpty
())
{
auto
release
=
m_appdata
.
releases
().
last
();
return
i18n
(
"%1 (%2)"
,
release
.
version
(),
theBranch
);
}
return
theBranch
;
}
QString
FlatpakResource
::
appstreamId
()
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment