Small bug fixes for Salt Package manager

Download URL's and documentation URL's have not
been shown properly in the package preview.
This commit is contained in:
Matthias Koefferlein 2018-04-30 23:24:32 +02:00
parent 080623ad15
commit 2454104346
2 changed files with 4 additions and 1 deletions

View File

@ -278,7 +278,7 @@ SaltGrainDetailsTextWidget::details_text ()
if (! g->url ().empty ()) {
stream << "<p><b>" << QObject::tr ("Download URL: ") << "</b>" << tl::to_qstring (tl::escaped_to_html (g->url ())) << "</p>";
}
if (! g->installed_time ().isNull ()) {
if (! g->path ().empty () && ! g->installed_time ().isNull ()) {
stream << "<p><b>" << QObject::tr ("Installed: ") << "</b>" << g->installed_time ().toString () << "</p>";
}
if (! g->dependencies ().empty ()) {

View File

@ -1005,7 +1005,10 @@ SaltManagerDialog::data_ready ()
return;
}
// Load the grain file (save URL as it is overwritten by the grain.xml content)
std::string url = m_downloaded_grain->url ();
m_downloaded_grain->load (*m_downloaded_grain_reader);
m_downloaded_grain->set_url (url);
try {