From d3b887707d8c2b342153f962814bb0ce2d0db2b7 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Tue, 26 Feb 2019 12:26:54 +0100 Subject: [PATCH] Clean up some poorly-placed newlines in the TLD suffix data A comma appeared on a line on its own; a closing-brace didn't. Change-Id: I33cf37bb3574cd421c8af5ab6312865b71ce61f1 Reviewed-by: Peter Hartmann --- util/corelib/qurl-generateTLDs/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp index 1baae92521..e458ea9d53 100644 --- a/util/corelib/qurl-generateTLDs/main.cpp +++ b/util/corelib/qurl-generateTLDs/main.cpp @@ -146,7 +146,7 @@ int main(int argc, char **argv) entry.append("\\0"); } outFile.write("static const quint32 tldIndices[] = {\n"); - outDataBuffer.write("\nstatic const char *tldData[] = {\n"); + outDataBuffer.write("\nstatic const char *tldData[] = {"); int totalUtf8Size = 0; int chunkSize = 0; // strlen of the current chunk (sizeof is bigger by 1) @@ -165,22 +165,22 @@ int main(int argc, char **argv) if (chunkSize >= 0xffff) { static int chunkCount = 0; qWarning() << "chunk" << ++chunkCount << "has length" << chunkSize - stringUtf8Size; - outDataBuffer.write(",\n\n"); + outDataBuffer.write(",\n"); chunks.append(QString::number(totalUtf8Size)); chunkSize = 0; } totalUtf8Size += stringUtf8Size; - outDataBuffer.write("\""); + outDataBuffer.write("\n\""); outDataBuffer.write(entry.toUtf8()); - outDataBuffer.write("\"\n"); + outDataBuffer.write("\""); } } chunks.append(QString::number(totalUtf8Size)); outFile.write(QByteArray::number(totalUtf8Size)); - outFile.write("};\n"); + outFile.write("\n};\n"); - outDataBuffer.write("};\n"); + outDataBuffer.write("\n};\n"); outDataBuffer.close(); outFile.write(outDataBufferBA);