Helge Hafting wrote:
Abdelrazak Younes wrote:
ucs4_to_qstring is pretty simple:
QString const ucs4_to_qstring(char_type const * str, size_t ls)
{
QString s;
for (size_t i = 0; i < ls; ++i)
s.append(ucs4_to_qchar(str[i]));
return s;
}
A function call per character - ouch.
Note that this function doesn't show in Andre's profiling results. But I
am going to inline it to see if there's a difference.
Is it allowed to have a single function that understands
both ucs4 strings and QString?
What do you mean?
Then the conversion could
be done in a single function. That tends to bring a nice speedup.
Helge Hafting