Fix MSVC64 warning about integer truncation in qtChooserToQmakePath().

Change-Id: Ic3a51fc94e4204c2b97936c0294b054a08fed72f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Friedemann Kleint
2013-10-10 10:39:36 +02:00
parent f54b935a61
commit ccbfdf0144

View File

@@ -44,6 +44,7 @@ bool BuildableHelperLibrary::isQtChooser(const QFileInfo &info)
QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
{
const char toolDir[] = "QTTOOLDIR=\"";
QProcess proc;
proc.start(path, QStringList(QLatin1String("-print-env")));
if (!proc.waitForStarted(1000))
@@ -51,10 +52,10 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
if (!proc.waitForFinished(1000))
return QString();
QByteArray output = proc.readAllStandardOutput();
int pos = output.indexOf("QTTOOLDIR=");
int pos = output.indexOf(toolDir);
if (pos == -1)
return QString();
pos += strlen("QTTOOLDIR=\"");
pos += int(sizeof(toolDir)) - 1;
int end = output.indexOf('\"', pos);
if (end == -1)
return QString();