A multilingual input method framework
Revision | 123b8aba3c0af487e8040ab00842f9e928363cde (tree) |
---|---|
Time | 2012-11-27 17:12:53 |
Author | Muneyuki Noguchi <nogu.dev@gmai...> |
Commiter | Muneyuki Noguchi |
Replace toAscii() with toLatin1().
* qt4/immodule/qhelpermanager.cpp
* qt5/immodule/quimplatforminputcontext.cpp
@@ -132,9 +132,9 @@ void QUimHelperManager::parseHelperStr( const QString &str ) | ||
132 | 132 | |
133 | 133 | /* convert to unicode */ |
134 | 134 | QTextCodec *codec |
135 | - = QTextCodec::codecForName( charset.toAscii() ); | |
135 | + = QTextCodec::codecForName( charset.toLatin1() ); | |
136 | 136 | if ( codec && !lines[ 2 ].isEmpty() ) |
137 | - commit_str = codec->toUnicode( lines[ 2 ].toAscii() ); | |
137 | + commit_str = codec->toUnicode( lines[ 2 ].toLatin1() ); | |
138 | 138 | } else { |
139 | 139 | commit_str = lines[ 1 ]; |
140 | 140 | } |
@@ -231,7 +231,7 @@ bool QUimPlatformInputContext::filterEvent(const QEvent *event) | ||
231 | 231 | |
232 | 232 | int key = 0; |
233 | 233 | if (isascii(qkey) && isprint(qkey)) { |
234 | - int ascii = keyevent->text()[0].toAscii(); | |
234 | + int ascii = keyevent->text()[0].toLatin1(); | |
235 | 235 | if (isalpha(ascii)) { |
236 | 236 | key = ascii; // uim needs lower/upper encoded key |
237 | 237 | } else { |