Refactor and simplify code in Observation Planner
1. Store the pointer to the SkyObject instance representing the object as a Qt::UserRole data item along with the name of the object. This removes the need for an expensive name-lookup with multiple nested loops etc. Instead, one just gets the data( Qt::UserRole ), which returns a QVariant, and then uses QVariant::value<void *>() and a static_cast<SkyObject *> to get a pointer to the SkyObject instance. 2. Refactor code to use this stored pointer. Refactored here are AVT and remove objects. There is lots of scope for refactoring in ObservingList.
parent
99841a79
Please register or sign in to comment