mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 10:05:10 -07:00
[DeckShare] Format share expiry with the locale-aware short format
This commit is contained in:
parent
4168d329de
commit
9335adb1b6
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
#include <QLocale>
|
||||||
#include <QTimeZone>
|
#include <QTimeZone>
|
||||||
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
#include <libcockatrice/network/client/abstract/abstract_client.h>
|
||||||
#include <libcockatrice/protocol/pb/response.pb.h>
|
#include <libcockatrice/protocol/pb/response.pb.h>
|
||||||
|
|
@ -24,7 +25,7 @@ QString copyShareLinkToClipboard(const QString &link)
|
||||||
|
|
||||||
QString formatShareExpiry(const QDateTime &expiry)
|
QString formatShareExpiry(const QDateTime &expiry)
|
||||||
{
|
{
|
||||||
return expiry.toLocalTime().toString();
|
return QLocale().toString(expiry.toLocalTime(), QLocale::ShortFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShareResponse handleShareResponse(const AbstractClient *client, const Response &response)
|
ShareResponse handleShareResponse(const AbstractClient *client, const Response &response)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue