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

get{Open|Save}FileName hangs for about 10 seconds in a loaded folder

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • 5.1.0
    • None
    • Windows XP SP3
    • Delayed widget creation, 37ca2224eca671200a2710f57f970d2993e62aa5 (5.2. beta1)

    Description

      ...When invoked in a slot.

      Every time getOpenFileName dialog is opened in a folder that contains many folders/files, the application hangs for about 10 seconds.

      Reproducible by

      #include <QApplication>
      #include <QTimer>
      #include <QFileDialog>
      
      class Open : public QObject
      {
          Q_OBJECT
      
      public:
          Open() { QTimer::singleShot(0, this, SLOT(open())); }
      
      public slots:
          void open() { QFileDialog::getOpenFileName(0, "Hangs", qgetenv("WINDIR")); }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QFileDialog::getOpenFileName(0, "Works", qgetenv("WINDIR"));
          Open obj;
          return app.exec();
      }
      
      #include "main.moc"

      Doesn't happen with Qt4

      Attachments

        1. qtbug33039_stack1.txt
          6 kB
        2. qtbug33039_stack2.txt
          8 kB
        3. qtbug33039.tar
          10 kB

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              orgads Orgad Shaneh
              Votes:
              11 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes