author | erik <erik> | 2007-01-31 22:06:07 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-31 22:06:07 (UTC) |
commit | 9395cf2a65184e493714c699bb23b02ea31feef5 (patch) (unidiff) | |
tree | ea07c026298820559c13ad32e612d51048cee0a9 /noncore/multimedia/opieplayer2/om3u.cpp | |
parent | 958e042c5a4d4e38fd1baae50b78a2febfd306ab (diff) | |
download | opie-9395cf2a65184e493714c699bb23b02ea31feef5.zip opie-9395cf2a65184e493714c699bb23b02ea31feef5.tar.gz opie-9395cf2a65184e493714c699bb23b02ea31feef5.tar.bz2 |
I expanded my audit to include any app I could get to compile in i386.
In that expansion a whole new crop of unchecked returns has sprung up.
This commit fixes those weeds or should I say potential bugs.
Diffstat (limited to 'noncore/multimedia/opieplayer2/om3u.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/om3u.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp index 790fa09..f2a01d3 100644 --- a/noncore/multimedia/opieplayer2/om3u.cpp +++ b/noncore/multimedia/opieplayer2/om3u.cpp | |||
@@ -37,12 +37,15 @@ using namespace Opie::Core; | |||
37 | 37 | ||
38 | //extern PlayListWidget *playList; | 38 | //extern PlayListWidget *playList; |
39 | 39 | ||
40 | Om3u::Om3u( const QString &filePath, int mode) | 40 | Om3u::Om3u( const QString &filePath, int mode) |
41 | : QStringList (){ | 41 | : QStringList () |
42 | { | ||
42 | odebug << "<<<<<<<new m3u "+filePath << oendl; | 43 | odebug << "<<<<<<<new m3u "+filePath << oendl; |
43 | f.setName(filePath); | 44 | f.setName(filePath); |
44 | f.open(mode); | 45 | if (!f.open(mode)) { |
46 | owarn << "Unable to open file " << f.name() << oendl; | ||
47 | } | ||
45 | } | 48 | } |
46 | 49 | ||
47 | Om3u::~Om3u(){} | 50 | Om3u::~Om3u(){} |
48 | 51 | ||
@@ -82,14 +85,8 @@ void Om3u::readPls() { //it's a pls file | |||
82 | s = s.right( s.length() - s.find("=",0,true)-1 ); | 85 | s = s.right( s.length() - s.find("=",0,true)-1 ); |
83 | s = s.stripWhiteSpace(); | 86 | s = s.stripWhiteSpace(); |
84 | s.replace( QRegExp( "%20" )," "); | 87 | s.replace( QRegExp( "%20" )," "); |
85 | // odebug << "adding " + s + " to playlist" << oendl; | 88 | // odebug << "adding " + s + " to playlist" << oendl; |
86 | // numberofentries=2 | ||
87 | // File1=http | ||
88 | // Title | ||
89 | // Length | ||
90 | // Version | ||
91 | // File2=http | ||
92 | s = s.replace( QRegExp( "\\" ), "/" ); | 89 | s = s.replace( QRegExp( "\\" ), "/" ); |
93 | QFileInfo f( s ); | 90 | QFileInfo f( s ); |
94 | QString name = f.baseName(); | 91 | QString name = f.baseName(); |
95 | if( name.left( 4 ) == "http" ) { | 92 | if( name.left( 4 ) == "http" ) { |
@@ -100,11 +97,8 @@ void Om3u::readPls() { //it's a pls file | |||
100 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE) - 1 ); | 97 | name = name.right( name.length() - name.findRev( "\\", -1, TRUE) - 1 ); |
101 | if( s.at( s.length() - 4) == '.') // if this is probably a file | 98 | if( s.at( s.length() - 4) == '.') // if this is probably a file |
102 | append(s); | 99 | append(s); |
103 | else { //if its a url | 100 | else { //if its a url |
104 | // if( name.right( 1 ).find( '/' ) == -1) { | ||
105 | // s += "/"; | ||
106 | // } | ||
107 | append(s); | 101 | append(s); |
108 | } | 102 | } |
109 | } | 103 | } |
110 | } | 104 | } |
@@ -119,9 +113,8 @@ void Om3u::write() { //writes list to m3u file | |||
119 | // odebug << *it << oendl; | 113 | // odebug << *it << oendl; |
120 | t << *it << "\n"; | 114 | t << *it << "\n"; |
121 | } | 115 | } |
122 | } | 116 | } |
123 | // f.close(); | ||
124 | } | 117 | } |
125 | 118 | ||
126 | void Om3u::add(const QString &filePath) { //adds to m3u file | 119 | void Om3u::add(const QString &filePath) { //adds to m3u file |
127 | append(filePath); | 120 | append(filePath); |