From ac2154c7e90d68e4477cb383d1090aaa1939efec Mon Sep 17 00:00:00 2001 From: Mate Barany Date: Tue, 20 Sep 2022 17:51:44 +0200 Subject: [PATCH] qdbusxml2cpp: Remove unnecessary lines Noticed during the review of QTBUG-98434. The variable includeGuard is a QString, that is converted into a Latin1 string and then converted back to QString. Remove these unnecessary lines. Task-number: QTBUG-103100 Change-Id: I335d49ef990cb6de24031be380b5c2c7e12e961e Reviewed-by: Marc Mutz --- src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp index fe5649f5af..8bed1d8d90 100644 --- a/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -483,7 +483,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf } else { includeGuard = u"QDBUSXML2CPP_PROXY"_s; } - includeGuard = "%1"_L1.arg(includeGuard); + hs << "#ifndef " << includeGuard << Qt::endl << "#define " << includeGuard << Qt::endl << Qt::endl; @@ -800,7 +800,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte } else { includeGuard = u"QDBUSXML2CPP_ADAPTOR"_s; } - includeGuard = "%1"_L1.arg(includeGuard); + hs << "#ifndef " << includeGuard << Qt::endl << "#define " << includeGuard << Qt::endl << Qt::endl;