diff --git a/ui/widgets/input_fields.cpp b/ui/widgets/input_fields.cpp index 067c6bc..7a15595 100644 --- a/ui/widgets/input_fields.cpp +++ b/ui/widgets/input_fields.cpp @@ -959,6 +959,17 @@ const InstantReplaces &InstantReplaces::TextOnly() { return result; } +const InstantReplaces &InstantReplaces::Custom() { + static const auto result = [] { + auto result = InstantReplaces(); + for (auto i = customReplacesMap.constBegin(), e = customReplacesMap.constEnd(); i != e; ++i) { + result.add(i.key(), i.value()); + } + return result; + }(); + return result; +} + FlatInput::FlatInput( QWidget *parent, const style::FlatInput &st, diff --git a/ui/widgets/input_fields.h b/ui/widgets/input_fields.h index 3617e65..8544550 100644 --- a/ui/widgets/input_fields.h +++ b/ui/widgets/input_fields.h @@ -43,6 +43,7 @@ struct InstantReplaces { static const InstantReplaces &Default(); static const InstantReplaces &TextOnly(); + static const InstantReplaces &Custom(); int maxLength = 0; Node reverseMap;