to make the strict iterators happy.
Change-Id: Ief4ec309b815f18dc4b2017d4f34c063db510c31
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
QFontEngineData *QFontCache::findEngineData(const QFontDef &def) const
{
- EngineDataCache::ConstIterator it = engineDataCache.find(def),
- end = engineDataCache.end();
- if (it == end) return 0;
+ EngineDataCache::ConstIterator it = engineDataCache.constFind(def);
+ if (it == engineDataCache.constEnd())
+ return 0;
// found
return it.value();
const QScriptItem *si = &layoutData->items.at(i);
int end = si->position + length(si);
- while (startIt != addFormatSortedByStart.end() &&
+ while (startIt != addFormatSortedByStart.constEnd() &&
specialData->addFormats.at(*startIt).start <= si->position) {
currentFormats.insert(std::upper_bound(currentFormats.begin(), currentFormats.end(), *startIt),
*startIt);
++startIt;
}
- while (endIt != addFormatSortedByEnd.end() &&
+ while (endIt != addFormatSortedByEnd.constEnd() &&
specialData->addFormats.at(*endIt).start + specialData->addFormats.at(*endIt).length < end) {
currentFormats.remove(qBinaryFind(currentFormats, *endIt) - currentFormats.begin());
++endIt;
bool QTextFormatCollection::hasFormatCached(const QTextFormat &format) const
{
uint hash = getHash(format.d, format.format_type);
- QMultiHash<uint, int>::const_iterator i = hashes.find(hash);
- while (i != hashes.end() && i.key() == hash) {
+ QMultiHash<uint, int>::const_iterator i = hashes.constFind(hash);
+ while (i != hashes.constEnd() && i.key() == hash) {
if (formats.value(i.value()) == format) {
return true;
}