From c45f6501f501a65f753604bfd2341035ae12fd30 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Wed, 16 Aug 2023 12:49:23 -0400 Subject: Make quick_read_setting() a templated method This allows terser usage and removes the need for manually invoking QVariant's .value() method. --- src/activitypub/appost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/activitypub/appost.cpp') diff --git a/src/activitypub/appost.cpp b/src/activitypub/appost.cpp index 24a01f5..87d6f08 100644 --- a/src/activitypub/appost.cpp +++ b/src/activitypub/appost.cpp @@ -47,7 +47,7 @@ QString APPost::get_html_render(HtmlRenderDetails render_info) { if (published.isValid()) { // Using QLocale::toString() is forward compatible with Qt 6 as QDateTime::toString() will not return anymore a string in the system locale. html.replace("{{published}}", render_info.locale->toString( - SettingsInterface::quick_read_setting("ui/timezone").value() ? published.toUTC() : published.toLocalTime() + SettingsInterface::quick_read_setting("ui/timezone") ? published.toUTC() : published.toLocalTime() )); } -- cgit v1.2.3-54-g00ecf