summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@digia.com>2012-10-05 16:32:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-08 17:38:20 +0200
commit0ed3cf2a1c487387bbc958317c791c9c53cf5a16 (patch)
tree85b9a0215759d0e5b0906be2f29b39da635d8e06 /src/corelib
parent2cce297b58ae50486094a6dcc148484a4a4bace5 (diff)
Removed the "tst_QVector::outOfMemory" test.
The test is useless as we assert if the requested size exceeds a certain limit. We could, as an alternative, throw an exception, but in the end it's the caller's responsibility to ensure that the requested size is a sane value. Task-number: QTBUG-27285 Change-Id: I738950a6a2b51671a54e4d25c7e4c3ac0d7f63b8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qbytearray.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 12d2fe756f..feda8f441d 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -70,7 +70,7 @@ int qFindByteArray(
int qAllocMore(int alloc, int extra)
{
Q_ASSERT(alloc >= 0 && extra >= 0);
- Q_ASSERT(alloc < (1 << 30) - extra);
+ Q_ASSERT_X(alloc < (1 << 30) - extra, "qAllocMore", "Requested size is too large!");
unsigned nalloc = alloc + extra;