mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
String to std::string is now always converted to UTF-8.
UICodeEditor and UITextInput copy/paste fix.
This commit is contained in:
@@ -579,7 +579,7 @@ String String::fromUtf8( const std::string& utf8String ) {
|
||||
}
|
||||
|
||||
String::operator std::string() const {
|
||||
return toAnsiString();
|
||||
return toUtf8();
|
||||
}
|
||||
|
||||
std::string String::toAnsiString( const std::locale& locale ) const {
|
||||
|
||||
@@ -1567,11 +1567,11 @@ void UICodeEditor::unindent() {
|
||||
}
|
||||
|
||||
void UICodeEditor::copy() {
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc->getSelectedText() );
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc->getSelectedText().toUtf8() );
|
||||
}
|
||||
|
||||
void UICodeEditor::cut() {
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc->getSelectedText() );
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc->getSelectedText().toUtf8() );
|
||||
mDoc->deleteSelection();
|
||||
}
|
||||
|
||||
|
||||
@@ -664,11 +664,11 @@ UITextView* UITextInput::setHintFontStyle( const Uint32& fontStyle ) {
|
||||
}
|
||||
|
||||
void UITextInput::copy() {
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc.getSelectedText() );
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc.getSelectedText().toUtf8() );
|
||||
}
|
||||
|
||||
void UITextInput::cut() {
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc.getSelectedText() );
|
||||
getUISceneNode()->getWindow()->getClipboard()->setText( mDoc.getSelectedText().toUtf8() );
|
||||
mDoc.deleteSelection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user