diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-08-10 06:56:35 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-08-10 06:56:35 (GMT) |
commit | f61ec84fc296c6f70011e30788ee511d6b6a18c6 (patch) | |
tree | 54b3b81ac83570e65dc9b44b6756005f6ba1efde /src/testlib/qtestcase.cpp | |
parent | cc0a411e5e874aa224c26298a109973cb15ea291 (diff) | |
parent | d13418effc5f00474541ae513a30c9a42c2a1cb3 (diff) | |
download | Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.zip Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.tar.gz Qt-f61ec84fc296c6f70011e30788ee511d6b6a18c6.tar.bz2 |
Merge commit 'qt/master-stable'
Conflicts:
src/corelib/kernel/qobject.cpp
src/corelib/tools/qsharedpointer_impl.h
src/gui/widgets/qdatetimeedit.cpp
src/gui/widgets/qlinecontrol.cpp
src/gui/widgets/qlineedit.cpp
tests/auto/qcssparser/qcssparser.pro
tests/auto/qicoimageformat/tst_qicoimageformat.cpp
tests/auto/qmultiscreen/qmultiscreen.pro
tests/auto/qresourceengine/qresourceengine.pro
tests/auto/qresourceengine/tst_qresourceengine.cpp
tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
Diffstat (limited to 'src/testlib/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index e6508f2..65a6e89 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -825,43 +825,6 @@ void filter_unprintable(char *str) /*! \internal */ -int qt_asprintf(char **str, const char *format, ...) -{ - static const int MAXSIZE = 1024*1024*2; - - int size = 32; - delete[] *str; - *str = new char[size]; - - va_list ap; - int res = 0; - - for (;;) { - va_start(ap, format); - res = qvsnprintf(*str, size, format, ap); - va_end(ap); - (*str)[size - 1] = '\0'; - if (res >= 0 && res < size) { - // We succeeded - break; - } - // buffer wasn't big enough, try again. - // Note, we're assuming that a result of -1 is always due to running out of space. - size *= 2; - if (size > MAXSIZE) { - break; - } - delete[] *str; - *str = new char[size]; - } - - filter_unprintable(*str); - - return res; -} - -/*! \internal - */ int qt_snprintf(char *str, int size, const char *format, ...) { va_list ap; |