summaryrefslogtreecommitdiffstats
path: root/src/testlib/qplaintestlogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qplaintestlogger.cpp')
-rw-r--r--src/testlib/qplaintestlogger.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index e075b36..2515c51 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -180,7 +180,7 @@ namespace QTest {
: "";
const char *filler = (tag[0] && gtag[0]) ? ":" : "";
if (file) {
- QTest::qt_asprintf(buf, "%s: %s::%s(%s%s%s)%s%s\n"
+ QTest::qt_asprintf(&buf, "%s: %s::%s(%s%s%s)%s%s\n"
#ifdef Q_OS_WIN
"%s(%d) : failure location\n"
#else
@@ -189,14 +189,14 @@ namespace QTest {
, type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag,
msg[0] ? " " : "", msg, file, line);
} else {
- QTest::qt_asprintf(buf, "%s: %s::%s(%s%s%s)%s%s\n",
+ QTest::qt_asprintf(&buf, "%s: %s::%s(%s%s%s)%s%s\n",
type, QTestResult::currentTestObjectName(), fn, gtag, filler, tag,
msg[0] ? " " : "", msg);
}
// In colored mode, printf above stripped our nonprintable control characters.
// Put them back.
- memcpy(buf, type, strlen(type));
- outputMessage(buf);
+ memcpy(buf.data(), type, strlen(type));
+ outputMessage(buf.data());
}
template <typename T>
@@ -207,7 +207,7 @@ namespace QTest {
int digits = 0;
qreal divisor = 1;
-
+
while (num / divisor >= 1) {
divisor *= 10;
++digits;