logic: Ask user before reparsing the project

While the message box with the question is visible the ui is blocked. A message appears when:
* when project was edited
* when preferences were edited
* when project file has more recent changes than db
* when db has a different version than Coati
This commit is contained in:
Eberhard Graether
2016-04-24 22:47:39 +02:00
parent a6e57a6564
commit 6be207a68a
16 changed files with 342 additions and 70 deletions
+9
View File
@@ -46,6 +46,8 @@ public:
virtual void activateWindow();
virtual void updateRecentProjectMenu();
virtual int confirm(const std::string& message, const std::vector<std::string>& options);
private:
void handleMessage(MessageForceEnterLicense* message);
void handleMessage(MessageProjectNew* message);
@@ -59,6 +61,8 @@ private:
void doUpdateRecentProjectMenu();
void doForceLicenseScreen(bool expired);
void doConfirm(const std::string& message, const std::vector<std::string>& options);
std::shared_ptr<QtMainWindow> m_window;
std::vector<View*> m_views;
@@ -69,6 +73,11 @@ private:
QtThreadedFunctor<> m_activateWindowFunctor;
QtThreadedFunctor<> m_updateRecentProjectMenuFunctor;
QtThreadedFunctor<bool> m_forceLicenseScreenFunctor;
QtThreadedFunctor<const std::string&, const std::vector<std::string>&> m_confirmFunctor;
std::mutex m_confirmMutex;
bool m_confirmDone;
int m_confirmResult;
};
#endif // QT_MAIN_VIEW_H