summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobotbrainify <robotbrainify@gmail.com>2013-10-12 13:59:14 -0400
committerrobotbrainify <robotbrainify@gmail.com>2013-10-12 13:59:14 -0400
commitc7cc32f1d493a0b6349ea089a2a99107fb29f1b7 (patch)
tree252eaf9c8eabf128340f83e2d5454ba77aae4777
parent4c64c3c612149cd392cef8b704fc30682f8127e6 (diff)
downloadMultiMC-c7cc32f1d493a0b6349ea089a2a99107fb29f1b7.tar
MultiMC-c7cc32f1d493a0b6349ea089a2a99107fb29f1b7.tar.gz
MultiMC-c7cc32f1d493a0b6349ea089a2a99107fb29f1b7.tar.lz
MultiMC-c7cc32f1d493a0b6349ea089a2a99107fb29f1b7.tar.xz
MultiMC-c7cc32f1d493a0b6349ea089a2a99107fb29f1b7.zip
Indent fixing!
-rw-r--r--gui/MCModInfoFrame.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/gui/MCModInfoFrame.cpp b/gui/MCModInfoFrame.cpp
index a31502d3..b3f4ca5b 100644
--- a/gui/MCModInfoFrame.cpp
+++ b/gui/MCModInfoFrame.cpp
@@ -41,7 +41,7 @@ void MCModInfoFrame::updateWithMod(Mod &m)
setModDescription(tr("No description provided in mcmod.info"));
}
else
- {
+ {
setModDescription(m.description());
}
}
@@ -71,40 +71,40 @@ void MCModInfoFrame::setModText(QString text)
void MCModInfoFrame::setModDescription(QString text)
{
- ui->label_ModDescription->setToolTip("");
- QString intermediatetext = text.trimmed();
- bool prev(false);
- QChar rem('\n');
- QString finaltext;
- finaltext.reserve(intermediatetext.size());
- foreach(const QChar& c, intermediatetext)
- {
- if(c == rem && prev){
- continue;
- }
- prev = c == rem;
- finaltext += c;
- }
- QString labeltext;
- labeltext.reserve(300);
- if(finaltext.length() > 290)
- {
- ui->label_ModDescription->setOpenExternalLinks(false);
- ui->label_ModDescription->setTextFormat(Qt::TextFormat::RichText);
- desc = text;
- labeltext.append("<html><body>" + finaltext.left(287) + "<a href=\"#mod_desc\">...</a></body></html>");
- QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler);
- }
- else
- {
- ui->label_ModDescription->setTextFormat(Qt::TextFormat::PlainText);
- labeltext.append(finaltext);
- }
- ui->label_ModDescription->setText(labeltext);
+ ui->label_ModDescription->setToolTip("");
+ QString intermediatetext = text.trimmed();
+ bool prev(false);
+ QChar rem('\n');
+ QString finaltext;
+ finaltext.reserve(intermediatetext.size());
+ foreach(const QChar& c, intermediatetext)
+ {
+ if(c == rem && prev){
+ continue;
+ }
+ prev = c == rem;
+ finaltext += c;
+ }
+ QString labeltext;
+ labeltext.reserve(300);
+ if(finaltext.length() > 290)
+ {
+ ui->label_ModDescription->setOpenExternalLinks(false);
+ ui->label_ModDescription->setTextFormat(Qt::TextFormat::RichText);
+ desc = text;
+ labeltext.append("<html><body>" + finaltext.left(287) + "<a href=\"#mod_desc\">...</a></body></html>");
+ QObject::connect(ui->label_ModDescription, &QLabel::linkActivated, this, &MCModInfoFrame::modDescEllipsisHandler);
+ }
+ else
+ {
+ ui->label_ModDescription->setTextFormat(Qt::TextFormat::PlainText);
+ labeltext.append(finaltext);
+ }
+ ui->label_ModDescription->setText(labeltext);
}
void MCModInfoFrame::modDescEllipsisHandler(const QString &link)
{
- QMessageBox msgbox;
- msgbox.setText(desc);
- msgbox.exec();
+ QMessageBox msgbox;
+ msgbox.setText(desc);
+ msgbox.exec();
}