tools/assistant/lib/qhelpdbreader.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
   513 }
   513 }
   514 
   514 
   515 QString QHelpDBReader::mergeList(const QStringList &list) const
   515 QString QHelpDBReader::mergeList(const QStringList &list) const
   516 {
   516 {
   517     QString str;
   517     QString str;
   518     foreach (QString s, list)
   518     foreach (const QString &s, list)
   519         str.append(QLatin1Char('\'') + quote(s) + QLatin1String("\', "));
   519         str.append(QLatin1Char('\'') + quote(s) + QLatin1String("\', "));
   520     if (str.endsWith(QLatin1String(", ")))
   520     if (str.endsWith(QLatin1String(", ")))
   521         str = str.left(str.length()-2);
   521         str = str.left(str.length()-2);
   522     return str;
   522     return str;
   523 }
   523 }
   565         return true;
   565         return true;
   566     }
   566     }
   567 
   567 
   568     bool needUpdate = !m_viewAttributes.count();
   568     bool needUpdate = !m_viewAttributes.count();
   569 
   569 
   570     foreach (QString s, attributes)
   570     foreach (const QString &s, attributes)
   571         m_viewAttributes.remove(s);
   571         m_viewAttributes.remove(s);
   572 
   572 
   573     if (m_viewAttributes.count() || needUpdate) {
   573     if (m_viewAttributes.count() || needUpdate) {
   574         m_viewAttributes.clear();
   574         m_viewAttributes.clear();
   575         m_indicesCache = indexIds;        
   575         m_indicesCache = indexIds;        
   576     }
   576     }
   577     foreach (QString s, attributes)
   577     foreach (const QString &s, attributes)
   578         m_viewAttributes.insert(s);
   578         m_viewAttributes.insert(s);
   579     m_useAttributesCache = true;
   579     m_useAttributesCache = true;
   580     return true;
   580     return true;
   581 }
   581 }
   582 
   582