GH-729 use mod mmc_id as name when name is empty
This commit is contained in:
parent
477a1a88c6
commit
ac8ff88061
@ -30,12 +30,17 @@ void MCModInfoFrame::updateWithMod(Mod &m)
|
||||
|
||||
QString text = "";
|
||||
QString name = "";
|
||||
if(m.name().isEmpty()) name = m.mmc_id();
|
||||
else name = m.name();
|
||||
if (m.name().isEmpty())
|
||||
name = m.mmc_id();
|
||||
else
|
||||
name = m.name();
|
||||
|
||||
if(m.homeurl().isEmpty()) text = name;
|
||||
else text = "<a href=\"" + m.homeurl() + "\">" + name + "</a>";
|
||||
if(!m.authors().isEmpty()) text += " by " + m.authors();
|
||||
if (m.homeurl().isEmpty())
|
||||
text = name;
|
||||
else
|
||||
text = "<a href=\"" + m.homeurl() + "\">" + name + "</a>";
|
||||
if (!m.authors().isEmpty())
|
||||
text += " by " + m.authors();
|
||||
|
||||
setModText(text);
|
||||
|
||||
|
@ -57,6 +57,10 @@ public:
|
||||
}
|
||||
QString name() const
|
||||
{
|
||||
if(m_name.trimmed().isEmpty())
|
||||
{
|
||||
return m_mmc_id;
|
||||
}
|
||||
return m_name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user