summary refs log tree commit diff
path: root/src/dialogs
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-06-05 23:34:00 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-06-05 23:34:00 +0200
commit43d2ebc0958d364ff24ae70920a3edeef7d0ce72 (patch)
tree601dc3586f9242f091bd404fe34223a3e3ee52fd /src/dialogs
parentExtend timeout (diff)
downloadnheko-43d2ebc0958d364ff24ae70920a3edeef7d0ce72.tar.xz
Fix Qt5.15 issues
fixes #214
Diffstat (limited to 'src/dialogs')
-rw-r--r--src/dialogs/CreateRoom.cpp4
-rw-r--r--src/dialogs/ReadReceipts.cpp10
2 files changed, 8 insertions, 6 deletions
diff --git a/src/dialogs/CreateRoom.cpp b/src/dialogs/CreateRoom.cpp

index 06676d3d..be5b4638 100644 --- a/src/dialogs/CreateRoom.cpp +++ b/src/dialogs/CreateRoom.cpp
@@ -112,7 +112,7 @@ CreateRoom::CreateRoom(QWidget *parent) }); connect(visibilityCombo_, - static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), + static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged), [this](const QString &text) { if (text == "Private") { request_.visibility = mtx::requests::Visibility::Private; @@ -122,7 +122,7 @@ CreateRoom::CreateRoom(QWidget *parent) }); connect(presetCombo_, - static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated), + static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged), [this](const QString &text) { if (text == "Private Chat") { request_.preset = mtx::requests::Preset::PrivateChat; diff --git a/src/dialogs/ReadReceipts.cpp b/src/dialogs/ReadReceipts.cpp
index 970d9125..7dcffc28 100644 --- a/src/dialogs/ReadReceipts.cpp +++ b/src/dialogs/ReadReceipts.cpp
@@ -75,15 +75,17 @@ ReceiptItem::dateFormat(const QDateTime &then) const auto days = then.daysTo(now); if (days == 0) - return tr("Today %1").arg(then.time().toString(Qt::DefaultLocaleShortDate)); + return tr("Today %1") + .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat)); else if (days < 2) - return tr("Yesterday %1").arg(then.time().toString(Qt::DefaultLocaleShortDate)); + return tr("Yesterday %1") + .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat)); else if (days < 7) return QString("%1 %2") .arg(then.toString("dddd")) - .arg(then.time().toString(Qt::DefaultLocaleShortDate)); + .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat)); - return then.toString(Qt::DefaultLocaleShortDate); + return QLocale::system().toString(then.time(), QLocale::ShortFormat); } ReadReceipts::ReadReceipts(QWidget *parent)