]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/InGuiThread.h
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / InGuiThread.h
index f27317f4c891b30541283a153e713d1671fea771..ea5d64b0ddd4481abceba84065d359c801d3653a 100644 (file)
 #include <QObject>
 #include <QWaitCondition>
 
-#include "frontends/Application.h"
 #include "support/bind.h"
 #include "support/functional.h"
 
+#if QT_VERSION < 0x040400
+#define Q_EMIT
+#endif
+
 namespace lyx {
 namespace frontend {
 
@@ -59,10 +62,7 @@ public:
        R call(F f)
        {
                func_ = f;
-               if (theApp() == 0)
-                       synchronousFunctionCall();
-               else 
-                       callInGuiThread();
+               callInGuiThread();
                return return_value_;
        }
 
@@ -125,10 +125,7 @@ public:
        void call(F f)
        {
                func_ = f;
-               if (theApp() == 0)
-                       synchronousFunctionCall();
-               else 
-                       callInGuiThread();
+               callInGuiThread();
        }
 
        template<class F, class P1>