mirror of https://github.com/procxx/kepka.git
fixed emoji replaces in the beginning of the input fields
This commit is contained in:
parent
6feef57b84
commit
16afb72166
|
@ -917,7 +917,7 @@ QVariant InputArea::InputAreaInner::loadResource(int type, const QUrl &name) {
|
|||
}
|
||||
|
||||
void InputArea::processDocumentContentsChange(int position, int charsAdded) {
|
||||
int32 emojiPosition = 0, emojiLen = 0;
|
||||
int32 emojiPosition = -1, emojiLen = 0;
|
||||
const EmojiData *emoji = 0;
|
||||
|
||||
static QString regular = qsl("Open Sans"), semibold = qsl("Open Sans Semibold");
|
||||
|
@ -982,11 +982,11 @@ void InputArea::processDocumentContentsChange(int position, int charsAdded) {
|
|||
++fp;
|
||||
}
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
}
|
||||
if (emojiPosition) {
|
||||
if (emojiPosition >= 0) {
|
||||
if (emoji) {
|
||||
if (!_inner.document()->pageSize().isNull()) {
|
||||
_inner.document()->setPageSize(QSizeF(0, 0));
|
||||
|
@ -999,7 +999,7 @@ void InputArea::processDocumentContentsChange(int position, int charsAdded) {
|
|||
position = emojiPosition + 1;
|
||||
|
||||
emoji = 0;
|
||||
emojiPosition = 0;
|
||||
emojiPosition = -1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -1611,7 +1611,7 @@ QVariant InputField::InputFieldInner::loadResource(int type, const QUrl &name) {
|
|||
}
|
||||
|
||||
void InputField::processDocumentContentsChange(int position, int charsAdded) {
|
||||
int32 emojiPosition = 0, emojiLen = 0;
|
||||
int32 emojiPosition = -1, emojiLen = 0;
|
||||
const EmojiData *emoji = 0;
|
||||
|
||||
static QString regular = qsl("Open Sans"), semibold = qsl("Open Sans Semibold"), space(' ');
|
||||
|
@ -1689,9 +1689,9 @@ void InputField::processDocumentContentsChange(int position, int charsAdded) {
|
|||
++fp;
|
||||
}
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
|
||||
if (b.next() != doc->end()) {
|
||||
emojiPosition = b.next().position() - 1;
|
||||
|
@ -1702,7 +1702,7 @@ void InputField::processDocumentContentsChange(int position, int charsAdded) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (emojiPosition) {
|
||||
if (emojiPosition >= 0) {
|
||||
if (emoji) {
|
||||
if (!_inner.document()->pageSize().isNull()) {
|
||||
_inner.document()->setPageSize(QSizeF(0, 0));
|
||||
|
@ -1715,7 +1715,7 @@ void InputField::processDocumentContentsChange(int position, int charsAdded) {
|
|||
position = emojiPosition + 1;
|
||||
|
||||
emoji = 0;
|
||||
emojiPosition = 0;
|
||||
emojiPosition = -1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -619,7 +619,7 @@ void FlatTextarea::checkContentHeight() {
|
|||
}
|
||||
|
||||
void FlatTextarea::processDocumentContentsChange(int position, int charsAdded) {
|
||||
int32 emojiPosition = 0, emojiLen = 0;
|
||||
int32 emojiPosition = -1, emojiLen = 0;
|
||||
const EmojiData *emoji = 0;
|
||||
|
||||
static QString regular = qsl("Open Sans"), semibold = qsl("Open Sans Semibold");
|
||||
|
@ -681,11 +681,11 @@ void FlatTextarea::processDocumentContentsChange(int position, int charsAdded) {
|
|||
++fp;
|
||||
}
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
}
|
||||
if (emojiPosition) break;
|
||||
if (emojiPosition >= 0) break;
|
||||
}
|
||||
if (emojiPosition) {
|
||||
if (emojiPosition >= 0) {
|
||||
if (emoji) {
|
||||
if (!document()->pageSize().isNull()) {
|
||||
document()->setPageSize(QSizeF(0, 0));
|
||||
|
@ -698,7 +698,7 @@ void FlatTextarea::processDocumentContentsChange(int position, int charsAdded) {
|
|||
position = emojiPosition + 1;
|
||||
|
||||
emoji = 0;
|
||||
emojiPosition = 0;
|
||||
emojiPosition = -1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue