Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Discover
Commits
915676cc
Commit
915676cc
authored
Sep 24, 2021
by
Timothée Ravier
Browse files
rpm-ostree: Do not use os-release pretty name
parent
43fbb798
Changes
2
Hide whitespace changes
Inline
Side-by-side
libdiscover/backends/RpmOstreeBackend/RpmOstreeResource.cpp
View file @
915676cc
...
...
@@ -51,7 +51,6 @@ RpmOstreeResource::RpmOstreeResource(const QVariantMap &map, RpmOstreeBackend *p
// We can directly read the pretty name & variant from os-release
// information if this is the currently booted deployment.
auto
osrelease
=
AppStreamIntegration
::
global
()
->
osRelease
();
m_prettyname
=
osrelease
->
prettyName
();
m_name
=
osrelease
->
name
();
m_variant
=
osrelease
->
variant
();
}
...
...
@@ -253,15 +252,7 @@ QString RpmOstreeResource::longDescription()
QString
RpmOstreeResource
::
name
()
const
{
// If we are the currently booted deployment then we have a pretty name
if
(
m_prettyname
!=
""
)
{
return
m_prettyname
;
}
// Otherwise construct one from what we have
// TODO: Remove hardcoded values
QString
name
;
QTextStream
(
&
name
)
<<
"Fedora Linux "
<<
m_version
<<
" (Kinoite)"
;
return
name
;
return
QStringLiteral
(
"%1 %2"
).
arg
(
packageName
(),
m_version
);
}
QString
RpmOstreeResource
::
origin
()
const
...
...
libdiscover/backends/RpmOstreeBackend/RpmOstreeResource.h
View file @
915676cc
...
...
@@ -81,7 +81,6 @@ Q_SIGNALS:
void
buttonPressed
(
QString
);
private:
QString
m_prettyname
;
QString
m_name
;
QString
m_variant
;
QString
m_osname
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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