Skip to content

Commit

Permalink
Attempting to fix warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
doug1234 committed Apr 5, 2024
1 parent 3cbbb16 commit a968c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Emulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ void Emulation::receiveData(const char* text, int length)
* U+10FFFF
* https://unicodebook.readthedocs.io/unicode_encodings.html#surrogates
*/
auto encoded = _fromUtf8(QString::fromUtf8(text, length));
QString str = QString::fromUtf8(text, length);
auto encoded = _fromUtf8(str);
std::wstring unicodeText = encoded.data.toStdWString();

//send characters to terminal emulator
Expand Down
3 changes: 2 additions & 1 deletion lib/Vt102Emulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,8 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* event, bool fromPaste)
}
else if ( !entry.text().isEmpty() )
{
QByteArray bytes = _toUtf8(QString::fromUtf8(entry.text(true,modifiers)));
QString str = QString::fromUtf8(entry.text(true,modifiers));
QByteArray bytes = _toUtf8(str);
textToSend += bytes;
}
else if((modifiers & KeyboardTranslator::CTRL_MOD) && event->key() >= 0x40 && event->key() < 0x5f) {
Expand Down

0 comments on commit a968c1c

Please sign in to comment.