diff options
Diffstat (limited to 'src/testlib/qbenchmarkvalgrind.cpp')
-rw-r--r-- | src/testlib/qbenchmarkvalgrind.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp index 7d24eb8293..44888c4d30 100644 --- a/src/testlib/qbenchmarkvalgrind.cpp +++ b/src/testlib/qbenchmarkvalgrind.cpp @@ -39,8 +39,6 @@ #include <QtTest/private/qbenchmark_p.h> -#ifdef QTESTLIB_USE_VALGRIND - #include <QtTest/private/qbenchmarkvalgrind_p.h> #include <QtCore/qstringlist.h> #include <QtCore/qcoreapplication.h> @@ -170,7 +168,7 @@ QString QBenchmarkValgrindUtils::outFileBase(qint64 pid) // Returns \c true upon success, otherwise false. bool QBenchmarkValgrindUtils::runCallgrindSubProcess(const QStringList &origAppArgs, int &exitCode) { - const QString execFile(origAppArgs.at(0)); + const QString &execFile = origAppArgs.at(0); QStringList args; args << QLatin1String("--tool=callgrind") << QLatin1String("--instr-atstart=yes") << QLatin1String("--quiet") @@ -179,7 +177,7 @@ bool QBenchmarkValgrindUtils::runCallgrindSubProcess(const QStringList &origAppA // pass on original arguments that make sense (e.g. avoid wasting time producing output // that will be ignored anyway) ... for (int i = 1; i < origAppArgs.size(); ++i) { - const QString arg(origAppArgs.at(i)); + const QString &arg = origAppArgs.at(i); if (arg == QLatin1String("-callgrind")) continue; args << arg; // ok to pass on @@ -243,5 +241,3 @@ QTest::QBenchmarkMetric QBenchmarkCallgrindMeasurer::metricType() } QT_END_NAMESPACE - -#endif // QTESTLIB_USE_VALGRIND |