Diffstat (limited to 'noncore/multimedia/opieplayer2') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/om3u.cpp | 17 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.cpp | 11 |
3 files changed, 16 insertions, 16 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 84d28ce..5f281b7 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -78,5 +78,5 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
78 | if ( !QFile::exists(configPath) ) { | 78 | if ( !QFile::exists(configPath) ) { |
79 | QFile f(configPath); | 79 | QFile f(configPath); |
80 | f.open(IO_WriteOnly); | 80 | if (f.open(IO_WriteOnly)) { |
81 | QTextStream ts( &f ); | 81 | QTextStream ts( &f ); |
82 | ts << "misc.memcpy_method:glibc\n"; | 82 | ts << "misc.memcpy_method:glibc\n"; |
@@ -92,4 +92,6 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
92 | ts << "audio.passthrough_offset:0\n"; | 92 | ts << "audio.passthrough_offset:0\n"; |
93 | f.close(); | 93 | f.close(); |
94 | } else | ||
95 | owarn << "Failed to open " f.name() << oendl; | ||
94 | } | 96 | } |
95 | 97 | ||
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 | |||
@@ -39,8 +39,11 @@ using namespace Opie::Core; | |||
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 | ||
@@ -84,10 +87,4 @@ void Om3u::readPls() { //it's a pls file | |||
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 ); |
@@ -102,7 +99,4 @@ void Om3u::readPls() { //it's a pls 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 | } |
@@ -121,5 +115,4 @@ void Om3u::write() { //writes list to m3u file | |||
121 | } | 115 | } |
122 | } | 116 | } |
123 | // f.close(); | ||
124 | } | 117 | } |
125 | 118 | ||
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp index b5cac61..5fc8a0b 100644 --- a/noncore/multimedia/opieplayer2/threadutil.cpp +++ b/noncore/multimedia/opieplayer2/threadutil.cpp | |||
@@ -234,10 +234,15 @@ void Thread::exit() | |||
234 | } | 234 | } |
235 | 235 | ||
236 | OnewayNotifier::OnewayNotifier() | 236 | OnewayNotifier::OnewayNotifier() : |
237 | m_readFd(-1), | ||
238 | m_writeFd(-1) | ||
237 | { | 239 | { |
238 | int fds[ 2 ]; | 240 | int fds[ 2 ] = { -1, -1 }; |
239 | pipe( fds ); | 241 | if (pipe( fds ) == 0) { |
240 | m_readFd = fds[ 0 ]; | 242 | m_readFd = fds[ 0 ]; |
241 | m_writeFd = fds[ 1 ]; | 243 | m_writeFd = fds[ 1 ]; |
244 | } else { | ||
245 | owarn << "Call to pipe() failed" << oendl; | ||
246 | } | ||
242 | 247 | ||
243 | m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read ); | 248 | m_notifier = new QSocketNotifier( m_readFd, QSocketNotifier::Read ); |