Use QString::replace(QChar, QString) in place of QString::replace(QRegEx, QString) in LogWidget::appendSLog
ClosedPublic

Authored by rizzitello on Jun 3 2019, 7:55 PM.

Diff Detail

Repository
R232 AtCore
Branch
noRegEx
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12886
Build 12904: arc lint + arc unit
rizzitello requested review of this revision.Jun 3 2019, 7:55 PM
rizzitello created this revision.
rizzitello edited the summary of this revision. (Show Details)Jun 3 2019, 7:57 PM
rizzitello added a subscriber: Atelier: AtCore.
tcanabrava added inline comments.Jun 3 2019, 8:06 PM
src/widgets/logwidget.h
85–86 ↗(On Diff #59094)

please declare static class variables in a unamed namespace in the cpp file:

namespace {

constexpr char newLine = '\n';
constexpr char return = '\r';

}

also, use constexpr for compile time constants.

patrickelectric accepted this revision.Jun 3 2019, 8:09 PM
This revision is now accepted and ready to land.Jun 3 2019, 8:09 PM
rizzitello updated this revision to Diff 59567.Jun 11 2019, 1:08 AM
  • Use anon namespace as tomaz suggested
rizzitello marked an inline comment as done.Jun 11 2019, 1:08 AM
rizzitello updated this revision to Diff 59917.Jun 16 2019, 2:40 PM
  • remove new empty line
rizzitello closed this revision.Jun 16 2019, 2:55 PM