Skip to content

Commit

Permalink
Fixed deprecated method Qt::SystemLocaleLongDate (Chatterino#2784)
Browse files Browse the repository at this point in the history
  • Loading branch information
zneix committed May 15, 2021
1 parent 519855d commit 6732b25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/providers/twitch/TwitchChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ void TwitchChannel::loadRecentMessages()
{
shared.get()->lastDate_ = msgDate;
auto msg = makeSystemMessage(
msgDate.toString(Qt::SystemLocaleLongDate),
QLocale().toString(msgDate, QLocale::LongFormat),
QTime(0, 0));
msg->flags.set(MessageFlag::RecentMessage);
allBuiltMessages.emplace_back(msg);
Expand Down
8 changes: 4 additions & 4 deletions src/widgets/helper/ChannelView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,10 @@ void ChannelView::setChannel(ChannelPtr underlyingChannel)
if (this->channel_->lastDate_ != QDate::currentDate())
{
this->channel_->lastDate_ = QDate::currentDate();
auto msg =
makeSystemMessage(QDate::currentDate().toString(
Qt::SystemLocaleLongDate),
QTime(0, 0));
auto msg = makeSystemMessage(
QLocale().toString(QDate::currentDate(),
QLocale::LongFormat),
QTime(0, 0));
this->channel_->addMessage(msg);
}
// When the message was received in the underlyingChannel,
Expand Down

0 comments on commit 6732b25

Please sign in to comment.