Program in Qtopia 2.2.0 with QT2 designer

Yayati Ekbote
Hi guys,

I built a file browser application using QListView and QDir classes. I drew
 a listview on UI with the help of QT2 designer...
 My implementation file is as follows...

#include "filebrowser.h"//my header file
#include <qdir.h>
#include <qlistview.h>
#include <qstringlist.h>

QDir dir=QDir::rootDirPath();
QFileDialog *f
FileBrowser::FileBrowser(QWidget *parent,const char *name,WFlags fl):
FileBrowserForm(parent,name,fl)
{
   if(dir.exists())
   {
      if(dir.isReadable())
      { 
      MyListView->clear();
      QStringList dirList(dir.entryList());
      for(QStringList::Iterator it=dirList.begin();it!=dirList.end();it++)
      {
         QListViewItem *dirItem=new QListViewItem(MyListView);
         dirItem->setText(0,(*it));
         MyListView->insertItem(dirItem);
      }
      }
   }

  
connect(MyListView,SIGNAL(doubleClicked(QListViewItem*),this,SLOT(setDir(QListVi
ewItem*)));
connect(UpButton,SIGNAL(clicked()),this,SLOT(upPath());
}

void FileBrowser::setDir(QListViewItem *item)
{
   if(dir.cd(item->text(0),true)
   {
     if(dir.exists())
     {
       if(dir.isReadable())
       {
       MyListView->clear();
       QStringList dirList(dir.entryList());
       for(QStringList::Iterator it=dirList.begin();it!=dirList.end();it++)
       {
         QListViewItem *dirItem=new QListViewItem(MyListView);
         dirItem->setText(0,(*it));
         MyListView->insertItem(dirItem);
       }
       }
     }
   }
}

void FileBrowser::upPath()
{
   if(dir.cdUp())
   {
     if(dir.exists())
     {
      if(dir.isReadable())
       {
       MyListView->clear();
       QStringList dirList(dir.entryList());
       for(QStringList::Iterator it=dirList.begin();it!=dirList.end();it++)
       {
         QListViewItem *dirItem=new QListViewItem(MyListView);
         dirItem->setText(0,(*it));
         MyListView->insertItem(dirItem);
       }
       }
     }
   }
}
   
This code compiles fine,but gives runtime errors as 
Line.17....5849..aborted

The MiniDevice hangs and the process in hyperterminal gets killed. Whats
the problem in this code? If there is some logical problem...i am unable to
understand it..Plz guide!!!

Yayati Ekbote
Guys in Line number 7 "QfileInfo *fi...its not the code syntax error..i
missed it while writing this post os ignore it...This progrma has no syntax
error....