OSDN Git Service

remove unused QBenchmarkContext member and method
authorIvailo Monev <xakepa10@gmail.com>
Fri, 14 Aug 2020 20:29:46 +0000 (23:29 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Fri, 14 Aug 2020 20:29:46 +0000 (23:29 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/test/qbenchmark_p.h
src/test/qtestcase.cpp

index f1a71f0..8a72320 100644 (file)
@@ -68,19 +68,9 @@ QT_BEGIN_NAMESPACE
 
 struct QBenchmarkContext
 {
-    // None of the strings below are assumed to contain commas (see toString() below)
+    // None of the strings below are assumed to contain commas
     QString slotName;
     QString tag; // from _data() function
-
-    int checkpointIndex;
-
-    QString toString() const
-    {
-        QString s = QString::fromLatin1("%1,%2,%3").arg(slotName).arg(tag).arg(checkpointIndex);
-        return s;
-    }
-
-    QBenchmarkContext() : checkpointIndex(-1) {}
 };
 
 class QBenchmarkResult
index a4ddf35..97299b1 100644 (file)
@@ -1449,7 +1449,7 @@ static bool qInvokeTestMethod(const char *slotName, const char *data=0)
     QBenchmarkTestMethodData benchmarkData;
     QBenchmarkTestMethodData::current = &benchmarkData;
 
-    QBenchmarkGlobalData::current->context.slotName = QLatin1String(slotName);
+    QBenchmarkGlobalData::current->context.slotName = QString::fromLatin1(slotName);
 
     char member[512];
     QTestTable table;