mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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 {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto result = std::vector<ListSection>(
|
auto result = std::vector<ListSection>();
|
||||||
1,
|
result.emplace_back(Type::File, sectionDelegate());
|
||||||
ListSection(Type::File, sectionDelegate()));
|
|
||||||
auto §ion = result.back();
|
auto §ion = result.back();
|
||||||
for (const auto &element : ranges::views::reverse(_elements)) {
|
for (const auto &element : ranges::views::reverse(_elements)) {
|
||||||
if (search && !element.found) {
|
if (search && !element.found) {
|
||||||
|
|
|
@ -249,8 +249,8 @@ void AnimatedLabel::setText(const QString &text) {
|
||||||
if (_text.toString() == text) {
|
if (_text.toString() == text) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_previousText = _text;
|
_previousText = std::move(_text);
|
||||||
_text.setText(_st.style, text, _options);
|
_text = Ui::Text::String(_st.style, text, _options);
|
||||||
|
|
||||||
const auto width = std::max(
|
const auto width = std::max(
|
||||||
_st.style.font->width(_text.toString()),
|
_st.style.font->width(_text.toString()),
|
||||||
|
|
Loading…
Add table
Reference in a new issue