From 64d501d256c9d4f813e639e958e19c8c4db9410c Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 18 Feb 2021 11:55:32 +0000 Subject: [PATCH] Option to retry sample downloads that fail with network errors --- SampleDownloader/FileNode.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SampleDownloader/FileNode.cpp b/SampleDownloader/FileNode.cpp index 66864287a..e274dc5a7 100644 --- a/SampleDownloader/FileNode.cpp +++ b/SampleDownloader/FileNode.cpp @@ -27,7 +27,12 @@ FileNode::FileNode (QTreeWidgetItem * parent void FileNode::error (QString const& title, QString const& message) { - MessageBox::warning_message (treeWidget (), title, message); + if (MessageBox::Retry == MessageBox::warning_message (treeWidget (), title, message + , QString {}, MessageBox::Cancel | MessageBox::Retry + , MessageBox::Cancel)) + { + sync (true); + } } bool FileNode::sync (bool local)