Logo Search packages:      
Sourcecode: ultracopier version File versions  Download package

QString Main_window::getDirectoryPath ( const QString &  title ) [private]

Open window for choise the directory.

Parameters:
thedirpathThe default dir path
titleThe title of the window
Returns:
Return true if succes

Definition at line 1788 of file Mwindow.cpp.

Referenced by addFile(), and addFolder().

{
      QString dialogPath = QFileDialog::getExistingDirectory(this, title,"",QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
      if(dialogPath.isEmpty() || dialogPath.isNull() || dialogPath=="")
            return "";
      DEBUGCONSOLE(90,"Main_window::getDirectoryPath","dialogPath: "+dialogPath);
      QString thedirpath(fromPercentEncodingLocal(dialogPath));
      DEBUGCONSOLE(90,"Main_window::getDirectoryPath","thedirpath: "+thedirpath);
      //thedirpath=QByteArray::fromPercentEncodingLocal(thedirpath);
      if(!thedirpath.endsWith('/') && !thedirpath.endsWith('\\'))
      {
            DEBUGCONSOLE(90,"Main_window::getDirectoryPath","dir not end with \"/\" look: "+thedirpath);
            thedirpath+='/';
      }
      else
      {
            DEBUGCONSOLE(90,"Main_window::getDirectoryPath","dir end with /: "+thedirpath);
      }
      if(thedirpath=="//")
      {
            DEBUGCONSOLE(90,"Main_window::getDirectoryPath","dir = // cleaning the name path");
            thedirpath='/';
      }
      return thedirpath;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index