Commit ccbfdf01 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Fix MSVC64 warning about integer truncation in qtChooserToQmakePath().



Change-Id: Ic3a51fc94e4204c2b97936c0294b054a08fed72f
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent f54b935a
...@@ -44,6 +44,7 @@ bool BuildableHelperLibrary::isQtChooser(const QFileInfo &info) ...@@ -44,6 +44,7 @@ bool BuildableHelperLibrary::isQtChooser(const QFileInfo &info)
QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path) QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
{ {
const char toolDir[] = "QTTOOLDIR=\"";
QProcess proc; QProcess proc;
proc.start(path, QStringList(QLatin1String("-print-env"))); proc.start(path, QStringList(QLatin1String("-print-env")));
if (!proc.waitForStarted(1000)) if (!proc.waitForStarted(1000))
...@@ -51,10 +52,10 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path) ...@@ -51,10 +52,10 @@ QString BuildableHelperLibrary::qtChooserToQmakePath(const QString &path)
if (!proc.waitForFinished(1000)) if (!proc.waitForFinished(1000))
return QString(); return QString();
QByteArray output = proc.readAllStandardOutput(); QByteArray output = proc.readAllStandardOutput();
int pos = output.indexOf("QTTOOLDIR="); int pos = output.indexOf(toolDir);
if (pos == -1) if (pos == -1)
return QString(); return QString();
pos += strlen("QTTOOLDIR=\""); pos += int(sizeof(toolDir)) - 1;
int end = output.indexOf('\"', pos); int end = output.indexOf('\"', pos);
if (end == -1) if (end == -1)
return QString(); return QString();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment