Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-11137

QPixmap load

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.1
    • 4.6.1, 4.6.2, 4.7.0
    • Core: Plugins
    • 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);
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            stromme Christian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes