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 <edward.welbourne@qt.io>
This commit is contained in:
Joerg Bornemann 2019-08-26 11:11:13 +02:00 committed by Jörg Bornemann
parent 949482f8e4
commit ea1c8d4e65

View File

@ -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