sruthi devi | 7 Feb 09:57
Picon

patch for bug number 223558

Hello,
  This is patch for bug number 223558.https://bugs.kde.org/show_bug.cgi?id=223558
In tools->script builder->simclock lack description
Applying this patch on kstars/kstars/tools/scriptbuilder.cpp will resolve the issue.

Regards,
Sruthi Devi

Index: scriptbuilder.cpp
===================================================================
--- scriptbuilder.cpp	(revision 1086397)
+++ scriptbuilder.cpp	(working copy)
@@ -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)
     {
_______________________________________________
Kstars-devel mailing list
Kstars-devel <at> kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel

Gmane