changeset 289:c9d1aac290e9 signals

clean up of unneeded functionality
author eldar
date Mon, 09 Nov 2009 06:54:04 +0000
parents f9559a957be9
children dcc2b22d1f55
files build/core.txt qt/d2/qt/Signal.d
diffstat 2 files changed, 17 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/build/core.txt	Sun Nov 08 19:28:01 2009 +0000
+++ b/build/core.txt	Mon Nov 09 06:54:04 2009 +0000
@@ -12,19 +12,20 @@
 ## Module specific d files.
 set (d_files
     QGlobal
-    qtd/Array  
+    qtd/Array
     qtd/ArrayOpsPrimitive   
     qtd/Traits
     core/QString
     core/QMetaType
     core/QMetaObject
-    
+
     qtd/MetaMarshall
     qtd/MOC
     qtd/util/Tuple
     qtd/ctfe/Integer
     qtd/ctfe/String
-    qtd/ctfe/Format)
+    qtd/ctfe/Format
+    )
 set (d_version_files 
     QtdObject
     Signal qtd/Str
@@ -45,35 +46,15 @@
     QTimerEvent
     QTranslator
     QByteArray
+    QDataStream
+    QUrl
+    
+    QTime
+    QRegExp
     QLocale
-    QDataStream
-    QMimeData
-    QIODevice
     QDateTime
     QDate
-    QTime
     QBitArray
-    QRegExp
-    QUrl
-    QAbstractItemModel
-    QAbstractFileEngine
-    QFile
-    QDir
-    QFileInfo
-    QTextStream
-    QTimer
-    QTextCodec
-    QTextCodec_ConverterState
-    QTextEncoder
-    QTextDecoder
-    QTimeLine
-    QAbstractFactory
-    QAbstractListModel
-    QCryptographicHash
-    QSettings
-    QProcess
-    QBuffer
-    QLibraryInfo
-    QXmlStreamEntityResolver
+    QIODevice
     )
 	
--- a/qt/d2/qt/Signal.d	Sun Nov 08 19:28:01 2009 +0000
+++ b/qt/d2/qt/Signal.d	Mon Nov 09 06:54:04 2009 +0000
@@ -120,14 +120,9 @@
 */
 
 
-// need this to mark static metamethods-info whether it's generated by presence of default args
-enum DefaultArgs
-{
-    None, Start, Continue
-}
 
 // templates for extracting data from static meta-information of signals, slots or properties
-// public alias TypeTuple!("name", index, OwnerClass, DefaultArgs.Start, ArgTypes) __signal
+// public alias TypeTuple!("name", index, OwnerClass, ArgTypes) __signal
 template MetaEntryName(source...)
 {
     enum MetaEntryName = source[0]; // name of the metaentry is the first element
@@ -141,7 +136,7 @@
 
 template MetaEntryArgs(source...)
 {
-    alias source[4 .. $] MetaEntryArgs; // arguments-tuple starts from the fourth position
+    alias source[3 .. $] MetaEntryArgs; // arguments-tuple starts from the fourth position
 }
 
 template TupleWrapper(A...) { alias A at; }
@@ -472,31 +467,16 @@
                 mixin (SignalEmitter!(ArgTypes)(SignalType.NewSignal, getFunc!_Name(fullName), defVals, localIndex));
             }
         }
-        mixin InsertMetaMethod!(fullName, metaPrefix, index, defValsLength, DefaultArgs.Start, ArgTypes);
+        mixin InsertMetaMethod!(fullName, metaPrefix, index, defValsLength, ArgTypes);
 //        pragma (msg, ctfe_meta_signal!(ArgTypes)(fullName, index, defValsLength));
     }
 }
-template InsertMetaMethod(string fullName, string metaPrefix, int index, int defValsCount, DefaultArgs defArgsInitFlag, ArgTypes...)
+template InsertMetaMethod(string fullName, string metaPrefix, int index, int defValsCount, ArgTypes...)
 {
-    // this identifies if metamethod is was generated by the presence of default args or not
+    static if(defValsCount >= 0)
+        mixin("public alias TypeTuple!(\"" ~ getFunc!_Name(fullName) ~ "\", index, typeof(this), ArgTypes) " ~ metaPrefix ~ toStringNow!(index) ~ ";");
     static if(defValsCount > 0)
-    {
-        static if (defArgsInitFlag == DefaultArgs.Start)
-            enum defValsFlag = DefaultArgs.Start;
-        else
-            enum defValsFlag = DefaultArgs.Continue;
-    }
-    else
-    {
-        static if (defArgsInitFlag == DefaultArgs.Start)
-            enum defValsFlag = DefaultArgs.None;
-        else
-            enum defValsFlag = DefaultArgs.Continue;
-    }
-    static if(defValsCount >= 0)
-        mixin("public alias TypeTuple!(\"" ~ getFunc!_Name(fullName) ~ "\", index, typeof(this), defValsFlag, ArgTypes) " ~ metaPrefix ~ toStringNow!(index) ~ ";");
-    static if(defValsCount > 0)
-        mixin InsertMetaMethod!(fullName, metaPrefix, index+1, defValsCount-1, DefaultArgs.Continue, ArgTypes[0..$-1]);
+        mixin InsertMetaMethod!(fullName, metaPrefix, index+1, defValsCount-1, ArgTypes[0..$-1]);
 }