Tagged: Bugfix Toggle Comment Threads | Keyboard Shortcuts

  • Akarsh Simha 1:42 am on May 31, 2008 Permalink
    Tags: Bugfix,   

    Two more bugfixes to KStars 

    Fixing bad memory management in the Conjunctions Tool – All my fault! 😀

    Instance management in KSMoon

    • arunchaganty 7:58 pm on May 31, 2008 Permalink | Log in to Reply

      Regd. the 2nd bug fix, doesn’t KDE have a mechanism for taking care of object references? Glib has g_object_ref and g_object_unref, for the same purpose. Also, without looking at the source, the ks_moon is a static *class* variable, does this mean KSMoon is a singleton class? (just out of curiousity), or possibly just the star data is…

    • Akarsh Simha 6:14 am on June 4, 2008 Permalink | Log in to Reply

      I don’t think the KDE API has such a mechanism. Actually, it wouldn’t be as important here, because we are using C++ and not C.
      KSMoon is not a singleton class, but has a few static members in it, that describe coeffecients of various terms in a sinusoidal series used to compute the moon’s position (I don’t know the details).
      Interestingly, this concept struck me because of my minor experience with GLib. g_object_ref and g_object_unref was what gave me the idea of adding a reference count.

    • Gopala Krishna 10:58 am on June 7, 2008 Permalink | Log in to Reply

      Though KDE doesn’t have the reference counting mechanism directly, its inherited from qt4.
      One of the mechanism is using QSharedData and QSharedDataPointer classes, although the classes primarily are for implicit sharing.

      Secondly, qt4.4 has uncovered its atomic api a bit, which helps in safe reference counting across threads. Here is a link

    • Akarsh Simha 8:52 pm on June 8, 2008 Permalink | Log in to Reply

      Ahh… while I think that QSharedDataPointer etc might help here, I think they are too much of an overkill for something as simple as we required here, as you said. Thanks for the information.

  • Akarsh Simha 4:39 am on May 30, 2008 Permalink
    Tags: Bugfix,   

    The find dialog works to my satisfaction, at last! 

    I used to find the Find Dialog in KStars rather inconvenient. I’d just hit Ctrl+F to fire it, type away “M 97”, hit enter, and it would land me at Andromeda Galaxy instead of Owl Nebula – Because that was the default selected entry in the List View and it would update the list view with the new search filter only after some delay (half a second, I think).

    This commit fixes that by keeping track of whether the list has been filtered after the most recent text entry, and ensures that the list is filtered first thing after entering slotOk().

    So you can simply hit Ctrl+F, type away the full name (or even a part of the name – Kentaurus landed me at Alpha Centauri 🙂 ) and hit enter, and it’ll slew you to the right object instead of Andromeda Galaxy. I’ve tried to ensure that it is as bug-free as possible.

    If you’re running on trunk and have kdeedu compiled, please do test it.

    I’ve made 5 commits in 24 hours. This certainly means I need to get a life (and some sleep)!

    • Prasanna 5:01 pm on May 31, 2008 Permalink | Log in to Reply

      One suggestion. Wouldn’t it be nice of you could type ‘m97’ and still find it. Right now, you _have_ to type the whitespace.

    • Akarsh Simha 6:11 am on June 4, 2008 Permalink | Log in to Reply

      Correct. I’ve had trouble with that too.
      It looks a little difficult to change with the current codebase. I’ll think it over and see how I can change this. Atleast, I could provide one solution quickly – if you type “m97” and _no other object matches_ “m97”, then we could interpret that as “m 97” and slew you there.

      Thanks for the suggestion.

    • Akarsh Simha 7:49 am on June 4, 2008 Permalink | Log in to Reply

      Fixed: http://lists.kde.org/?l=kstars-devel&m=121254565830750&w=2

      I managed to provide the general solution itself. Now, as long as you type out M93 and “quickly” hit enter, it will slew to M 93. But if you wait for more than a second, or select one of the other items from the list, it will go to them.

  • Akarsh Simha 10:58 am on May 29, 2008 Permalink
    Tags: Bugfix, ,   

    Fixing minor bug with the Find Dialog in KStars 

    With the find dialog, you couldn’t select genetive names of stars and click ok to find them earlier. The problem was that foo::findByName() would never look at the genetive names of stars. Overriding ListComponent::findByName() by StarComponent::findByName() and implementing a check against the genetive name solved the problem. Commit message here

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc