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

QFileSystemModel hangs the app on close

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Not Evaluated Not Evaluated
    • 4.6.0
    • 4.5.2
    • Widgets: Itemviews
    • None

      Platform
      Windows XP
      Platform details
      SP3
      Compilers
      MSVC
      Compiler details
      msvc2005 sp1
      Subject
      QFileSystemModel hangs the app on close
      Steps to reproduce / test case

      #include <QtGui/QApplication> 
      #include <QtGui/QTreeView> 
      #include <QtGui/QFileSystemModel> 
      
      int main(int argc, char *argv[]) 
      { 
      QApplication a(argc, argv); 
      
      QFileSystemModel *model = new QFileSystemModel; 
      model->setRootPath(""); 
      
      QTreeView *tree = new QTreeView(); 
      tree->setModel(model); 
      tree->setRootIsDecorated(false); 
      tree->setItemsExpandable(false); 
      tree->show(); 
      
      QObject::connect(tree, SIGNAL(doubleClicked(const QModelIndex&)), 
      tree, SLOT(expand(const QModelIndex&))); 
      
      return a.exec(); 
      } 
      

      Build and run the code above.
      Double click on drive C, than same on Windows dir.
      Close the tree window.
      Result: widget disappears but the application is still running.
      Expected: widget disappears and the application stops executing.
      Notice: when you navigate to an empty directory and close tree window application stops executing.

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

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            dajansen Damian Jansen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes