Skip to content

Commit

Permalink
Revert change in timestamp formatting as the new code would sometimes…
Browse files Browse the repository at this point in the history
… malfunction on Windows.
  • Loading branch information
collin80 committed Mar 31, 2019
1 parent 3e4e9ac commit 9596d24
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions canframemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,7 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
switch (Column(index.column()))
{
case Column::TimeStamp:
//Reformatting the output a bit with custom code
ts = Utility::formatTimestamp(thisFrame.timestamp);
if (ts.type() == QVariant::Double) return QString::number(ts.toDouble(), 'f', 5); //never scientific notation, 5 decimal places
if (ts.type() == QVariant::LongLong) return QString::number(ts.toLongLong()); //never scientific notion, all digits shown
if (ts.type() == QVariant::DateTime) return ts.toDateTime().toString(timeFormat); //custom set format for dates and times
return Utility::formatTimestamp(thisFrame.timestamp);
case Column::FrameId:
return Utility::formatCANID(thisFrame.ID, thisFrame.extended);
case Column::Extended:
Expand Down

0 comments on commit 9596d24

Please sign in to comment.