[Development] Can QImage format plugins require QGuiApplication?

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Apr 14 01:25:00 CEST 2020


Il 13/04/20 18:50, Kevin Kofler ha scritto:
> Today, a user on #fedora-kde ran across a crash which resulted from:
> * a GTK+/GNOME application (Jami) using (for some reason) QImage to load
>    images, without a QGuiApplication or QApplication constructed, vs.
> * a QImage format plugin (QtPBFImagePlugin) using font APIs that require
>    QGuiApplication and abort otherwise.
> 
> Obviously, one or the other must be wrong. So, who is to blame?

The golden rule is that you're not allowed to touch any Qt API without 
creating a Q*Application object first, unless the documentation says 
otherwise.

HTH,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200414/aef3adaa/attachment-0001.bin>


More information about the Development mailing list