[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/kmldonkey/kmldonkey
From: Sebastian Sauer <mail () dipe ! org>
Date: 2004-01-15 21:06:48
Message-ID: 20040115210648.803FC9069 () office ! kde ! org
[Download RAW message or body]
CVS commit by sebsauer:
Not (any longer?) needed to iterate through the tags to get tags["availability"]
M +2 -7 search.cpp 1.20
--- kdeextragear-2/kmldonkey/kmldonkey/search.cpp #1.19:1.20
@@ -281,11 +281,6 @@ void SearchResult::AddItem(const ResultI
int32 avail = 0;
const QMap<QString,QVariant>& tags = searchinfo->resultTags();
- QMapConstIterator<QString,QVariant> it;
- for ( it = tags.begin(); it != tags.end(); ++it ) {
- if (it.key() == "availability") {
- avail = it.data().toInt();
- break;
- }
- }
+ if(tags.contains("availability"))
+ avail = tags["availability"].toInt();
SearchResultItem* item = new SearchResultItem(resultView, \
searchinfo->resultNo(), avail, searchinfo);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic