Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.1, 4.6.2, 4.7.0
-
None
-
GNU/Linux
-
a1381dcce6ad42567d88d628934b55873c3687e9
Description
When trying to load image files that does not exist, the QPixmap::load functions ends up calling QImageReader::supportedImageFormats which in turn tries to load several plugins by calling dlopen (this happens for each time that function is called). This is time-consuming and is especially visible when debugging an application.
#include <QApplication>
#include <QPixmap>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
for(int i=0; i<50; ++i)
QPixmap * pix = new QPixmap("some_non-existing.file");
app.exit(0);
}