qmake: Don't let an empty $$VERSION cause a garbled version in .rc files

Change-Id: I7f0560979e645da216674cc70c73c5ea9c053aa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Debao Zhang 2013-01-09 14:26:52 +08:00 committed by The Qt Project
parent eaeccce3cc
commit a909dd0ea4

View File

@ -392,7 +392,7 @@ void Win32MakefileGenerator::processRcFileVar()
QByteArray rcString;
QTextStream ts(&rcString, QFile::WriteOnly);
QStringList vers = project->first("VERSION").toQString().split(".");
QStringList vers = project->first("VERSION").toQString().split(".", QString::SkipEmptyParts);
for (int i = vers.size(); i < 4; i++)
vers += "0";
QString versionString = vers.join('.');