Abdelrazak Younes wrote: > Georg Baum wrote: >> I would be more concerned about resizing by append(). Why don't you do >> this? >> >> QString const ucs4_to_qstring(char_type const * str, size_t ls) >> { >> QString s; >> s.reserve(ls); >> for (size_t i = 0; i < ls; ++i) >> s.append(ucs4_to_qchar(str[i]); >> return s; >> } >> >> (assuming that QString has a reserve() member, I don't know) > > It has but it makes no difference anyway.
Then I don't understand why it is slow, it should basicaly be not much more than a memcpy. I guess in order to understand why you have to step through this with the debugger. Georg