Commit 99d4be63 authored by Rohit Yadav's avatar Rohit Yadav

ShareOnInternet: Display error based on result.

parent 27934ab6
......@@ -157,12 +157,19 @@ ShareOnInternet::uploadFinished( QString result )
m_ui.progressBar->setEnabled( false );
m_ui.progressBar->setVisible( false );
QString msg;
if( result != "" )
{
msg = tr( "Your video has been uploaded."
"\nURL (copied to your clipboard):\n%1"
"\n\nOpen this in your default web browser?" ).arg( result );
QApplication::clipboard()->setText( result );
}
else
msg = tr( "Some error has occured while processing your video."
"\nPlease check with your video service provider." );
if( QMessageBox::information( NULL, tr("Video Uploaded"),
tr("Your video has been uploaded."
"\nURL (copied to your clipboard):\n%1"
"\n\nOpen video in your default web browser?").arg( result ),
if( QMessageBox::information( NULL, tr("Video Uploaded"), msg,
QMessageBox::Open | QMessageBox::Close ) == QMessageBox::Open )
{
QDesktopServices::openUrl( result );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment