diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-17 11:00:47 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-22 07:33:38 -0400 |
| commit | 4dfaa363c05eb7691e2c7ea755c35758b62e0fc9 (patch) | |
| tree | 616ca742354155d454dab50bd4b8be7b5f86a613 /src/loglist.cpp | |
| parent | ad77e315f5c53994d75056608df0f9ff0a390530 (diff) | |
logging initialized early, log file set later
replaced a few qDebug()
Diffstat (limited to 'src/loglist.cpp')
| -rw-r--r-- | src/loglist.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/loglist.cpp b/src/loglist.cpp index 9e876d37..207f412b 100644 --- a/src/loglist.cpp +++ b/src/loglist.cpp @@ -121,12 +121,10 @@ QVariant LogModel::data(const QModelIndex& index, int role) const const auto ms = duration_cast<milliseconds>(e.time.time_since_epoch());
const auto s = duration_cast<seconds>(ms);
- const std::time_t t = s.count();
- const std::size_t frac = ms.count() % 1000;
-
- auto time = QDateTime::fromTime_t(t).time();
- time = time.addMSecs(frac);
+ const std::time_t tt = s.count();
+ const int frac = static_cast<int>(ms.count() % 1000);
+ const auto time = QDateTime::fromTime_t(tt).time().addMSecs(frac);
return time.toString("hh:mm:ss.zzz");
} else if (index.column() == 2) {
return QString::fromStdString(e.message);
|
