UI: Format traffic dates per locale

This commit is contained in:
Nodir Temirkhodjaev 2024-08-19 15:28:29 +05:00
parent b42e6bcf0b
commit 8cdeef7b57
2 changed files with 2 additions and 1 deletions

View File

@ -223,6 +223,7 @@ void TrafficPage::setupTabBar()
void TrafficPage::setupTableTraf()
{
m_tableTraf = new TableView();
m_tableTraf->setTextElideMode(Qt::ElideRight);
m_tableTraf->setSelectionMode(QAbstractItemView::SingleSelection);
m_tableTraf->setSelectionBehavior(QAbstractItemView::SelectItems);

View File

@ -84,7 +84,7 @@ QString DateUtil::formatMonth(qint64 unixTime)
QString DateUtil::formatDateTime(qint64 unixTime, const QString &format)
{
const QDateTime dt = QDateTime::fromSecsSinceEpoch(unixTime);
return QLocale::c().toString(dt, format);
return QLocale().toString(dt, format);
}
QString DateUtil::formatPeriod(const QString &from, const QString &to)