summaryrefslogtreecommitdiff
path: root/src/MainWindow.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-11-06 15:03:01 (GMT)
committerMarius Kintel <marius@kintel.net>2010-11-06 15:03:01 (GMT)
commiteed6e69530486aa57a981940565ffc0013ef5bd7 (patch)
tree38fa69aab967e6eb8ce218bca2bd9abc33c2475d /src/MainWindow.h
parent8623c3f3898a82ae0c593fb93c4e19a43ab6cefd (diff)
Quick&Dirty locking of GUI to avoid running two compilations in parallel
Diffstat (limited to 'src/MainWindow.h')
-rw-r--r--src/MainWindow.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/MainWindow.h b/src/MainWindow.h
index f555906..2c43856 100644
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -157,4 +157,19 @@ public slots:
void autoReloadSet(bool);
};
+class GuiLocker
+{
+public:
+ GuiLocker() {
+ gui_locked++;
+ }
+ ~GuiLocker() {
+ gui_locked--;
+ }
+ static bool isLocked() { return gui_locked > 0; }
+
+private:
+ static unsigned int gui_locked;
+};
+
#endif
contact: Jan Huwald // Impressum