Force length of prefix path to be calculated at runtime

Prevent compilers from calculating strlen at compile time
by using a volatile pointer. This corrupted paths if the
installation path is patched for the binary SDK installer.

Task-number: QTBUG-45307
Change-Id: I624b0409e8b27299475a88eb1cbf03ffef9589c6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Kai Koehne 2015-03-30 11:59:41 +02:00
parent b716216fc0
commit cbf28577ef
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
if (!QLibraryInfoPrivate::configuration())
#endif
{
const char *path = 0;
const char * volatile path = 0;
if (loc == PrefixPath) {
path =
#ifdef QT_BUILD_QMAKE