diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-17 01:26:51 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-17 01:26:51 (GMT) |
commit | 029f98ee0176b34279e7cc944cca17f027fe5a0a (patch) | |
tree | 8599101cab87384599630f28b306f73ed44b11fd /src/declarative | |
parent | f6853d6f8521a057721a943929c96904cdb6f0c6 (diff) | |
download | Qt-029f98ee0176b34279e7cc944cca17f027fe5a0a.zip Qt-029f98ee0176b34279e7cc944cca17f027fe5a0a.tar.gz Qt-029f98ee0176b34279e7cc944cca17f027fe5a0a.tar.bz2 |
ListModel::get() shouldn't print warnings for invalid indices since it
returns undefined items for these cases anywyay.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 6223548..9a5c9de 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -537,10 +537,7 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap) */ QScriptValue QDeclarativeListModel::get(int index) const { - // the internal flat/nested class takes care of return value for bad index - if (index >= count() || index < 0) - qmlInfo(this) << tr("get: index %1 out of range").arg(index); - + // the internal flat/nested class checks for bad index return m_flat ? m_flat->get(index) : m_nested->get(index); } |