mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
fix some (but not all) build issues with strict iterators
those are some that I've encountered and have not been addressed in Qt5 as far as I can tell or do not apply to it at all (e.g. QCommandLineParser which was borrowed from CopperSpice) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
428a9cf2bf
commit
08ca2b5cb6
5 changed files with 16 additions and 16 deletions
|
@ -705,7 +705,7 @@ QStringList QCommandLineParser::values(const QString &optionName) const
|
|||
{
|
||||
d->checkParsed("values");
|
||||
const NameHash_t::const_iterator it = d->nameHash.find(optionName);
|
||||
if (it != d->nameHash.end()) {
|
||||
if (it != d->nameHash.constEnd()) {
|
||||
const int optionOffset = *it;
|
||||
QStringList values = d->optionValuesHash.value(optionOffset);
|
||||
if (values.isEmpty()) {
|
||||
|
|
|
@ -393,7 +393,7 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node
|
|||
QDBusAdaptorConnector::AdaptorMap::ConstIterator it;
|
||||
it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(),
|
||||
interface_name);
|
||||
if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) {
|
||||
if (it != connector->adaptors.constEnd() && interface_name == QLatin1String(it->interface)) {
|
||||
return propertyWriteReply(msg, interface_name, property_name,
|
||||
writeProperty(it->adaptor, property_name, value));
|
||||
}
|
||||
|
|
|
@ -617,8 +617,8 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd)
|
|||
item.isFuzzy = true;
|
||||
flags.removeOne(QLatin1String("qt-format"));
|
||||
TranslatorMessage::ExtraData::const_iterator it =
|
||||
item.extra.find(QLatin1String("po-flags"));
|
||||
if (it != item.extra.end())
|
||||
item.extra.constFind(QLatin1String("po-flags"));
|
||||
if (it != item.extra.constEnd())
|
||||
flags.prepend(*it);
|
||||
if (!flags.isEmpty())
|
||||
item.extra[QLatin1String("po-flags")] = flags.join(QLatin1String(", "));
|
||||
|
@ -801,8 +801,8 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd)
|
|||
if (msg.type() == TranslatorMessage::Unfinished && msg.isTranslated())
|
||||
flags.append(QLatin1String("fuzzy"));
|
||||
TranslatorMessage::ExtraData::const_iterator itr =
|
||||
msg.extras().find(QLatin1String("po-flags"));
|
||||
if (itr != msg.extras().end()) {
|
||||
msg.extras().constFind(QLatin1String("po-flags"));
|
||||
if (itr != msg.extras().constEnd()) {
|
||||
QStringList atoms = itr->split(QLatin1String(", "));
|
||||
foreach (const QString &atom, atoms)
|
||||
if (atom.endsWith(str_format)) {
|
||||
|
|
|
@ -1305,7 +1305,7 @@ void QtAbstractPropertyBrowserPrivate::createBrowserIndexes(QtProperty *property
|
|||
QMap<QtBrowserItem *, QtBrowserItem *> parentToAfter;
|
||||
if (afterProperty) {
|
||||
QMap<QtProperty *, QList<QtBrowserItem *> >::ConstIterator it =
|
||||
m_propertyToIndexes.find(afterProperty);
|
||||
m_propertyToIndexes.constFind(afterProperty);
|
||||
if (it == m_propertyToIndexes.constEnd())
|
||||
return;
|
||||
|
||||
|
@ -1319,7 +1319,7 @@ void QtAbstractPropertyBrowserPrivate::createBrowserIndexes(QtProperty *property
|
|||
}
|
||||
} else if (parentProperty) {
|
||||
QMap<QtProperty *, QList<QtBrowserItem *> >::ConstIterator it =
|
||||
m_propertyToIndexes.find(parentProperty);
|
||||
m_propertyToIndexes.constFind(parentProperty);
|
||||
if (it == m_propertyToIndexes.constEnd())
|
||||
return;
|
||||
|
||||
|
@ -1366,7 +1366,7 @@ void QtAbstractPropertyBrowserPrivate::removeBrowserIndexes(QtProperty *property
|
|||
{
|
||||
QList<QtBrowserItem *> toRemove;
|
||||
QMap<QtProperty *, QList<QtBrowserItem *> >::ConstIterator it =
|
||||
m_propertyToIndexes.find(property);
|
||||
m_propertyToIndexes.constFind(property);
|
||||
if (it == m_propertyToIndexes.constEnd())
|
||||
return;
|
||||
|
||||
|
@ -1454,7 +1454,7 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope
|
|||
return;
|
||||
|
||||
QMap<QtProperty *, QList<QtBrowserItem *> >::ConstIterator it =
|
||||
m_propertyToIndexes.find(property);
|
||||
m_propertyToIndexes.constFind(property);
|
||||
if (it == m_propertyToIndexes.constEnd())
|
||||
return;
|
||||
|
||||
|
|
|
@ -1413,12 +1413,12 @@ QVariant QtVariantPropertyManager::attributeValue(const QtProperty *property, co
|
|||
return QVariant();
|
||||
|
||||
QMap<int, QMap<QString, int> >::ConstIterator it =
|
||||
d_ptr->m_typeToAttributeToAttributeType.find(propType);
|
||||
d_ptr->m_typeToAttributeToAttributeType.constFind(propType);
|
||||
if (it == d_ptr->m_typeToAttributeToAttributeType.constEnd())
|
||||
return QVariant();
|
||||
|
||||
QMap<QString, int> attributes = it.value();
|
||||
QMap<QString, int>::ConstIterator itAttr = attributes.find(attribute);
|
||||
QMap<QString, int>::ConstIterator itAttr = attributes.constFind(attribute);
|
||||
if (itAttr == attributes.constEnd())
|
||||
return QVariant();
|
||||
|
||||
|
@ -1508,7 +1508,7 @@ QVariant QtVariantPropertyManager::attributeValue(const QtProperty *property, co
|
|||
QStringList QtVariantPropertyManager::attributes(int propertyType) const
|
||||
{
|
||||
QMap<int, QMap<QString, int> >::ConstIterator it =
|
||||
d_ptr->m_typeToAttributeToAttributeType.find(propertyType);
|
||||
d_ptr->m_typeToAttributeToAttributeType.constFind(propertyType);
|
||||
if (it == d_ptr->m_typeToAttributeToAttributeType.constEnd())
|
||||
return QStringList();
|
||||
return it.value().keys();
|
||||
|
@ -1527,12 +1527,12 @@ QStringList QtVariantPropertyManager::attributes(int propertyType) const
|
|||
int QtVariantPropertyManager::attributeType(int propertyType, const QString &attribute) const
|
||||
{
|
||||
QMap<int, QMap<QString, int> >::ConstIterator it =
|
||||
d_ptr->m_typeToAttributeToAttributeType.find(propertyType);
|
||||
d_ptr->m_typeToAttributeToAttributeType.constFind(propertyType);
|
||||
if (it == d_ptr->m_typeToAttributeToAttributeType.constEnd())
|
||||
return 0;
|
||||
|
||||
QMap<QString, int> attributes = it.value();
|
||||
QMap<QString, int>::ConstIterator itAttr = attributes.find(attribute);
|
||||
QMap<QString, int>::ConstIterator itAttr = attributes.constFind(attribute);
|
||||
if (itAttr == attributes.constEnd())
|
||||
return 0;
|
||||
return itAttr.value();
|
||||
|
@ -1777,7 +1777,7 @@ void QtVariantPropertyManager::initializeProperty(QtProperty *property)
|
|||
return;
|
||||
|
||||
QMap<int, QtAbstractPropertyManager *>::ConstIterator it =
|
||||
d_ptr->m_typeToPropertyManager.find(d_ptr->m_propertyType);
|
||||
d_ptr->m_typeToPropertyManager.constFind(d_ptr->m_propertyType);
|
||||
if (it != d_ptr->m_typeToPropertyManager.constEnd()) {
|
||||
QtProperty *internProp = 0;
|
||||
if (!d_ptr->m_creatingSubProperties) {
|
||||
|
|
Loading…
Add table
Reference in a new issue