forked from qt-creator/qt-creator
Debugger: Make findQtInstallPath remote-aware
Change-Id: I3df662a182c079725e616776befead30265f22b3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -34,7 +34,6 @@
|
|||||||
#include <utils/layoutbuilder.h>
|
#include <utils/layoutbuilder.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/synchronousprocess.h>
|
|
||||||
#include <utils/variablechooser.h>
|
#include <utils/variablechooser.h>
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@@ -444,11 +443,9 @@ static QString findQtInstallPath(const FilePath &qmakePath)
|
|||||||
{
|
{
|
||||||
if (qmakePath.isEmpty())
|
if (qmakePath.isEmpty())
|
||||||
return QString();
|
return QString();
|
||||||
QProcess proc;
|
QtcProcess proc;
|
||||||
QStringList args;
|
proc.setCommand({qmakePath, {"-query", "QT_INSTALL_HEADERS"}});
|
||||||
args.append("-query");
|
proc.start();
|
||||||
args.append("QT_INSTALL_HEADERS");
|
|
||||||
proc.start(qmakePath.toString(), args);
|
|
||||||
if (!proc.waitForStarted()) {
|
if (!proc.waitForStarted()) {
|
||||||
qWarning("%s: Cannot start '%s': %s", Q_FUNC_INFO, qPrintable(qmakePath.toString()),
|
qWarning("%s: Cannot start '%s': %s", Q_FUNC_INFO, qPrintable(qmakePath.toString()),
|
||||||
qPrintable(proc.errorString()));
|
qPrintable(proc.errorString()));
|
||||||
@@ -456,7 +453,7 @@ static QString findQtInstallPath(const FilePath &qmakePath)
|
|||||||
}
|
}
|
||||||
proc.closeWriteChannel();
|
proc.closeWriteChannel();
|
||||||
if (!proc.waitForFinished()) {
|
if (!proc.waitForFinished()) {
|
||||||
SynchronousProcess::stopProcess(proc);
|
proc.stopProcess();
|
||||||
qWarning("%s: Timeout running '%s'.", Q_FUNC_INFO, qPrintable(qmakePath.toString()));
|
qWarning("%s: Timeout running '%s'.", Q_FUNC_INFO, qPrintable(qmakePath.toString()));
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user