Skip to content

Commit

Permalink
Continue working on STIG editing display
Browse files Browse the repository at this point in the history
  • Loading branch information
squinky86 committed Mar 11, 2020
1 parent 1feb8ef commit 7a2bb18
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/stigedit.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ STIGEdit::STIGEdit(STIG &stig, QWidget *parent) : TabViewWidget (parent),


ui->txtTitle->setText(stig.title); ui->txtTitle->setText(stig.title);
ui->txtDescription->setText(stig.description); ui->txtDescription->setText(stig.description);
ui->txtVersion->setText(QString::number(stig.version));
QString tmpRelease = stig.release;
if (tmpRelease.contains(QStringLiteral("Release: ")))
{
tmpRelease = tmpRelease.right(tmpRelease.size() - 9);
if (tmpRelease.contains(QStringLiteral(" ")))
{
ui->txtRelease->setText(tmpRelease.left(tmpRelease.indexOf(QStringLiteral(" "))));
}
}
if (tmpRelease.contains(QStringLiteral("Date: ")))
{
tmpRelease = tmpRelease.right(tmpRelease.size() - tmpRelease.indexOf(QStringLiteral("Date: ")) - 6);

QDate d = QDate::fromString(tmpRelease, QStringLiteral("dd MMM yyyy"));
ui->date->setDate(d);
}
} }


/** /**
Expand Down

0 comments on commit 7a2bb18

Please sign in to comment.