summaryrefslogtreecommitdiffstats
path: root/application/widgets
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-30 23:30:55 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-30 23:30:55 +0200
commitac8ff8806137d3f6db35afe54b0ef777c40278ef (patch)
tree9f74debbd43705b9c52b80f9bf6a95928a9599d3 /application/widgets
parent477a1a88c6b7f5e5a78a2bbc4a6fe7781b2a0525 (diff)
downloadMultiMC-ac8ff8806137d3f6db35afe54b0ef777c40278ef.tar
MultiMC-ac8ff8806137d3f6db35afe54b0ef777c40278ef.tar.gz
MultiMC-ac8ff8806137d3f6db35afe54b0ef777c40278ef.tar.lz
MultiMC-ac8ff8806137d3f6db35afe54b0ef777c40278ef.tar.xz
MultiMC-ac8ff8806137d3f6db35afe54b0ef777c40278ef.zip
GH-729 use mod mmc_id as name when name is empty
Diffstat (limited to 'application/widgets')
-rw-r--r--application/widgets/MCModInfoFrame.cpp19
1 files changed, 12 insertions, 7 deletions
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 = "<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);
- if(m.description().isEmpty())
+ if (m.description().isEmpty())
{
setModDescription(tr("No description provided in mcmod.info"));
}