mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
refactor: Replace deprecated Qt::SystemLocale{Short,Long}Date
This commit is contained in:
parent
50091592dd
commit
86b1ab64b1
@ -11,6 +11,7 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QList>
|
||||
#include <QLocale>
|
||||
#include <QModelIndex>
|
||||
#include <QVariant>
|
||||
|
||||
@ -122,7 +123,7 @@ QVariant BanTableModel::data(const QModelIndex &index, int role) const
|
||||
case Bantime:
|
||||
QDateTime date = QDateTime::fromMSecsSinceEpoch(0);
|
||||
date = date.addSecs(rec->banEntry.nBanUntil);
|
||||
return date.toString(Qt::SystemLocaleLongDate);
|
||||
return QLocale::system().toString(date, QLocale::LongFormat);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QList>
|
||||
#include <QLocale>
|
||||
#include <QMenu>
|
||||
#include <QMouseEvent>
|
||||
#include <QProgressDialog>
|
||||
@ -67,7 +68,7 @@ namespace GUIUtil {
|
||||
|
||||
QString dateTimeStr(const QDateTime &date)
|
||||
{
|
||||
return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm");
|
||||
return QLocale::system().toString(date.date(), QLocale::ShortFormat) + QString(" ") + date.toString("hh:mm");
|
||||
}
|
||||
|
||||
QString dateTimeStr(qint64 nTime)
|
||||
|
Loading…
Reference in New Issue
Block a user