changeset 268:cf6a4cd0e3f2

fix for #35
author eldar
date Sun, 20 Sep 2009 09:11:51 +0000
parents 1124c49b9d58
children cc9080066035
files qt/d2/qt/Signal.d
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/qt/d2/qt/Signal.d	Fri Sep 11 15:30:46 2009 +0000
+++ b/qt/d2/qt/Signal.d	Sun Sep 20 09:11:51 2009 +0000
@@ -430,18 +430,14 @@
 }
 
 
-private ThreadLocal!(Object) signalSender_;
-static this()
-{
-    signalSender_ = new ThreadLocal!(Object);
-}
+private Object signalSender_;
 
 /**
     If called from a slot, returns the object
     that is emitting the signal. Otherwise, returns null.
 */
 public Object signalSender() {
-    return signalSender_.val;
+    return signalSender_;
 }
 
 public class SignalHandler
@@ -602,11 +598,11 @@
             {
                 {
                     cons.isInUse = true;
-                    signalSender_.val = owner;
+                    signalSender_ = owner;
                     scope(exit)
                     {
                         cons.isInUse = false;
-                        signalSender_.val = null;
+                        signalSender_ = null;
                     }
 
                     // Store the lengths to avoid calling new slots