diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-28 09:03:39 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-10-28 09:03:39 (GMT) |
commit | 5f444e7a1dd7f22b5546f5225e12355ec5cc4d57 (patch) | |
tree | e90e3d59dfccc347691c7a62aa69fa01b1a94743 /src/corelib | |
parent | a8b5aefc48d619c1fc0ff1e97c8e3a42baccb7c0 (diff) | |
parent | 1583d643285641bf71e6a107331d788acca9850c (diff) | |
download | Qt-5f444e7a1dd7f22b5546f5225e12355ec5cc4d57.zip Qt-5f444e7a1dd7f22b5546f5225e12355ec5cc4d57.tar.gz Qt-5f444e7a1dd7f22b5546f5225e12355ec5cc4d57.tar.bz2 |
Merge remote branch 'origin/4.6' into core-4.6
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 3 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index e8d6df0..5f9d01d 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2841,6 +2841,9 @@ \value WidgetGesture Gestures can only start over the widget itself. \value WidgetWithChildrenGesture Gestures can start on the widget or over any of its children. + \value ItemGesture Gestures can only start over the item itself. + \value ItemWithChildrenGesture Gestures can start on the item or over + any of its children. \sa QWidget::grabGesture() */ diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index a996f30..55ad28d 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1590,12 +1590,12 @@ QString &QString::append(QChar ch) */ QString &QString::remove(int pos, int len) { - if (pos < 0) + if (pos < 0) // count from end of string pos += d->size; if (pos < 0 || pos >= d->size) { // range problems - } else if (pos + len >= d->size) { // pos ok - resize(pos); + } else if (len >= d->size - pos) { + resize(pos); // truncate } else if (len > 0) { detach(); memmove(d->data + pos, d->data + pos + len, |