title: Function which returns a QList
body: <p>I have the following classes</p>
  
  <pre><code>class LMJEntity : public QObject
  {
      Q_OBJECT
      Q_PROPERTY(int Id READ getId WRITE setId)
  };
  
  class LMJDataMapper : public QObject
  {
      Q_OBJECT
  
      virtual QList&lt;LMJEntity *&gt; *findAll(LMJPaging *paging){
          QList&lt;LMJEntity *&gt; * result = NULL;
          QSqlQuery query;    
          bool ret;       
          ret = query.exec(sql);
  
          if(!ret){
              errors = query.lastError().text();      
          }else
          {
             result = new QList&lt;LMJEntity *&gt;();
             while(query.next()){
                  result-&gt;append(load(query));
              }
          }
  
          return result;
      }
  };
  </code></pre>
  
  <p>Is this a correct way to use <code>QList</code>? Should I use <code>QSharedPointer</code> instead of raw pointer to avoid memory leak?
  Please give me some suggestions.</p>