mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Fix build without QT_IMPLICIT_QCHAR_CONSTRUCTION
This commit is contained in:
parent
394ef13955
commit
566f279137
12 changed files with 26 additions and 26 deletions
|
@ -936,14 +936,14 @@ void DocumentData::setFileName(const QString &remoteFileName) {
|
|||
// in filenames, because they introduce a security issue, when
|
||||
// an executable "Fil[x]gepj.exe" may look like "Filexe.jpeg".
|
||||
QChar controls[] = {
|
||||
0x200E, // LTR Mark
|
||||
0x200F, // RTL Mark
|
||||
0x202A, // LTR Embedding
|
||||
0x202B, // RTL Embedding
|
||||
0x202D, // LTR Override
|
||||
0x202E, // RTL Override
|
||||
0x2066, // LTR Isolate
|
||||
0x2067, // RTL Isolate
|
||||
QChar(0x200E), // LTR Mark
|
||||
QChar(0x200F), // RTL Mark
|
||||
QChar(0x202A), // LTR Embedding
|
||||
QChar(0x202B), // RTL Embedding
|
||||
QChar(0x202D), // LTR Override
|
||||
QChar(0x202E), // RTL Override
|
||||
QChar(0x2066), // LTR Isolate
|
||||
QChar(0x2067), // RTL Isolate
|
||||
};
|
||||
for (const auto &ch : controls) {
|
||||
_filename = std::move(_filename).replace(ch, "_");
|
||||
|
|
|
@ -150,8 +150,8 @@ using Ui::MaybeColorFromSerialized;
|
|||
const auto hex = [](int value) {
|
||||
value = std::clamp(value, 0, 15);
|
||||
return (value > 9)
|
||||
? ('a' + (value - 10))
|
||||
: ('0' + value);
|
||||
? QChar('a' + (value - 10))
|
||||
: QChar('0' + value);
|
||||
};
|
||||
return QString() + hex(value / 16) + hex(value % 16);
|
||||
};
|
||||
|
|
|
@ -434,7 +434,7 @@ void CloudManager::requestLanguageAndSwitch(
|
|||
|
||||
void CloudManager::sendSwitchingToLanguageRequest() {
|
||||
if (!_api) {
|
||||
_switchingToLanguageId = -1;
|
||||
_switchingToLanguageRequest = -1;
|
||||
return;
|
||||
}
|
||||
_api->request(_switchingToLanguageRequest).cancel();
|
||||
|
|
|
@ -527,9 +527,9 @@ void DateInput::correctValue(
|
|||
if (accumulated > _maxValue
|
||||
|| (limit == _maxDigits && oldLength > _maxDigits)) {
|
||||
if (oldCursor > limit) {
|
||||
_putNext.fire('0' + (accumulated % 10));
|
||||
_putNext.fire(QChar('0' + (accumulated % 10)));
|
||||
} else {
|
||||
_putNext.fire(0);
|
||||
_putNext.fire(QChar(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,10 +171,10 @@ void QuickReplies::setupContent(
|
|||
}
|
||||
for (const auto &ch : name) {
|
||||
if (!ch.isLetterOrNumber()
|
||||
&& (ch != '_')
|
||||
&& (ch != 0x200c)
|
||||
&& (ch != 0x00b7)
|
||||
&& (ch < 0x0d80 || ch > 0x0dff)) {
|
||||
&& (ch != QChar('_'))
|
||||
&& (ch.unicode() != 0x200c)
|
||||
&& (ch.unicode() != 0x00b7)
|
||||
&& (ch.unicode() < 0x0d80 || ch.unicode() > 0x0dff)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ QString ToFilePart(FileKey val) {
|
|||
result.reserve(0x10);
|
||||
for (int32 i = 0; i < 0x10; ++i) {
|
||||
uchar v = (val & 0x0F);
|
||||
result.push_back((v < 0x0A) ? ('0' + v) : ('A' + (v - 0x0A)));
|
||||
result.push_back((v < 0x0A) ? QChar('0' + v) : QChar('A' + (v - 0x0A)));
|
||||
val >>= 4;
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -997,9 +997,9 @@ void ColorEditor::updateResultField() {
|
|||
auto text = QString();
|
||||
const auto addHex = [&text](int value) {
|
||||
if (value >= 0 && value <= 9) {
|
||||
text.append('0' + value);
|
||||
text.append(QChar('0' + value));
|
||||
} else if (value >= 10 && value <= 15) {
|
||||
text.append('a' + (value - 10));
|
||||
text.append(QChar('a' + (value - 10)));
|
||||
}
|
||||
};
|
||||
const auto addValue = [&](int value) {
|
||||
|
|
|
@ -134,9 +134,9 @@ void EditorBlock::Row::setValue(QColor value) {
|
|||
void EditorBlock::Row::fillValueString() {
|
||||
auto addHex = [=](int code) {
|
||||
if (code >= 0 && code < 10) {
|
||||
_valueString.append('0' + code);
|
||||
_valueString.append(QChar('0' + code));
|
||||
} else if (code >= 10 && code < 16) {
|
||||
_valueString.append('a' + (code - 10));
|
||||
_valueString.append(QChar('a' + (code - 10)));
|
||||
}
|
||||
};
|
||||
auto addCode = [=](int code) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 25301a3c1e899f218e79f6727bc7dd96036da982
|
||||
Subproject commit 4155b9ae2d4c5a37b9738afa8ef9fa20d8fdcb44
|
|
@ -1 +1 @@
|
|||
Subproject commit 168e70e390684e8e45d6c088c92a7cfdf822b76b
|
||||
Subproject commit 21d1ac8bfcca03f67d7f6df75e265cd5597dc101
|
|
@ -1 +1 @@
|
|||
Subproject commit 1f2806546f2caf413608939c816348cc2bb9fd30
|
||||
Subproject commit e76eaecc9d8cae7e50ca24a71833bc219f750a19
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 82ae419da99140aa5f0e3e4e4ae214d0e948efea
|
||||
Subproject commit 3ca8fb8c91fdf5b52565a8294f6cb33e8b6d6852
|
Loading…
Add table
Reference in a new issue