summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.0.04
-rw-r--r--src/testlib/qtest_global.h2
-rw-r--r--src/testlib/qtestcase.cpp15
3 files changed, 4 insertions, 17 deletions
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 8dbda70212..fe159c4ad9 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -53,6 +53,10 @@ information about a particular change.
* The DEPENDS_ON macro has been removed from the API. This macro did nothing
and misled some users to believe that they could make test functions depend
on each other or impose an execution order on test functions.
+ * The QTest::qt_snprintf function has been removed from the API. This was an
+ internal testlib function that was exposed in the public API due to its use
+ in a public macro. Any calls to this function should be replaced by a call
+ to qsnprintf(), which comes from the <QtCore/QByteArray> header.
* The QSKIP macro no longer has the "mode" parameter, which caused problems
for calculating test metrics, as the SkipAll mode hid information about
what test data was skipped. Calling QSKIP in a test function now behaves
diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h
index 6a40f47f30..31ab940474 100644
--- a/src/testlib/qtest_global.h
+++ b/src/testlib/qtest_global.h
@@ -78,8 +78,6 @@ QT_MODULE(Test)
namespace QTest
{
enum TestFailMode { Abort = 1, Continue = 2 };
-
- int Q_TESTLIB_EXPORT qt_snprintf(char *str, int size, const char *format, ...);
}
QT_END_NAMESPACE
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 202d53eada..0e384b8dc1 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -987,21 +987,6 @@ namespace QTest
#endif
/*! \internal
- */
-int qt_snprintf(char *str, int size, const char *format, ...)
-{
- va_list ap;
- int res = 0;
-
- va_start(ap, format);
- qvsnprintf(str, size, format, ap);
- va_end(ap);
- str[size - 1] = '\0';
-
- return res;
-}
-
-/*! \internal
Invoke a method of the object without generating warning if the method does not exist
*/
static void invokeMethod(QObject *obj, const char *methodName)