Add escape route from retries of IPC errors

This commit is contained in:
Bill Somerville 2020-03-11 22:38:41 +00:00
parent c58a690bf1
commit 6a7263dc94
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -1057,9 +1057,14 @@ void MainWindow::release_jt9 ()
{ {
if (!l.remove ()) if (!l.remove ())
{ {
MessageBox::query_message (this if (MessageBox::Cancel == MessageBox::query_message (this
, tr ("Error removing \"%1\" - %2").arg (l.fileName ()).arg (l.errorString ()) , tr ("IPC Error")
, tr ("Click OK to retry")); , tr ("Error removing \"%1\" - %2").arg (l.fileName ()).arg (l.errorString ())
, QString {}
, MessageBox::Retry | MessageBox::Cancel))
{
break;
}
} }
} }
} }
@ -1072,9 +1077,14 @@ void MainWindow::stop_jt9 ()
{ {
if (!q.open (QFile::ReadWrite)) if (!q.open (QFile::ReadWrite))
{ {
MessageBox::query_message (this if (MessageBox::Cancel == MessageBox::query_message (this
, tr ("Error creating \"%1\" - %2").arg (q.fileName ()).arg (q.errorString ()) , tr ("IPC Error")
, tr ("Click OK to retry")); , tr ("Error creating \"%1\" - %2").arg (q.fileName ()).arg (q.errorString ())
, QString {}
, MessageBox::Retry | MessageBox::Cancel))
{
break;
}
} }
} }
release_jt9 (); release_jt9 ();
@ -1086,9 +1096,14 @@ void MainWindow::stop_jt9 ()
{ {
if (!q.remove ()) if (!q.remove ())
{ {
MessageBox::query_message (this if (MessageBox::Cancel == MessageBox::query_message (this
, tr ("Error removing \"%1\" - %2").arg (q.fileName ()).arg (q.errorString ()) , tr ("IPC Error")
, tr ("Click OK to retry")); , tr ("Error removing \"%1\" - %2").arg (q.fileName ()).arg (q.errorString ())
, QString {}
, MessageBox::Retry | MessageBox::Cancel))
{
break;
}
} }
} }
} }