From aff8d83512e719b7599c0e759b81fb9b63eadb04 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 5 Jul 2021 18:18:52 +0200 Subject: [PATCH] Skip trailing space on ends of QFile benchmark names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They were there to make it easier to build the names. Avoiding them wasn't exactly hard. Change-Id: I9e353644d81f80d69ecf73fe4fa875948ccbc2c9 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Ievgenii Meshcheriakov Reviewed-by: Andreas Buhr --- tests/benchmarks/corelib/io/qfile/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/benchmarks/corelib/io/qfile/main.cpp b/tests/benchmarks/corelib/io/qfile/main.cpp index 357205cbe8..5915383888 100644 --- a/tests/benchmarks/corelib/io/qfile/main.cpp +++ b/tests/benchmarks/corelib/io/qfile/main.cpp @@ -170,9 +170,12 @@ void tst_qfile::readFile_data(BenchmarkType type, QIODevice::OpenModeFlag t, QByteArray flagstring; if (t & QIODevice::Text) - flagstring += "textMode "; - if (b & QIODevice::Unbuffered) - flagstring += "unbuffered "; + flagstring += "textMode"; + if (b & QIODevice::Unbuffered) { + if (flagstring.size()) + flagstring += ' '; + flagstring += "unbuffered"; + } if (flagstring.isEmpty()) flagstring = "none";