Formatting Dive tags string

Thiago Macieira thiago at macieira.org
Wed Apr 4 20:27:14 PDT 2018


On Wednesday, 4 April 2018 02:55:22 PDT Berthold Stoeger wrote:
>   char *s = taglist_get_tagstring(...);
>   QString tags(s);
>   free(s);

One minor note: this decodes the string as UTF-8. If your string is Latin1 or 
plain US-ASCII, you should use QString::fromLatin1 or QLatin1String (same 
thing in this context).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center





More information about the subsurface mailing list