Changeset 13730


Ignore:
Timestamp:
Dec 31, 2012, 10:43:29 PM (8 years ago)
Author:
jordan
Message:

(qt) #5204 extra cleanups in Utils::guessMimeIcon() from rb07

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/utils.cc

    r13728 r13730  
    6868        fallback = QApplication::style()->standardIcon( QStyle :: SP_FileIcon );
    6969
    70         suffixes[DISK] << QString::fromAscii("iso");
    71         fileIcons[DISK]= QIcon::fromTheme( QString::fromAscii("media-optical"), fallback );
     70        suffixes[DISK] << QString::fromLatin1("iso");
     71        fileIcons[DISK]= QIcon::fromTheme( QString::fromLatin1("media-optical"), fallback );
    7272
    7373        const char * doc_types[] = {
     
    7575            "ods", "odt", "pdf", "ppt", "ps",  "rtf", "tex", "txt", "xml" };
    7676        for( int i=0, n=sizeof(doc_types)/sizeof(doc_types[0]); i<n; ++i )
    77             suffixes[DOCUMENT] << QString::fromAscii(doc_types[i] );
    78         fileIcons[DOCUMENT] = QIcon::fromTheme( QString::fromAscii("text-x-generic"), fallback );
     77            suffixes[DOCUMENT] << QString::fromLatin1(doc_types[i] );
     78        fileIcons[DOCUMENT] = QIcon::fromTheme( QString::fromLatin1("text-x-generic"), fallback );
    7979
    8080        const char * pic_types[] = {
    8181            "bmp", "gif", "jpg", "jpeg", "pcx", "png", "psd", "ras", "tga", "tiff" };
    8282        for( int i=0, n=sizeof(pic_types)/sizeof(pic_types[0]); i<n; ++i )
    83             suffixes[PICTURE] << QString::fromAscii(pic_types[i]);
    84         fileIcons[PICTURE]  = QIcon::fromTheme( QString::fromAscii("image-x-generic"), fallback );
     83            suffixes[PICTURE] << QString::fromLatin1(pic_types[i]);
     84        fileIcons[PICTURE]  = QIcon::fromTheme( QString::fromLatin1("image-x-generic"), fallback );
    8585
    8686        const char * vid_types[] = {
    87             "3gp", "asf", "avi", "mov", "mpeg", "mpg", "mp4", "mkv", "mov",
     87            "3gp", "asf", "avi", "mkv", "mov", "mpeg", "mpg", "mp4",
    8888            "ogm", "ogv", "qt", "rm", "wmv" };
    8989        for( int i=0, n=sizeof(vid_types)/sizeof(vid_types[0]); i<n; ++i )
    90             suffixes[VIDEO] << QString::fromAscii(vid_types[i]);
    91         fileIcons[VIDEO] = QIcon::fromTheme( QString::fromAscii("video-x-generic"), fallback );
     90            suffixes[VIDEO] << QString::fromLatin1(vid_types[i]);
     91        fileIcons[VIDEO] = QIcon::fromTheme( QString::fromLatin1("video-x-generic"), fallback );
    9292
    9393        const char * arc_types[] = {
    9494            "7z", "ace", "bz2", "cbz", "gz", "gzip", "lzma", "rar", "sft", "tar", "zip" };
    9595        for( int i=0, n=sizeof(arc_types)/sizeof(arc_types[0]); i<n; ++i )
    96             suffixes[ARCHIVE] << QString::fromAscii(arc_types[i]);
    97         fileIcons[ARCHIVE]  = QIcon::fromTheme( QString::fromAscii("package-x-generic"), fallback );
     96            suffixes[ARCHIVE] << QString::fromLatin1(arc_types[i]);
     97        fileIcons[ARCHIVE]  = QIcon::fromTheme( QString::fromLatin1("package-x-generic"), fallback );
    9898
    9999        const char * aud_types[] = {
     
    101101            "mp3", "mpc", "nsf", "oga", "ogg", "ra", "ram", "shn", "voc", "wav", "wma" };
    102102        for( int i=0, n=sizeof(aud_types)/sizeof(aud_types[0]); i<n; ++i )
    103             suffixes[AUDIO] << QString::fromAscii(aud_types[i]);
    104         fileIcons[AUDIO] = QIcon::fromTheme( QString::fromAscii("audio-x-generic"), fallback );
     103            suffixes[AUDIO] << QString::fromLatin1(aud_types[i]);
     104        fileIcons[AUDIO] = QIcon::fromTheme( QString::fromLatin1("audio-x-generic"), fallback );
    105105
    106106        const char * exe_types[] = { "bat", "cmd", "com", "exe" };
    107107        for( int i=0, n=sizeof(exe_types)/sizeof(exe_types[0]); i<n; ++i )
    108             suffixes[APP] << QString::fromAscii(exe_types[i]);
    109         fileIcons[APP] = QIcon::fromTheme( QString::fromAscii("application-x-executable"), fallback );
     108            suffixes[APP] << QString::fromLatin1(exe_types[i]);
     109        fileIcons[APP] = QIcon::fromTheme( QString::fromLatin1("application-x-executable"), fallback );
    110110    }
    111111
Note: See TracChangeset for help on using the changeset viewer.