summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-05-19 04:02:17 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-05-19 04:02:17 (GMT)
commit2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315 (patch)
tree9eaf0842a9cd6f719e2d64866b806a84f57f8e1e /src
parent730bfd80804899771b39998c5b67e604d2192ecd (diff)
parentdcfe68f66e5162f9f7a05552aa1133cdc1f0f9c3 (diff)
downloadQt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.zip
Qt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.tar.gz
Qt-2fb3ec5c80a0b9d211c0168fdcd1f4fb84c9b315.tar.bz2
Merge remote branch 'origin/4.6' into 4.7-from-4.6
Diffstat (limited to 'src')
-rw-r--r--src/gui/util/qcompleter.cpp19
-rw-r--r--src/network/access/qnetworkaccesshttpbackend_p.h2
2 files changed, 12 insertions, 9 deletions
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 05fe744..1abc2d9 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -532,17 +532,22 @@ void QCompletionEngine::saveInCache(QString part, const QModelIndex& parent, con
QMatchData old = cache[parent].take(part);
cost = cost + m.indices.cost() - old.indices.cost();
if (cost * sizeof(int) > 1024 * 1024) {
- QMap<QModelIndex, CacheItem>::iterator it1 ;
- for (it1 = cache.begin(); it1 != cache.end(); ++it1) {
+ QMap<QModelIndex, CacheItem>::iterator it1 = cache.begin();
+ while (it1 != cache.end()) {
CacheItem& ci = it1.value();
int sz = ci.count()/2;
QMap<QString, QMatchData>::iterator it2 = ci.begin();
- for (int i = 0; it2 != ci.end() && i < sz; i++, ++it2) {
+ int i = 0;
+ while (it2 != ci.end() && i < sz) {
cost -= it2.value().indices.cost();
- ci.erase(it2);
+ it2 = ci.erase(it2);
+ i++;
+ }
+ if (ci.count() == 0) {
+ it1 = cache.erase(it1);
+ } else {
+ ++it1;
}
- if (ci.count() == 0)
- cache.erase(it1);
}
}
@@ -1808,7 +1813,7 @@ QStringList QCompleter::splitPath(const QString& path) const
This signal is sent when an item in the popup() is highlighted by
the user. It is also sent if complete() is called with the completionMode()
- set to QCOmpleter::InlineCompletion. The item's \a text is given.
+ set to QCompleter::InlineCompletion. The item's \a text is given.
*/
QT_END_NAMESPACE
diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
index 254907f..c4c88ae 100644
--- a/src/network/access/qnetworkaccesshttpbackend_p.h
+++ b/src/network/access/qnetworkaccesshttpbackend_p.h
@@ -94,8 +94,6 @@ public:
#endif
QNetworkCacheMetaData fetchCacheMetaData(const QNetworkCacheMetaData &metaData) const;
- qint64 deviceReadData(char *buffer, qint64 maxlen);
-
// we return true since HTTP needs to send PUT/POST data again after having authenticated
bool needsResetableUploadData() { return true; }