From c7cc32f1d493a0b6349ea089a2a99107fb29f1b7 Mon Sep 17 00:00:00 2001 From: robotbrainify Date: Sat, 12 Oct 2013 13:59:14 -0400 Subject: [PATCH] Indent fixing! --- gui/MCModInfoFrame.cpp | 68 +++++++++++++++++++++--------------------- 1 file 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("" + finaltext.left(287) + "..."); - 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("" + finaltext.left(287) + "..."); + 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(); }