While in this case it might be OK, we should in general avoid non const references. 
Please change it to:  
QList<AnalysisDao::AnalysisInfo> AnalysisDao::loadAnalysesFromQuery(const int trackId, QSqlQuery* pQuery) {