[Kstars-devel] KDE/kdeedu/kstars/kstars/tools

Alexey Khudyakov alexey.skladnoy at gmail.com
Sun Feb 7 15:44:19 CET 2010


SVN commit 1086512 by khudyakov:

Fix bug in script builder. No description appeared for SimClock
family of functions

Applying patch from Sruthi Devi.

CCMAIL: kstars-devel at kde.org
BUG: 223558

 M  +34 -0     scriptbuilder.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/tools/scriptbuilder.cpp #1086511:1086512
@@ -558,6 +558,9 @@
     //  while ( ! INDIFunctionList.isEmpty() )
     //    delete INDIFunctionList.takeFirst();
 
+    while( !SimClockFunctionList.isEmpty() )
+        delete SimClockFunctionList.takeFirst();
+
     while ( ! ScriptList.isEmpty() )
         delete ScriptList.takeFirst();
 }
@@ -1340,6 +1343,23 @@
             return true;
         }
 
+        foreach ( ScriptFunction *sf, SimClockFunctionList )
+        {
+            if ( fn_name == sf->name() )
+            {
+
+                if ( fn.count() != sf->numArgs()) return false;
+
+                ScriptList.append( new ScriptFunction( sf ) );
+
+                for ( int i=0; i<sf->numArgs(); ++i )
+                    ScriptList.last()->setArg( i, fn[i] );
+
+                return true;
+            }
+
+        }
+
         #if 0
         foreach ( ScriptFunction *sf, INDIFunctionList )
         {
@@ -1422,6 +1442,13 @@
         break;
     }
 
+    foreach ( sc, SimClockFunctionList )
+    if (sc->prototype() == currentItem->text(0))
+    {
+        found = sc;
+        break;
+    }
+
 	 #if 0
     if (found == NULL)
     {
@@ -1917,6 +1944,13 @@
         break;
     }
 
+    foreach ( sc, SimClockFunctionList )
+    if (sc->prototype() == currentItem->text(0))
+    {
+        found = sc;
+        break;
+    }
+
 #if 0
     if (found == NULL)
     {


More information about the Kstars-devel mailing list