Commit 42d4149a authored by Akarsh Simha's avatar Akarsh Simha

Add utility method to create a QList<T *> from QList<QSharedPointer<T>>

Used by the changes to ObservingList that follow this commit.

Happy 20th Birthday, KDE!
parent e108f42e
......@@ -136,6 +136,17 @@ namespace KSUtils {
QList<SkyObject *> * castStarObjListToSkyObjList( QList<StarObject *> *starObjList );
*@note Avoid using this method for the same reasons as QSharedPointer::data()
template <typename T> QList<T*> makeVanillaPointerList( const QList<QSharedPointer<T>> &spList ) {
QList<T *> vpList;
foreach( QSharedPointer<T> sp, spList )
vpList.append( );
return vpList;
*@short Return the genetive form of constellation name, given the abbreviation
*@param code Three-letter IAU abbreviation of the constellation
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment