diff --git a/apps/opencs/view/doc/loader.cpp b/apps/opencs/view/doc/loader.cpp index a9206ef2b8..3b58904793 100644 --- a/apps/opencs/view/doc/loader.cpp +++ b/apps/opencs/view/doc/loader.cpp @@ -6,9 +6,16 @@ #include #include #include +#include #include "../../model/doc/document.hpp" +void CSVDoc::LoadingDocument::closeEvent (QCloseEvent *event) +{ + event->ignore(); + emit cancel (mDocument); +} + CSVDoc::LoadingDocument::LoadingDocument (CSMDoc::Document *document) : mDocument (document) { diff --git a/apps/opencs/view/doc/loader.hpp b/apps/opencs/view/doc/loader.hpp index a251e75d95..d1c740011d 100644 --- a/apps/opencs/view/doc/loader.hpp +++ b/apps/opencs/view/doc/loader.hpp @@ -26,6 +26,10 @@ namespace CSVDoc QProgressBar *mFileProgress; QProgressBar *mRecordProgress; + private: + + void closeEvent (QCloseEvent *event); + public: LoadingDocument (CSMDoc::Document *document);