[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/utils
From: David Faure <faure () kde ! org>
Date: 2009-09-30 23:17:14
Message-ID: 1254352634.985243.5617.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1029869 by dfaure:
strict iterators fixes (prevents unwanted detaching)
M +1 -1 filelight/src/part/remoteLister.cpp
M +2 -2 kconfigeditor/src/kconfigeditorsearchline.cpp
M +2 -2 kconfigeditor/src/propertyeditor/multiproperty.cpp
M +2 -2 kconfigeditor/src/propertyeditor/pcombobox.cpp
M +2 -2 kconfigeditor/src/propertyeditor/propertylist.cpp
--- trunk/playground/utils/filelight/src/part/remoteLister.cpp #1029868:1029869
@@ -128,7 +128,7 @@
{
//m_directory is set to the directory we should operate on
- KFileItemList items = KDirLister::items();
+ const KFileItemList items = KDirLister::items();
for (KFileItemList::ConstIterator it = items.begin(), end = items.end(); it != \
end; ++it) {
if (it->isDir())
--- trunk/playground/utils/kconfigeditor/src/kconfigeditorsearchline.cpp \
#1029868:1029869 @@ -188,8 +188,8 @@
// specifified. If it is empty default to searching all of the columns.
if (!d->searchColumns.isEmpty()) {
- QList<int>::ConstIterator it = d->searchColumns.begin();
- for (; it != d->searchColumns.end(); ++it) {
+ QList<int>::ConstIterator it = d->searchColumns.constBegin();
+ for (; it != d->searchColumns.constEnd(); ++it) {
if (*it < item->listView()->columns() &&
item->text(*it).indexOf(s, 0, d->caseSensitive) >= 0)
return true;
--- trunk/playground/utils/kconfigeditor/src/propertyeditor/multiproperty.cpp \
#1029868:1029869 @@ -223,7 +223,7 @@
if (type() != Property::ValueFromList)
return val;
QMap<QString, QVariant> vl = valueList();
- for (QMap<QString, QVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ \
it) { + for (QMap<QString, QVariant>::const_iterator it = vl.constBegin(); it != \
vl.constEnd(); ++ it) { if (*it == val)
return it.key();
}
@@ -235,7 +235,7 @@
if (type() != Property::ValueFromList)
return val;
QMap<QString, QVariant> vl = valueList();
- for (QMap<QString, QVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ \
it) { + for (QMap<QString, QVariant>::const_iterator it = vl.constBegin(); it != \
vl.constEnd(); ++ it) { if (*it == val)
return it.key();
}
--- trunk/playground/utils/kconfigeditor/src/propertyeditor/pcombobox.cpp \
#1029868:1029869 @@ -55,7 +55,7 @@
void PComboBox::fillBox()
{
- for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != \
m_valueList.end(); it++) { + for (QMap<QString, QVariant>::const_iterator it = \
m_valueList.constBegin(); it != m_valueList.constEnd(); it++) { \
m_edit->addItem(it.key()); }
}
@@ -86,7 +86,7 @@
QString PComboBox::findDescription(const QVariant &value)
{
- for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != \
m_valueList.end(); ++ it) { + for (QMap<QString, QVariant>::const_iterator it = \
m_valueList.constBegin(); it != m_valueList.constEnd(); ++ it) { if (*it == value)
return it.key();
}
--- trunk/playground/utils/kconfigeditor/src/propertyeditor/propertylist.cpp \
#1029868:1029869 @@ -215,8 +215,8 @@
: PropertyList(false)
{
//deep copy of m_list
- for (QMap<QString, MultiProperty*>::const_iterator it = list->m_list.begin();
- it != list->m_list.end(); ++it) {
+ for (QMap<QString, MultiProperty*>::const_iterator it = \
list->m_list.constBegin(); + it != list->m_list.constEnd(); ++it) {
MultiProperty *mp = new MultiProperty(*(it.value()));
mp->m_propertyList = this;
addToGroup(list->m_groupOfProperty[*it], mp);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic