Fixed deprecated method Qt::SystemLocaleLongDate (#2784)
Fixes deprecation notices introduced in #2748 Reference: https://doc.qt.io/qt-5/qt.html#DateFormat-enum Replacement: https://doc.qt.io/qt-5/qlocale.html#FormatType-enum
This commit is contained in:
@@ -754,7 +754,7 @@ void TwitchChannel::loadRecentMessages()
|
|||||||
{
|
{
|
||||||
shared.get()->lastDate_ = msgDate;
|
shared.get()->lastDate_ = msgDate;
|
||||||
auto msg = makeSystemMessage(
|
auto msg = makeSystemMessage(
|
||||||
msgDate.toString(Qt::SystemLocaleLongDate),
|
QLocale().toString(msgDate, QLocale::LongFormat),
|
||||||
QTime(0, 0));
|
QTime(0, 0));
|
||||||
msg->flags.set(MessageFlag::RecentMessage);
|
msg->flags.set(MessageFlag::RecentMessage);
|
||||||
allBuiltMessages.emplace_back(msg);
|
allBuiltMessages.emplace_back(msg);
|
||||||
|
|||||||
@@ -607,10 +607,10 @@ void ChannelView::setChannel(ChannelPtr underlyingChannel)
|
|||||||
if (this->channel_->lastDate_ != QDate::currentDate())
|
if (this->channel_->lastDate_ != QDate::currentDate())
|
||||||
{
|
{
|
||||||
this->channel_->lastDate_ = QDate::currentDate();
|
this->channel_->lastDate_ = QDate::currentDate();
|
||||||
auto msg =
|
auto msg = makeSystemMessage(
|
||||||
makeSystemMessage(QDate::currentDate().toString(
|
QLocale().toString(QDate::currentDate(),
|
||||||
Qt::SystemLocaleLongDate),
|
QLocale::LongFormat),
|
||||||
QTime(0, 0));
|
QTime(0, 0));
|
||||||
this->channel_->addMessage(msg);
|
this->channel_->addMessage(msg);
|
||||||
}
|
}
|
||||||
// When the message was received in the underlyingChannel,
|
// When the message was received in the underlyingChannel,
|
||||||
|
|||||||
Reference in New Issue
Block a user