Commit 479b22ec authored by David Schulz's avatar David Schulz
Browse files

Projectexplorer: Export read of MSVC enironment batch.



Make the function generateEnvironmentSettings public and static,
so it can be used by other plugins.

Change-Id: I5f649e311059bcaf5b239c37e323a021175024b2
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 5977b6db
......@@ -188,9 +188,9 @@ QByteArray AbstractMsvcToolChain::msvcPredefinedMacros(const QStringList cxxflag
bool AbstractMsvcToolChain::generateEnvironmentSettings(Utils::Environment &env,
const QString& batchFile,
const QString& batchArgs,
QMap<QString, QString>& envPairs) const
const QString &batchFile,
const QString &batchArgs,
QMap<QString, QString> &envPairs)
{
// Create a temporary file name for the output. Use a temporary file here
// as I don't know another way to do this in Qt...
......@@ -241,12 +241,12 @@ bool AbstractMsvcToolChain::generateEnvironmentSettings(Utils::Environment &env,
run.start();
if (!run.waitForStarted()) {
qWarning("%s: Unable to run '%s': %s", Q_FUNC_INFO, qPrintable(m_vcvarsBat),
qWarning("%s: Unable to run '%s': %s", Q_FUNC_INFO, qPrintable(batchFile),
qPrintable(run.errorString()));
return false;
}
if (!run.waitForFinished()) {
qWarning("%s: Timeout running '%s'", Q_FUNC_INFO, qPrintable(m_vcvarsBat));
qWarning("%s: Timeout running '%s'", Q_FUNC_INFO, qPrintable(batchFile));
Utils::SynchronousProcess::stopProcess(run);
return false;
}
......
......@@ -63,15 +63,16 @@ public:
bool operator ==(const ToolChain &) const;
static bool generateEnvironmentSettings(Utils::Environment &env,
const QString &batchFile,
const QString &batchArgs,
QMap<QString, QString> &envPairs);
protected:
virtual Utils::Environment readEnvironmentSetting(Utils::Environment& env) const = 0;
virtual QByteArray msvcPredefinedMacros(const QStringList cxxflags,
const Utils::Environment& env) const;
bool generateEnvironmentSettings(Utils::Environment &env,
const QString& batchFile,
const QString& batchArgs,
QMap<QString, QString>& envPairs) const;
Utils::FileName m_debuggerCommand;
mutable QByteArray m_predefinedMacros;
......
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