예제 #1
0
void MainWindow::open( const QList< QUrl > & uris ) {
	if( uris.isEmpty() ) {
		return;
	}

	PlayList tracks;

	std::for_each( uris.begin(), uris.end(), [&]( const QUrl & uri ) {
		if( uri.isEmpty() ) {
			return;
		}

		try {
			tracks.append( PlayList::fromURI( uri ) );
		} catch( BaseError & e ) {
			this->showErrorMessage_( tr( "Can not open this file!" ), e.getMessage() );
		}
	} );

	this->ui_->player->append( tracks );
}