Results 1 to 4 of 4

Thread: QDir::entryList() on linux

  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QDir::entryList() on linux

    Hello,

    This was discussed before and it was said it was a problem with my ubuntu, not related to Qt.

    But... my mp3 player on ubuntu, audacious, can read a file with a name like 'Clannad Crann Ull 03 Cruscin Lán.mp3'.

    It displays a funny question mark, but it recognizes the file and plays it.

    In a console, with 'ls <map>', the file gets displayed.

    But such a file does not show up when I do an QDir::entryList() on that map.

    Qt Code:
    1. QDir songmap = QDir("/home/jean/serverd/Mp3/Clannad/", "*.mp3", QDir::Name, QDir::Files);
    2. QStringList songnames = songmap.entryList();
    3. for (int i = 0; i < songnames.count(); i++)
    4. qDebug() << songnames.at(i);
    To copy to clipboard, switch view to plain text mode 

    Output snippet:
    "Clannad Crann Ull 02 The Last Rose of Summer.mp3"
    "Clannad Crann Ull 04 Bacach Shile Andai.mp3"

    Song 03 from that cd is missing in the list.

    Suggestions or workarounds welcome.
    Thanks.
    Last edited by JeanC; 3rd March 2008 at 10:48.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDir::entryList() on linux

    I suggest submitting a bug report to Trolltech - they should be the ones checking that out.

  3. #3
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDir::entryList() on linux

    Quote Originally Posted by wysota View Post
    I suggest submitting a bug report to Trolltech - they should be the ones checking that out.
    Done. Thanks wysota.

  4. #4
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QDir::entryList() on linux SOLVED

    Problems with chars are solved by using codepage and iocharset like this: //192.168.1.10/D /home/jean/serverd cifs auto,rw,username=guest,password=,file_mode=0777,di r_mode=0777,user,codepage=cp852,iocharset=utf8 0 0

    though entryList() still misses a file here and there.
    Last edited by JeanC; 3rd March 2008 at 14:29.

Similar Threads

  1. qdir and entrylist
    By mattia in forum Newbie
    Replies: 1
    Last Post: 28th November 2007, 10:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.