A couple of dialog modality considerations

While most dialogs can be open and the main application window
can still be accessed, certain should possibly be modal
in these terms.

This patch proposes the download from webservice and DC dialogs
to lock the main application window until they are closed, with
the consideration of preventing eventual unexpected behavior
in the divelist if both dialogs are active at the same time.

To solve that QtDialog::exec() is used instead of
QtWidget::show().

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-06-28 15:12:09 +03:00 committed by Dirk Hohndel
parent 880b8394d2
commit fb4dcbc685
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget* parent, Qt::WindowFlags f) :
void DownloadFromDCWidget::runDialog() void DownloadFromDCWidget::runDialog()
{ {
ui->progressBar->hide(); ui->progressBar->hide();
show(); exec();
} }
void DownloadFromDCWidget::stoppedDownloading() void DownloadFromDCWidget::stoppedDownloading()

View file

@ -139,7 +139,7 @@ void SubsurfaceWebServices::setStatusText(int status)
void SubsurfaceWebServices::runDialog() void SubsurfaceWebServices::runDialog()
{ {
show(); exec();
} }
/* requires that there is a <download> or <error> tag under the <root> tag */ /* requires that there is a <download> or <error> tag under the <root> tag */