forked from qt-creator/qt-creator
Remove some redundant Environment copying
Change-Id: I70c74fdb4def2e29f3b850da9108e4ba5f572922 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
a78fa5fd9c
commit
5c25e3a616
@@ -279,8 +279,7 @@ CMakeSettingsPage::~CMakeSettingsPage()
|
||||
|
||||
QString CMakeSettingsPage::findCmakeExecutable() const
|
||||
{
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
return env.searchInPath(QLatin1String("cmake"));
|
||||
return Utils::Environment::systemEnvironment().searchInPath(QLatin1String("cmake"));
|
||||
}
|
||||
|
||||
QWidget *CMakeSettingsPage::createPage(QWidget *parent)
|
||||
|
||||
@@ -2451,10 +2451,9 @@ QVariantMap Version11Handler::update(Project *project, const QVariantMap &map)
|
||||
QVariantMap debugger;
|
||||
QString mkspec;
|
||||
if (m_toolChainExtras.contains(origTcId)) {
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
debuggerPath = m_toolChainExtras.value(origTcId).m_debugger;
|
||||
if (!debuggerPath.isEmpty() && !QFileInfo(debuggerPath).isAbsolute())
|
||||
debuggerPath = env.searchInPath(debuggerPath);
|
||||
debuggerPath = Utils::Environment::systemEnvironment().searchInPath(debuggerPath);
|
||||
if (debuggerPath.contains(QLatin1String("cdb")))
|
||||
debuggerEngine = 4; // CDB
|
||||
mkspec = m_toolChainExtras.value(origTcId).m_mkspec;
|
||||
|
||||
@@ -51,8 +51,7 @@ QmlJSPreviewRunner::QmlJSPreviewRunner(QObject *parent) :
|
||||
+ QString::fromLocal8Bit(qgetenv("PATH"));
|
||||
m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, QLatin1String("qmlviewer"));
|
||||
|
||||
Utils::Environment environment = Utils::Environment::systemEnvironment();
|
||||
m_applicationLauncher.setEnvironment(environment);
|
||||
m_applicationLauncher.setEnvironment(Utils::Environment::systemEnvironment());
|
||||
}
|
||||
|
||||
bool QmlJSPreviewRunner::isReady() const
|
||||
|
||||
@@ -66,8 +66,8 @@ QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *k) const
|
||||
QtVersionManager *mgr = QtVersionManager::instance();
|
||||
|
||||
// find "Qt in PATH":
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
Utils::FileName qmake = Utils::FileName::fromString(env.searchInPath(QLatin1String("qmake")));
|
||||
Utils::FileName qmake = Utils::FileName::fromString(Utils::Environment::systemEnvironment()
|
||||
.searchInPath(QLatin1String("qmake")));
|
||||
|
||||
if (qmake.isEmpty())
|
||||
return -1;
|
||||
|
||||
@@ -56,8 +56,8 @@ bool sortByPriority(QtVersionFactory *a, QtVersionFactory *b)
|
||||
BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileName &qmakePath, bool isAutoDetected, const QString &autoDetectionSource, QString *error)
|
||||
{
|
||||
QHash<QString, QString> versionInfo;
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
if (!BaseQtVersion::queryQMakeVariables(qmakePath, env, &versionInfo, error))
|
||||
if (!BaseQtVersion::queryQMakeVariables(qmakePath, Utils::Environment::systemEnvironment(),
|
||||
&versionInfo, error))
|
||||
return 0;
|
||||
Utils::FileName mkspec = BaseQtVersion::mkspecFromVersionInfo(versionInfo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user