qmake: Work around MSVC compiler bug.

Disable optimization for getProjectUUID() as it triggers
ASSERT: "&other != this" at qstring.h:720 with -O2.

Change-Id: I51b31d4318ba9be187c186623099171d8f48235b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Friedemann Kleint 2012-01-30 15:16:50 +01:00 committed by Qt by Nokia
parent 60f24ec608
commit 9f54846d95

View File

@ -305,6 +305,16 @@ struct VcsolutionDepend {
QStringList dependencies;
};
/* Disable optimization in getProjectUUID() due to a compiler
* bug in MSVC 2010 that causes ASSERT: "&other != this" in the QString
* copy constructor for non-empty file names at:
* filename.isEmpty()?project->first("QMAKE_MAKEFILE"):filename */
#ifdef Q_CC_MSVC
# pragma optimize( "g", off )
# pragma warning ( disable : 4748 )
#endif
QUuid VcprojGenerator::getProjectUUID(const QString &filename)
{
bool validUUID = true;
@ -335,6 +345,10 @@ QUuid VcprojGenerator::getProjectUUID(const QString &filename)
return uuid;
}
#ifdef Q_CC_MSVC
# pragma optimize( "g", on )
#endif
QUuid VcprojGenerator::increaseUUID(const QUuid &id)
{
QUuid result(id);