From ea1c8d4e65676bf49ad0ae8e4e0d390fb7be37f6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 26 Aug 2019 11:11:13 +0200 Subject: [PATCH] Remove nonsensical initialization from QMakeLocalFileName The c'tor that takes a QString detects whether the string's first and *last but one* characters are double quotes. In that case it removes the first and *last* characters, resulting in a conversion from "\"C:\\foo\"\\" to "C:\\foo\"". It's highly unlikely that this code path was ever triggered, because its erroneous result would have been noticed. Remove it. Change-Id: I653e6a4667ae3620c35e509420eb22a71bb986a9 Reviewed-by: Edward Welbourne --- qmake/generators/makefiledeps.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index d68539814e..1b1b0426bb 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -61,13 +61,8 @@ inline bool qmake_endOfLine(const char &c) { return (c == '\r' || c == '\n'); } #endif QMakeLocalFileName::QMakeLocalFileName(const QString &name) : is_null(name.isNull()) + , real_name(name) { - if(!name.isEmpty()) { - if(name.at(0) == QLatin1Char('"') && name.at(name.length()-2) == QLatin1Char('"')) - real_name = name.mid(1, name.length()-2); - else - real_name = name; - } } const QString &QMakeLocalFileName::local() const