class SimpleJob requires a valid object of class QCoreApplication

David Faure faure at kde.org
Thu Dec 12 18:49:54 GMT 2013


On Sunday 17 November 2013 21:36:22 Krzysztof ┼╗elechowski wrote:
> If no valid application object is present, the constructor of SimpleJob
> causes a NULL pointer dereference.
> 
> Please add the following comment to the description of class SimpleJob:
> 
> An object of this class (or of a derived class) may only be created when the
> application object (derived from QCoreApplication) is present.

Won't do.

*Everything* in Qt needs a QCoreApplication to exist.

Without QCoreApplication, you not only have no event loop, but even things 
like QString::fromLocal8Bit() are not correctly configured.

This is in no way specific to KIO::SimpleJob.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5





More information about the kde-core-devel mailing list