[Development] HEADS-UP: QStringLiteral

Thiago Macieira thiago.macieira at intel.com
Wed Aug 21 18:30:42 CEST 2019


On Wednesday, 21 August 2019 09:17:24 PDT Tor Arne Vestbø wrote:
> > Remember that QStringLiteral today has a drawback: if you 
> > unload the plugin it came from, any left-over uses of it may crash. That's
> > one  of the many reasons we don't unload plugins, but other people
> > might.
> 
> Is that the only drawback? Is that the only reason we’re not doing it?

With a proper Qt 6 implementation, yes. Not right now in Qt 5, there are a few 
more.

> On macOS plugins are never unloaded. Could the behaviour be dependent on
> whether or not we’re building a plugin?

All macOS plugins or just *our* plugins? QPluginLoader doesn't unload, but 
QLibrary does.

We can force a plugin not to allow unloading, with the -z nodelete linker 
flag. Works on ELF systems, I don't know about Mach-O.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products






More information about the Development mailing list