From ac8ff8806137d3f6db35afe54b0ef777c40278ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 30 Sep 2015 23:30:55 +0200 Subject: GH-729 use mod mmc_id as name when name is empty --- application/widgets/MCModInfoFrame.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'application/widgets') diff --git a/application/widgets/MCModInfoFrame.cpp b/application/widgets/MCModInfoFrame.cpp index 2f859ed3..0ec1376d 100644 --- a/application/widgets/MCModInfoFrame.cpp +++ b/application/widgets/MCModInfoFrame.cpp @@ -22,7 +22,7 @@ void MCModInfoFrame::updateWithMod(Mod &m) { - if(m.type() == m.MOD_FOLDER) + if (m.type() == m.MOD_FOLDER) { clear(); return; @@ -30,16 +30,21 @@ 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 = "" + name + ""; - if(!m.authors().isEmpty()) text += " by " + m.authors(); + if (m.homeurl().isEmpty()) + text = name; + else + text = "" + name + ""; + if (!m.authors().isEmpty()) + text += " by " + m.authors(); setModText(text); - if(m.description().isEmpty()) + if (m.description().isEmpty()) { setModDescription(tr("No description provided in mcmod.info")); } -- cgit v1.2.3