Changeset 175 for smplayer/vendor/current/src/favorites.cpp
- Timestamp:
- May 3, 2016, 2:14:41 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified smplayer/vendor/current/src/favorites.cpp ¶
r168 r175 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 4Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 292 292 QRegExp info2("^#EXTINF:(.*),(.*),(.*),(.*)"); 293 293 294 295 294 QFile f( _filename ); 295 if ( f.open( QIODevice::ReadOnly ) ) { 296 296 297 297 f_list.clear(); … … 299 299 Favorite fav; 300 300 301 301 QTextStream stream( &f ); 302 302 stream.setCodec("UTF-8"); 303 303 304 QString line; 305 while ( !stream.atEnd() ) { 306 line = stream.readLine(); // line of text excluding '\n' 304 QString line; 305 while ( !stream.atEnd() ) { 306 line = stream.readLine().trimmed(); 307 if (line.isEmpty()) continue; // Ignore empty lines 307 308 //qDebug("info2.indexIn: %d", info2.indexIn(line)); 308 309 //qDebug("info1.indexIn: %d", info1.indexIn(line)); 309 310 //qDebug( " * line: '%s'", line.toUtf8().data() ); 310 311 if (m3u_id.indexIn(line)!=-1) { 311 312 //#EXTM3U … … 341 342 fav.setSubentry(false); 342 343 } 343 344 344 } 345 f.close(); 345 346 } 346 347 }
Note:
See TracChangeset
for help on using the changeset viewer.