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

Suggestion QDir and QFile: Add a static method like QDir::separator() but for splitting string to list of paths.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P4: Low
    • 5.6
    • 4.4.3
    • Core: I/O
    • None

    Description

      It would be some usefull if QDir (and optionally QFile) will have static method like QDir::separator() but for splitting string to list of paths.
      for exmaple "/bin:/usr/bin" can be spliited to "/bin" and "/usr/bin" with path separator ':'. under mswindows path separator will be ';'.
      so, such method can be looks like this:

       
      /*static*/ QChar QDir::pathSeparator() 
      { 
      #if defined(Q_OS_WIN) 
              return QLatin1Char(';'); 
      #elif defined (Q_FS_FAT) || defined(Q_WS_WIN) 
              return QLatin1Char(':'); 
      #else 
              //returns something else (?) 
      #endif 
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes