summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp35
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp44
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp23
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h5
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp3
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp9
8 files changed, 24 insertions, 99 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 248221b..8afb318 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -130,21 +130,13 @@ void Lib::initialize()
130 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL ); 130 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL );
131 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this ); 131 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this );
132 132
133
134//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL);
135
136
137// null_display_handler( m_videoOutput, xine_display_frame, this );
138
139 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 133 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
140 134
141 if (m_wid != 0 ) { 135 if (m_wid != 0 )
142 printf( "!0\n" );
143 setWidget( m_wid ); 136 setWidget( m_wid );
144 }
145 137
146 m_queue = xine_event_new_queue (m_stream);
147 138
139 m_queue = xine_event_new_queue (m_stream);
148 xine_event_create_listener_thread (m_queue, xine_event_handler, this); 140 xine_event_create_listener_thread (m_queue, xine_event_handler, this);
149 141
150 ::null_preload_decoders( m_stream ); 142 ::null_preload_decoders( m_stream );
@@ -159,12 +151,10 @@ Lib::~Lib() {
159// free( m_config ); 151// free( m_config );
160 152
161 xine_close( m_stream ); 153 xine_close( m_stream );
162
163 xine_event_dispose_queue( m_queue ); 154 xine_event_dispose_queue( m_queue );
164
165 xine_dispose( m_stream ); 155 xine_dispose( m_stream );
166
167 xine_exit( m_xine ); 156 xine_exit( m_xine );
157
168 /* FIXME either free or delete but valgrind bitches against both */ 158 /* FIXME either free or delete but valgrind bitches against both */
169 //free( m_videoOutput ); 159 //free( m_videoOutput );
170 //delete m_audioOutput; 160 //delete m_audioOutput;
@@ -199,15 +189,9 @@ int Lib::subVersion() {
199 189
200int Lib::play( const QString& fileName, int startPos, int start_time ) { 190int Lib::play( const QString& fileName, int startPos, int start_time ) {
201 assert( m_initialized ); 191 assert( m_initialized );
202 // FIXME actually a hack imho. Should not be needed to dispose the whole stream
203 // but without we get wrong media length reads from libxine for the second media
204 //xine_dispose ( m_stream );
205 192
206 QString str = fileName.stripWhiteSpace(); 193 QString str = fileName.stripWhiteSpace();
207 194
208 //m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
209 //m_queue = xine_event_new_queue (m_stream);
210 //xine_event_create_listener_thread (m_queue, xine_event_handler, this);
211 195
212 if ( !xine_open( m_stream, str.utf8().data() ) ) { 196 if ( !xine_open( m_stream, str.utf8().data() ) ) {
213 return 0; 197 return 0;
@@ -217,8 +201,6 @@ int Lib::play( const QString& fileName, int startPos, int start_time ) {
217 201
218void Lib::stop() { 202void Lib::stop() {
219 assert( m_initialized ); 203 assert( m_initialized );
220
221 odebug << "<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>" << oendl;
222 xine_stop( m_stream ); 204 xine_stop( m_stream );
223} 205}
224 206
@@ -258,13 +240,13 @@ int Lib::currentTime() const {
258 assert( m_initialized ); 240 assert( m_initialized );
259 241
260 int pos, time, length; 242 int pos, time, length;
261 xine_get_pos_length( m_stream, &pos, &time, &length ); 243 pos = time = length = 0;
262 if ( time > 0 ) { 244
245 if ( xine_get_pos_length( m_stream, &pos, &time, &length ) )
263 return time/1000; 246 return time/1000;
264 } else { 247 else
265 return 0; 248 return 0;
266 } 249 }
267}
268 250
269int Lib::length() const { 251int Lib::length() const {
270 assert( m_initialized ); 252 assert( m_initialized );
@@ -300,8 +282,6 @@ bool Lib::isSeekable() const {
300void Lib::seekTo( int time ) { 282void Lib::seekTo( int time ) {
301 assert( m_initialized ); 283 assert( m_initialized );
302 284
303 //xine_trick_mode ( m_stream, XINE_TRICK_MODE_SEEK_TO_TIME, time ); NOT IMPLEMENTED YET IN XINE :_(
304 // since its now milliseconds we need *1000
305 xine_play( m_stream, 0, time*1000 ); 285 xine_play( m_stream, 0, time*1000 );
306} 286}
307 287
@@ -425,7 +405,6 @@ void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
425 assert( m_initialized ); 405 assert( m_initialized );
426 406
427 if ( !m_video ) { 407 if ( !m_video ) {
428 owarn << "not showing video now" << oendl;
429 return; 408 return;
430 } 409 }
431 410
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index e6afbd8..b8023ca 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -5,6 +5,7 @@
5 5
6/* OPIE */ 6/* OPIE */
7#include <opie2/odebug.h> 7#include <opie2/odebug.h>
8#include <opie2/odevice.h>
8#include <qpe/qpeapplication.h> 9#include <qpe/qpeapplication.h>
9#include <qpe/config.h> 10#include <qpe/config.h>
10 11
@@ -34,10 +35,6 @@ MediaPlayer::MediaPlayer( PlayListWidget &_playList, MediaPlayerState &_mediaPla
34 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 35 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
35 36
36 connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); 37 connect( &mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
37
38// What is pauseCheck good for? (Simon)
39// connect( &mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pauseCheck(bool) ) );
40
41 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 38 connect( &mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
42 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 39 connect( &mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
43 connect( &mediaPlayerState, SIGNAL( blankToggled(bool) ), this, SLOT ( blank(bool) ) ); 40 connect( &mediaPlayerState, SIGNAL( blankToggled(bool) ), this, SLOT ( blank(bool) ) );
@@ -281,42 +278,7 @@ void MediaPlayer::timerEvent( QTimerEvent * ) {
281 278
282 279
283void MediaPlayer::blank( bool b ) { 280void MediaPlayer::blank( bool b ) {
284#ifdef QT_QWS_DEVFS 281 Opie::Core::ODevice::inst()->setDisplayStatus( b );
285 fd=open("/dev/fb/0",O_RDWR);
286#else
287 fd=open("/dev/fb0",O_RDWR);
288#endif
289#ifdef QT_QWS_SL5XXX
290 fl= open( "/dev/fl", O_RDWR );
291#endif
292 if (fd != -1) {
293 if ( b ) {
294 odebug << "do blanking" << oendl;
295#ifdef QT_QWS_SL5XXX
296 ioctl( fd, FBIOBLANK, 1 );
297 if(fl !=-1) {
298 ioctl( fl, 2 );
299 ::close(fl);
300 }
301#else
302 ioctl( fd, FBIOBLANK, 3 );
303#endif
304 isBlanked = TRUE;
305 } else {
306 odebug << "do unblanking" << oendl;
307 ioctl( fd, FBIOBLANK, 0);
308#ifdef QT_QWS_SL5XXX
309 if(fl != -1) {
310 ioctl( fl, 1);
311 ::close(fl);
312 }
313#endif
314 isBlanked = FALSE;
315 }
316 close( fd );
317 } else {
318 odebug << "<< /dev/fb0 could not be opened >>" << oendl;
319 }
320} 282}
321 283
322void MediaPlayer::keyReleaseEvent( QKeyEvent *e) { 284void MediaPlayer::keyReleaseEvent( QKeyEvent *e) {
@@ -346,8 +308,6 @@ void MediaPlayer::cleanUp() {// this happens on closing
346 mediaPlayerState.writeConfig( cfg ); 308 mediaPlayerState.writeConfig( cfg );
347 playList.writeDefaultPlaylist( ); 309 playList.writeDefaultPlaylist( );
348 310
349// QPEApplication::grabKeyboard();
350// QPEApplication::ungrabKeyboard();
351} 311}
352 312
353void MediaPlayer::recreateAudioAndVideoWidgets() const 313void MediaPlayer::recreateAudioAndVideoWidgets() const
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 563ccf5..880b295 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -48,11 +48,10 @@ void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount
48 buttonMask = skin.buttonMask( skinInfo, buttonCount ); 48 buttonMask = skin.buttonMask( skinInfo, buttonCount );
49 49
50 buttons.clear(); 50 buttons.clear();
51 buttons.reserve( buttonCount );
52 51
53 for ( uint i = 0; i < buttonCount; ++i ) { 52 for ( uint i = 0; i < buttonCount; ++i ) {
54 Button button = setupButton( skinInfo[ i ], skin ); 53 Button button = setupButton( skinInfo[ i ], skin );
55 buttons.push_back( button ); 54 buttons.append( button );
56 } 55 }
57} 56}
58 57
@@ -87,16 +86,10 @@ void MediaWidget::closeEvent( QCloseEvent * )
87 mediaPlayerState.setList(); 86 mediaPlayerState.setList();
88} 87}
89 88
90void MediaWidget::paintEvent( QPaintEvent *pe ) 89void MediaWidget::paintEvent( QPaintEvent * )
91{ 90{
92 QPainter p( this ); 91 QPainter p( this );
93 92
94 if ( mediaPlayerState.isFullscreen() ) {
95 // Clear the background
96 p.setBrush( QBrush( Qt::black ) );
97 return;
98 }
99
100 QPixmap buffer( size() ); 93 QPixmap buffer( size() );
101 QPainter bufferedPainter( &buffer ); 94 QPainter bufferedPainter( &buffer );
102 bufferedPainter.drawTiledPixmap( rect(), backgroundPixmap, QPoint( 0, 0 ) ); 95 bufferedPainter.drawTiledPixmap( rect(), backgroundPixmap, QPoint( 0, 0 ) );
@@ -109,7 +102,7 @@ void MediaWidget::resizeEvent( QResizeEvent *e )
109 QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, upperLeftOfButtonMask ); 102 QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, upperLeftOfButtonMask );
110 QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, upperLeftOfButtonMask ); 103 QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, upperLeftOfButtonMask );
111 104
112 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) { 105 for ( ButtonVector::Iterator it = buttons.begin(); it != buttons.end(); ++it ) {
113 Button &button = *it; 106 Button &button = *it;
114 107
115 if ( button.mask.isNull() ) 108 if ( button.mask.isNull() )
@@ -129,8 +122,8 @@ MediaWidget::Button *MediaWidget::buttonAt( const QPoint &position )
129 return 0; 122 return 0;
130 123
131 int pixelIdx = buttonMask.pixelIndex( position.x(), position.y() ); 124 int pixelIdx = buttonMask.pixelIndex( position.x(), position.y() );
132 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) 125 for ( ButtonVector::Iterator it = buttons.begin(); it != buttons.end(); ++it )
133 if ( it->command + 1 == pixelIdx ) 126 if ( (*it).command + 1 == pixelIdx )
134 return &( *it ); 127 return &( *it );
135 128
136 return 0; 129 return 0;
@@ -201,7 +194,7 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const
201 194
202void MediaWidget::paintAllButtons( QPainter &p ) 195void MediaWidget::paintAllButtons( QPainter &p )
203{ 196{
204 for ( ButtonVector::const_iterator it = buttons.begin(); 197 for ( ButtonVector::ConstIterator it = buttons.begin();
205 it != buttons.end(); ++it ) 198 it != buttons.end(); ++it )
206 paintButton( p, *it ); 199 paintButton( p, *it );
207} 200}
@@ -222,8 +215,8 @@ void MediaWidget::paintButton( QPainter &p, const Button &button )
222 215
223void MediaWidget::setToggleButton( Command command, bool down ) 216void MediaWidget::setToggleButton( Command command, bool down )
224{ 217{
225 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) 218 for ( ButtonVector::Iterator it = buttons.begin(); it != buttons.end(); ++it )
226 if ( it->command == command ) { 219 if ( (*it).command == command ) {
227 setToggleButton( *it, down ); 220 setToggleButton( *it, down );
228 return; 221 return;
229 } 222 }
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index 8c3a467..d885150 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -29,9 +29,6 @@
29#include "mediaplayerstate.h" 29#include "mediaplayerstate.h"
30#include "playlistwidget.h" 30#include "playlistwidget.h"
31 31
32#include <vector>
33#include <memory>
34
35class Skin; 32class Skin;
36 33
37class MediaWidget : public QWidget 34class MediaWidget : public QWidget
@@ -54,7 +51,7 @@ public:
54 QPixmap pixUp; 51 QPixmap pixUp;
55 QPixmap pixDown; 52 QPixmap pixDown;
56 }; 53 };
57 typedef std::vector<Button> ButtonVector; 54 typedef QValueList<Button> ButtonVector;
58 55
59 struct SkinButtonInfo 56 struct SkinButtonInfo
60 { 57 {
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 36f77be..d73f0cd 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -185,11 +185,9 @@ void PlayListWidget::writeDefaultPlaylist() {
185 QString currentString = config.readEntry( "CurrentPlaylist", filename); 185 QString currentString = config.readEntry( "CurrentPlaylist", filename);
186 if( currentString == filename) { 186 if( currentString == filename) {
187 Om3u *m3uList; 187 Om3u *m3uList;
188 // odebug << "<<<<<<<<<<<<<default>>>>>>>>>>>>>>>>>>>" << oendl;
189 if( d->selectedFiles->first() ) { 188 if( d->selectedFiles->first() ) {
190 m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate); 189 m3uList = new Om3u(filename, IO_ReadWrite | IO_Truncate);
191 do { 190 do {
192 // odebug << d->selectedFiles->current()->file() << oendl;
193 m3uList->add( d->selectedFiles->current()->file() ); 191 m3uList->add( d->selectedFiles->current()->file() );
194 } 192 }
195 while ( d->selectedFiles->next() ); 193 while ( d->selectedFiles->next() );
@@ -208,7 +206,6 @@ void PlayListWidget::addToSelection( const DocLnk& lnk ) {
208 lnk.file().left(4) == "http" ) { 206 lnk.file().left(4) == "http" ) {
209 d->selectedFiles->addToSelection( lnk ); 207 d->selectedFiles->addToSelection( lnk );
210 } 208 }
211// writeCurrentM3u();
212} 209}
213 210
214 211
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 922f9d7..c3c1282 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -183,7 +183,6 @@ void PlayListWidgetGui::setView( char view ) {
183 183
184 184
185void PlayListWidgetGui::setActiveWindow() { 185void PlayListWidgetGui::setActiveWindow() {
186 // odebug << "SETTING active window" << oendl;
187 // When we get raised we need to ensure that it switches views 186 // When we get raised we need to ensure that it switches views
188 MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType(); 187 MediaPlayerState::DisplayType origDisplayType = mediaPlayerState->displayType();
189 mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate 188 mediaPlayerState->setDisplayType( MediaPlayerState::MediaSelection ); // invalidate
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 0625376..2b44701 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -145,6 +145,7 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType )
145 // Effectively blank the view next time we show it so it looks nicer 145 // Effectively blank the view next time we show it so it looks nicer
146 scaledWidth = 0; 146 scaledWidth = 0;
147 scaledHeight = 0; 147 scaledHeight = 0;
148 videoFrame->hide();
148 hide(); 149 hide();
149} 150}
150 151
@@ -194,6 +195,7 @@ void VideoWidget::backToNormal() {
194} 195}
195 196
196void VideoWidget::makeVisible() { 197void VideoWidget::makeVisible() {
198 videoFrame->show();
197 if ( mediaPlayerState.isFullscreen() ) { 199 if ( mediaPlayerState.isFullscreen() ) {
198 showFullScreen(); 200 showFullScreen();
199 resize( qApp->desktop()->size() ); 201 resize( qApp->desktop()->size() );
@@ -204,7 +206,6 @@ void VideoWidget::makeVisible() {
204 disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 206 disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
205 disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); 207 disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
206 disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); 208 disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
207
208 } else { 209 } else {
209 showNormal(); 210 showNormal();
210 showMaximized(); 211 showMaximized();
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 9f944d7..e1816c8 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -81,7 +81,7 @@ void XineControl::init()
81} 81}
82 82
83XineControl::~XineControl() { 83XineControl::~XineControl() {
84#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 84#if !defined(QT_NO_COP)
85 if ( disabledSuspendScreenSaver ) { 85 if ( disabledSuspendScreenSaver ) {
86 disabledSuspendScreenSaver = FALSE; 86 disabledSuspendScreenSaver = FALSE;
87 // Re-enable the suspend mode 87 // Re-enable the suspend mode
@@ -110,12 +110,10 @@ void XineControl::play( const QString& fileName ) {
110 MediaPlayerState::DisplayType displayType; 110 MediaPlayerState::DisplayType displayType;
111 if ( !libXine->hasVideo() ) { 111 if ( !libXine->hasVideo() ) {
112 displayType = MediaPlayerState::Audio; 112 displayType = MediaPlayerState::Audio;
113 odebug << "HAS AUDIO" << oendl;
114 libXine->setShowVideo( false ); 113 libXine->setShowVideo( false );
115 hasAudioChannel = TRUE; 114 hasAudioChannel = TRUE;
116 } else { 115 } else {
117 displayType = MediaPlayerState::Video; 116 displayType = MediaPlayerState::Video;
118 odebug << "HAS VIDEO" << oendl;
119 libXine->setShowVideo( true ); 117 libXine->setShowVideo( true );
120 hasVideoChannel = TRUE; 118 hasVideoChannel = TRUE;
121 } 119 }
@@ -150,7 +148,7 @@ void XineControl::stop( bool isSet ) {
150 if ( !isSet ) { 148 if ( !isSet ) {
151 libXine->stop(); 149 libXine->stop();
152 150
153#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 151#if !defined(QT_NO_COP)
154 if ( disabledSuspendScreenSaver ) { 152 if ( disabledSuspendScreenSaver ) {
155 disabledSuspendScreenSaver = FALSE; 153 disabledSuspendScreenSaver = FALSE;
156 // Re-enable the suspend mode 154 // Re-enable the suspend mode
@@ -176,7 +174,6 @@ long XineControl::currentTime() {
176 // todo: jede sekunde überprüfen 174 // todo: jede sekunde überprüfen
177 m_currentTime = libXine->currentTime(); 175 m_currentTime = libXine->currentTime();
178 return m_currentTime; 176 return m_currentTime;
179 QTimer::singleShot( 1000, this, SLOT( currentTime() ) );
180} 177}
181 178
182/** 179/**
@@ -257,6 +254,8 @@ QString XineControl::getErrorCode() {
257 return tr( "Demuxing failed for this media type" ); 254 return tr( "Demuxing failed for this media type" );
258 } else if ( errorCode == 4 ) { 255 } else if ( errorCode == 4 ) {
259 return tr( "Malformed MRL" ); 256 return tr( "Malformed MRL" );
257 } else if ( errorCode == 5 ) {
258 return tr( "Input failed" );
260 } else { 259 } else {
261 return tr( "Some other error" ); 260 return tr( "Some other error" );
262 } 261 }