Add InstantReplaces::Custom

This commit is contained in:
blank X 2021-10-16 16:55:38 +07:00
parent 30a82625a8
commit c63139f7e7
No known key found for this signature in database
GPG key ID: CC15FC822C7F61F5
2 changed files with 12 additions and 0 deletions

View file

@ -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,

View file

@ -43,6 +43,7 @@ struct InstantReplaces {
static const InstantReplaces &Default();
static const InstantReplaces &TextOnly();
static const InstantReplaces &Custom();
int maxLength = 0;
Node reverseMap;