Task #1170 Progress bar for meeting details pop-up
[qtmeetings] / src / UserInterface / WindowManager.cpp
index 45d8b72..535434b 100644 (file)
@@ -183,11 +183,11 @@ void WindowManager::closePasswordDialog()
        iPasswordDialog = 0;
 }
 
-void WindowManager::showProgressBar( const QString &aText )
+void WindowManager::showProgressBar( const QString &aText, bool aCancellable )
 {
        qDebug() << "WindowManager::showProgressBar( const QString & )";
        if( iProgressBar == 0 ) {
-               iProgressBar = new ProgressBar( aText );
+               iProgressBar = new ProgressBar( aText, aCancellable );
                iProgressBar->show();
                connect( iProgressBar, SIGNAL( cancel() ), this, SIGNAL( progressBarCancelled() ) );
        }
@@ -198,9 +198,12 @@ void WindowManager::showProgressBar( const QString &aText )
 void WindowManager::closeProgressBar()
 {
        qDebug() << "WindowManager::closeProgressBar()";
-       iProgressBar->close();
-       delete iProgressBar;
-       iProgressBar = 0;
+       if( iProgressBar )
+       {
+               iProgressBar->close();
+               delete iProgressBar;
+               iProgressBar = 0;
+       }
 }
 
 void WindowManager::updateProgressBar( const QString &aMessage )