use const instead of constexpr because gcc-11 did not like it

This commit is contained in:
AdenKoperczak 2025-06-08 16:12:53 -04:00
parent e3cf37f9ed
commit 8d7d29bf5e
No known key found for this signature in database
GPG key ID: 9843017036F62EE7

View file

@ -123,11 +123,11 @@ AnimationDockWidget::~AnimationDockWidget()
void AnimationDockWidgetImpl::UpdateTimeZoneLabel(const zoned_time_ zonedTime) void AnimationDockWidgetImpl::UpdateTimeZoneLabel(const zoned_time_ zonedTime)
{ {
#if (__cpp_lib_chrono >= 201907L) #if (__cpp_lib_chrono >= 201907L)
namespace df = std; namespace df = std;
static constexpr std::string_view kFormatStringTimezone = "{:%Z}"; static const std::string_view kFormatStringTimezone = "{:%Z}";
#else #else
namespace df = date; namespace df = date;
static constexpr std::string kFormatStringTimezone = "%Z"; static const std::string kFormatStringTimezone = "%Z";
#endif #endif
const std::string timeZoneStr = df::format(kFormatStringTimezone, zonedTime); const std::string timeZoneStr = df::format(kFormatStringTimezone, zonedTime);
self_->ui->timeZoneLabel->setText(timeZoneStr.c_str()); self_->ui->timeZoneLabel->setText(timeZoneStr.c_str());