| 561 | ControllerCustomSettingsWidget::~ControllerCustomSettingsWidget() = default; |
| 562 | |
| 563 | static std::tuple<QString, QString> getPrefixAndSuffixForIntFormat(const QString& format) |
| 564 | { |
| 565 | QString prefix, suffix; |
| 566 | QRegularExpression re(QStringLiteral("(.*)%.*d(.*)")); |
| 567 | QRegularExpressionMatch match(re.match(format)); |
| 568 | if (match.isValid()) |
| 569 | { |
| 570 | prefix = match.captured(1).replace(QStringLiteral("%%"), QStringLiteral("%")); |
| 571 | suffix = match.captured(2).replace(QStringLiteral("%%"), QStringLiteral("%")); |
| 572 | } |
| 573 | |
| 574 | return std::tie(prefix, suffix); |
| 575 | } |
| 576 | |
| 577 | static std::tuple<QString, QString, int> getPrefixAndSuffixForFloatFormat(const QString& format) |
| 578 | { |
no test coverage detected