mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
SyncEngine: keep a static pointer to the codec
The QTextCodec for UTF-8 is not going to change during the application life time. So no need to look it up for every file
This commit is contained in:
parent
597d36dcf2
commit
cf242871ea
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
|
|||
if( ! file ) return -1;
|
||||
|
||||
QTextCodec::ConverterState utf8State;
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
static QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
Q_ASSERT(codec);
|
||||
QString fileUtf8 = codec->toUnicode(file->path, qstrlen(file->path), &utf8State);
|
||||
QString renameTarget;
|
||||
|
|
Loading…
Reference in a new issue