mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't use Ui::Text::String copy construct/assign.
This commit is contained in:
parent
182c07db7f
commit
368bc283a1
2 changed files with 4 additions and 5 deletions
|
@ -305,9 +305,8 @@ std::vector<ListSection> Provider::fillSections(
|
|||
return {};
|
||||
}
|
||||
|
||||
auto result = std::vector<ListSection>(
|
||||
1,
|
||||
ListSection(Type::File, sectionDelegate()));
|
||||
auto result = std::vector<ListSection>();
|
||||
result.emplace_back(Type::File, sectionDelegate());
|
||||
auto §ion = result.back();
|
||||
for (const auto &element : ranges::views::reverse(_elements)) {
|
||||
if (search && !element.found) {
|
||||
|
|
|
@ -249,8 +249,8 @@ void AnimatedLabel::setText(const QString &text) {
|
|||
if (_text.toString() == text) {
|
||||
return;
|
||||
}
|
||||
_previousText = _text;
|
||||
_text.setText(_st.style, text, _options);
|
||||
_previousText = std::move(_text);
|
||||
_text = Ui::Text::String(_st.style, text, _options);
|
||||
|
||||
const auto width = std::max(
|
||||
_st.style.font->width(_text.toString()),
|
||||
|
|
Loading…
Add table
Reference in a new issue