author | llornkcor <llornkcor> | 2002-11-14 04:07:28 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-14 04:07:28 (UTC) |
commit | 9daeebf24f8a7cb00216df90527d993c5ff7df0d (patch) (unidiff) | |
tree | e5e2c504a92ee6144e969eff11da95643b7eb001 | |
parent | 736339b62f325652b71615b8c3fbc0b064fcf837 (diff) | |
download | opie-9daeebf24f8a7cb00216df90527d993c5ff7df0d.zip opie-9daeebf24f8a7cb00216df90527d993c5ff7df0d.tar.gz opie-9daeebf24f8a7cb00216df90527d993c5ff7df0d.tar.bz2 |
cleanup compiler warnings
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 53cd00e..593f072 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp | |||
@@ -105,25 +105,25 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
105 | 105 | ||
106 | Config cfg( "OpiePlayer" ); | 106 | Config cfg( "OpiePlayer" ); |
107 | bool b= cfg.readBoolEntry("FullScreen", 0); | 107 | bool b= cfg.readBoolEntry("FullScreen", 0); |
108 | mediaPlayerState->setFullscreen( b ); | 108 | mediaPlayerState->setFullscreen( b ); |
109 | pmView->setItemChecked( -16, b ); | 109 | pmView->setItemChecked( -16, b ); |
110 | 110 | ||
111 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", | 111 | (void)new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", |
112 | d->selectedFiles, SLOT(moveSelectedUp() ) ); | 112 | d->selectedFiles, SLOT(moveSelectedUp() ) ); |
113 | (void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", | 113 | (void)new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", |
114 | d->selectedFiles, SLOT(removeSelected() ) ); | 114 | d->selectedFiles, SLOT(removeSelected() ) ); |
115 | (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", | 115 | (void)new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", |
116 | d->selectedFiles, SLOT(moveSelectedDown() ) ); | 116 | d->selectedFiles, SLOT(moveSelectedDown() ) ); |
117 | QVBox *stretch2 = new QVBox( vbox1 ); | 117 | // QVBox *stretch2 = new QVBox( vbox1 ); |
118 | 118 | ||
119 | connect( tbDeletePlaylist, ( SIGNAL( released() ) ), | 119 | connect( tbDeletePlaylist, ( SIGNAL( released() ) ), |
120 | SLOT( deletePlaylist() ) ); | 120 | SLOT( deletePlaylist() ) ); |
121 | connect( pmView, SIGNAL( activated( int ) ), | 121 | connect( pmView, SIGNAL( activated( int ) ), |
122 | this, SLOT( pmViewActivated( int ) ) ); | 122 | this, SLOT( pmViewActivated( int ) ) ); |
123 | connect( skinsMenu, SIGNAL( activated( int ) ) , | 123 | connect( skinsMenu, SIGNAL( activated( int ) ) , |
124 | this, SLOT( skinsMenuActivated( int ) ) ); | 124 | this, SLOT( skinsMenuActivated( int ) ) ); |
125 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), | 125 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int) ), |
126 | this,SLOT( playlistViewPressed( int, QListViewItem *, const QPoint&, int ) ) ); | 126 | this,SLOT( playlistViewPressed( int, QListViewItem *, const QPoint&, int ) ) ); |
127 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int ) ), | 127 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int ) ), |
128 | this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int ) ) ); | 128 | this,SLOT( viewPressed( int, QListViewItem *, const QPoint&, int ) ) ); |
129 | connect( audioView, SIGNAL( returnPressed( QListViewItem *) ), | 129 | connect( audioView, SIGNAL( returnPressed( QListViewItem *) ), |
@@ -289,39 +289,39 @@ void PlayListWidget::addAllToList() { | |||
289 | for ( ; videoIt.current(); ++videoIt ) { | 289 | for ( ; videoIt.current(); ++videoIt ) { |
290 | filename = videoIt.current()->text(3); | 290 | filename = videoIt.current()->text(3); |
291 | lnk.setName( QFileInfo(filename).baseName() ); //sets name | 291 | lnk.setName( QFileInfo(filename).baseName() ); //sets name |
292 | lnk.setFile( filename ); //sets file name | 292 | lnk.setFile( filename ); //sets file name |
293 | d->selectedFiles->addToSelection( lnk); | 293 | d->selectedFiles->addToSelection( lnk); |
294 | } | 294 | } |
295 | 295 | ||
296 | // d->selectedFiles->addToSelection( ); | 296 | // d->selectedFiles->addToSelection( ); |
297 | // if ( it.current()->isSelected() ) | 297 | // if ( it.current()->isSelected() ) |
298 | // lst->append( audioIt.current() ); | 298 | // lst->append( audioIt.current() ); |
299 | // } | 299 | // } |
300 | 300 | ||
301 | /* | 301 | |
302 | if(!audioScan) | 302 | // if(!audioScan) |
303 | scanForAudio(); | 303 | // scanForAudio(); |
304 | if(!videoScan) | 304 | // if(!videoScan) |
305 | scanForVideo(); | 305 | // scanForVideo(); |
306 | 306 | ||
307 | DocLnkSet filesAll; | 307 | // DocLnkSet filesAll; |
308 | Global::findDocuments(&filesAll, "video/*;"+audioMimes); | 308 | // Global::findDocuments(&filesAll, "video/*;"+audioMimes); |
309 | QListIterator<DocLnk> Adit( filesAll.children() ); | 309 | // QListIterator<DocLnk> Adit( filesAll.children() ); |
310 | for ( ; Adit.current(); ++Adit ) { | 310 | // for ( ; Adit.current(); ++Adit ) { |
311 | if( QFileInfo( Adit.current()->file() ).exists() ) { | 311 | // if( QFileInfo( Adit.current()->file() ).exists() ) { |
312 | d->selectedFiles->addToSelection( **Adit ); | 312 | // d->selectedFiles->addToSelection( **Adit ); |
313 | } | 313 | // } |
314 | } | 314 | // } |
315 | */ | 315 | |
316 | // qDebug("elapsed time %d", t.elapsed() ); | 316 | // qDebug("elapsed time %d", t.elapsed() ); |
317 | 317 | ||
318 | tabWidget->setCurrentPage(0); | 318 | tabWidget->setCurrentPage(0); |
319 | 319 | ||
320 | writeCurrentM3u(); | 320 | writeCurrentM3u(); |
321 | d->selectedFiles->first(); | 321 | d->selectedFiles->first(); |
322 | } | 322 | } |
323 | 323 | ||
324 | 324 | ||
325 | void PlayListWidget::addAllMusicToList() { | 325 | void PlayListWidget::addAllMusicToList() { |
326 | 326 | ||
327 | if(!audioScan) { | 327 | if(!audioScan) { |
@@ -711,25 +711,25 @@ void PlayListWidget::scanForVideo() { | |||
711 | QListIterator<DocLnk> sdit( vFiles.children() ); | 711 | QListIterator<DocLnk> sdit( vFiles.children() ); |
712 | for ( ; sdit.current(); ++sdit ) { | 712 | for ( ; sdit.current(); ++sdit ) { |
713 | delete sdit.current(); | 713 | delete sdit.current(); |
714 | } | 714 | } |
715 | Global::findDocuments(&vFiles, "video/*"); | 715 | Global::findDocuments(&vFiles, "video/*"); |
716 | videoScan = true; | 716 | videoScan = true; |
717 | populateVideoView(); | 717 | populateVideoView(); |
718 | } | 718 | } |
719 | 719 | ||
720 | void PlayListWidget::populateAudioView() { | 720 | void PlayListWidget::populateAudioView() { |
721 | audioView->clear(); | 721 | audioView->clear(); |
722 | StorageInfo storageInfo; | 722 | StorageInfo storageInfo; |
723 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 723 | // const QList<FileSystem> &fs = storageInfo.fileSystems(); |
724 | if(!audioScan) { | 724 | if(!audioScan) { |
725 | scanForAudio(); | 725 | scanForAudio(); |
726 | } | 726 | } |
727 | 727 | ||
728 | QListIterator<DocLnk> dit( files.children() ); | 728 | QListIterator<DocLnk> dit( files.children() ); |
729 | // QListIterator<FileSystem> it ( fs ); | 729 | // QListIterator<FileSystem> it ( fs ); |
730 | audioView->clear(); | 730 | audioView->clear(); |
731 | 731 | ||
732 | QString storage; | 732 | QString storage; |
733 | for ( ; dit.current(); ++dit ) { | 733 | for ( ; dit.current(); ++dit ) { |
734 | // // for( ; it.current(); ++it ){ | 734 | // // for( ; it.current(); ++it ){ |
735 | // const QString name = (*dit)->name(); | 735 | // const QString name = (*dit)->name(); |
@@ -753,25 +753,25 @@ void PlayListWidget::populateAudioView() { | |||
753 | dit.current()->file() ); | 753 | dit.current()->file() ); |
754 | newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); | 754 | newItem->setPixmap( 0, Resource::loadPixmap( "opieplayer2/musicfile" ) ); |
755 | // qDebug("<<<< "+dit.current()->file()); | 755 | // qDebug("<<<< "+dit.current()->file()); |
756 | } | 756 | } |
757 | } | 757 | } |
758 | audioPopulated=true; | 758 | audioPopulated=true; |
759 | } | 759 | } |
760 | 760 | ||
761 | 761 | ||
762 | void PlayListWidget::populateVideoView() { | 762 | void PlayListWidget::populateVideoView() { |
763 | videoView->clear(); | 763 | videoView->clear(); |
764 | StorageInfo storageInfo; | 764 | StorageInfo storageInfo; |
765 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 765 | // const QList<FileSystem> &fs = storageInfo.fileSystems(); |
766 | 766 | ||
767 | if(!videoScan ) { | 767 | if(!videoScan ) { |
768 | scanForVideo(); | 768 | scanForVideo(); |
769 | } | 769 | } |
770 | 770 | ||
771 | QListIterator<DocLnk> Vdit( vFiles.children() ); | 771 | QListIterator<DocLnk> Vdit( vFiles.children() ); |
772 | // QListIterator<FileSystem> it ( fs ); | 772 | // QListIterator<FileSystem> it ( fs ); |
773 | videoView->clear(); | 773 | videoView->clear(); |
774 | QString storage, pathName; | 774 | QString storage, pathName; |
775 | for ( ; Vdit.current(); ++Vdit ) { | 775 | for ( ; Vdit.current(); ++Vdit ) { |
776 | // // for( ; it.current(); ++it ) { | 776 | // // for( ; it.current(); ++it ) { |
777 | // const QString name = (*Vdit)->name(); | 777 | // const QString name = (*Vdit)->name(); |
@@ -795,25 +795,25 @@ void PlayListWidget::populateVideoView() { | |||
795 | 795 | ||
796 | 796 | ||
797 | void PlayListWidget::openFile() { | 797 | void PlayListWidget::openFile() { |
798 | // http://66.28.164.33:2080 | 798 | // http://66.28.164.33:2080 |
799 | // http://somafm.com/star0242.m3u | 799 | // http://somafm.com/star0242.m3u |
800 | QString filename, name; | 800 | QString filename, name; |
801 | InputDialog *fileDlg; | 801 | InputDialog *fileDlg; |
802 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); | 802 | fileDlg = new InputDialog(this,tr("Open file or URL"),TRUE, 0); |
803 | fileDlg->exec(); | 803 | fileDlg->exec(); |
804 | if( fileDlg->result() == 1 ) { | 804 | if( fileDlg->result() == 1 ) { |
805 | filename = fileDlg->text(); | 805 | filename = fileDlg->text(); |
806 | qDebug( "Selected filename is " + filename ); | 806 | qDebug( "Selected filename is " + filename ); |
807 | Om3u *m3uList; | 807 | // Om3u *m3uList; |
808 | DocLnk lnk; | 808 | DocLnk lnk; |
809 | Config cfg( "OpiePlayer" ); | 809 | Config cfg( "OpiePlayer" ); |
810 | cfg.setGroup("PlayList"); | 810 | cfg.setGroup("PlayList"); |
811 | 811 | ||
812 | if(filename.left(4) == "http") { | 812 | if(filename.left(4) == "http") { |
813 | QString m3uFile, m3uFilePath; | 813 | QString m3uFile, m3uFilePath; |
814 | if(filename.find(":",8,TRUE) != -1) { //found a port | 814 | if(filename.find(":",8,TRUE) != -1) { //found a port |
815 | m3uFile = filename.left( filename.find( ":",8,TRUE)); | 815 | m3uFile = filename.left( filename.find( ":",8,TRUE)); |
816 | m3uFile = m3uFile.right( 7); | 816 | m3uFile = m3uFile.right( 7); |
817 | } else if(filename.left(4) == "http"){ | 817 | } else if(filename.left(4) == "http"){ |
818 | m3uFile=filename; | 818 | m3uFile=filename; |
819 | m3uFile = m3uFile.right( m3uFile.length() - 7); | 819 | m3uFile = m3uFile.right( m3uFile.length() - 7); |
@@ -1120,25 +1120,25 @@ void PlayListWidget::populateSkinsMenu() { | |||
1120 | } | 1120 | } |
1121 | if( skinName == "default" ) { | 1121 | if( skinName == "default" ) { |
1122 | defaultSkinIndex = item; | 1122 | defaultSkinIndex = item; |
1123 | } | 1123 | } |
1124 | if( skinName == skin ) { | 1124 | if( skinName == skin ) { |
1125 | skinsMenu->setItemChecked( item, TRUE ); | 1125 | skinsMenu->setItemChecked( item, TRUE ); |
1126 | } | 1126 | } |
1127 | ++it; | 1127 | ++it; |
1128 | } | 1128 | } |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | void PlayListWidget::skinsMenuActivated( int item ) { | 1131 | void PlayListWidget::skinsMenuActivated( int item ) { |
1132 | for( int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { | 1132 | for(unsigned int i = defaultSkinIndex; i > defaultSkinIndex - skinsMenu->count(); i-- ) { |
1133 | skinsMenu->setItemChecked( i, FALSE ); | 1133 | skinsMenu->setItemChecked( i, FALSE ); |
1134 | } | 1134 | } |
1135 | skinsMenu->setItemChecked( item, TRUE ); | 1135 | skinsMenu->setItemChecked( item, TRUE ); |
1136 | 1136 | ||
1137 | Config cfg( "OpiePlayer" ); | 1137 | Config cfg( "OpiePlayer" ); |
1138 | cfg.setGroup("Options"); | 1138 | cfg.setGroup("Options"); |
1139 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); | 1139 | cfg.writeEntry("Skin", skinsMenu->text( item ) ); |
1140 | QMessageBox::warning( this, tr( "OpiePlayer" ), | 1140 | QMessageBox::warning( this, tr( "OpiePlayer" ), |
1141 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); | 1141 | tr( "You must <b>restart</b> Opieplayer<br>to see your changes." ) ); |
1142 | } | 1142 | } |
1143 | 1143 | ||
1144 | int PlayListWidget::whichList() { | 1144 | int PlayListWidget::whichList() { |