Updated lib_ui sources to TDesktop version 2.8.11+b2c762e

This commit is contained in:
Eric Kotato 2021-07-20 06:50:26 +03:00
commit f206cb7bbb
4 changed files with 3 additions and 9 deletions

View file

@ -147,7 +147,7 @@ private:
public:
UsedWordGuard(std::vector<small> &map, int index);
UsedWordGuard(const UsedWordGuard &other) = delete;
UsedWordGuard(UsedWordGuard &&other);
[[maybe_unused]] UsedWordGuard(UsedWordGuard &&other);
UsedWordGuard &operator=(const UsedWordGuard &other) = delete;
UsedWordGuard &operator=(UsedWordGuard &&other) = delete;
explicit operator bool() const;

View file

@ -191,7 +191,7 @@ void StartFonts() {
#ifndef DESKTOP_APP_USE_PACKAGED_FONTS
if (!fontSettings.useSystemFont) {
bool areGood[FontTypesCount] = { false };
[[maybe_unused]] bool areGood[FontTypesCount] = { false };
for (auto i = 0; i != FontTypesCount; ++i) {
const auto file = FontTypeFiles[i];
const auto name = FontTypeNames[i];

View file

@ -2765,20 +2765,14 @@ void String::recountNaturalSize(bool initial, Qt::LayoutDirection optionsDir) {
}
int String::countMaxMonospaceWidth() const {
const NewlineBlock *lastNewline = nullptr;
auto result = QFixed();
auto paragraphWidth = QFixed();
auto lastNewlineStart = 0;
auto fullMonospace = true;
QFixed _width = 0, last_rBearing = 0, last_rPadding = 0;
for (auto &block : _blocks) {
auto b = block.get();
auto _btype = b->type();
if (_btype == TextBlockTNewline) {
lastNewlineStart = b->from();
lastNewline = &block.unsafe<NewlineBlock>();
last_rBearing = b->f_rbearing();
last_rPadding = b->f_rpadding();

View file

@ -1481,7 +1481,7 @@ bool CutPart(TextWithEntities &sending, TextWithEntities &left, int32 limit) {
}
int elen = 0;
if (auto e = Ui::Emoji::Find(ch, end, &elen)) {
if (Ui::Emoji::Find(ch, end, &elen)) {
for (int i = 0; i < elen; ++i, ++ch, ++s) {
if (ch->isHighSurrogate() && i + 1 < elen && (ch + 1)->isLowSurrogate()) {
++ch;