]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/storeprogress.hpp
Prevent Qt from crashing PV by only showing the first error
[pulseview.git] / pv / dialogs / storeprogress.hpp
index c42566289f83e5e7ee4656a4f6f94b87e6c32f3a..730a9e423d9a51aec37d2b9177106288202770fe 100644 (file)
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP
-#define PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP
+#ifndef PULSEVIEW_PV_DIALOGS_STOREPROGRESS_HPP
+#define PULSEVIEW_PV_DIALOGS_STOREPROGRESS_HPP
 
+#include <atomic>
 #include <memory>
 #include <set>
 
@@ -27,6 +28,7 @@
 
 #include <pv/storesession.hpp>
 
+using std::atomic;
 using std::map;
 using std::pair;
 using std::shared_ptr;
@@ -63,9 +65,10 @@ private Q_SLOTS:
 
 private:
        pv::StoreSession session_;
+       atomic<bool> showing_error_;
 };
 
 }  // namespace dialogs
 }  // namespace pv
 
-#endif // PULSEVIEW_PV_DIALOGS_SAVEPROGRESS_HPP
+#endif // PULSEVIEW_PV_DIALOGS_STOREPROGRESS_HPP