forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6'
Conflicts: src/libs/utils/settingsaccessor.cpp src/plugins/autotest/autotestplugin.cpp src/plugins/git/gitclient.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.h Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
This commit is contained in:
@@ -460,6 +460,7 @@ void QbsProject::updateAfterParse()
|
||||
updateCppCodeModel();
|
||||
updateQmlJsCodeModel();
|
||||
emit fileListChanged();
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
void QbsProject::delayedUpdateAfterParse()
|
||||
@@ -617,6 +618,7 @@ void QbsProject::updateAfterBuild()
|
||||
m_extraCompilersPending = false;
|
||||
updateCppCodeModel();
|
||||
}
|
||||
emit dataChanged();
|
||||
}
|
||||
|
||||
void QbsProject::registerQbsProjectParser(QbsProjectParser *p)
|
||||
|
||||
@@ -105,6 +105,9 @@ public:
|
||||
|
||||
void delayParsing();
|
||||
|
||||
signals:
|
||||
void dataChanged();
|
||||
|
||||
private:
|
||||
void handleQbsParsingDone(bool success);
|
||||
|
||||
|
||||
@@ -112,8 +112,8 @@ QbsRunConfiguration::QbsRunConfiguration(Target *target)
|
||||
connect(target, &Target::kitChanged,
|
||||
this, &QbsRunConfiguration::updateTargetInformation);
|
||||
|
||||
connect(target->project(), &Project::parsingFinished,
|
||||
this, &QbsRunConfiguration::updateTargetInformation);
|
||||
QbsProject *qbsProject = static_cast<QbsProject *>(project());
|
||||
connect(qbsProject, &QbsProject::dataChanged, this, [this] { m_envCache.clear(); });
|
||||
}
|
||||
|
||||
QVariantMap QbsRunConfiguration::toMap() const
|
||||
@@ -164,9 +164,16 @@ void QbsRunConfiguration::setUsingLibraryPaths(bool useLibPaths)
|
||||
|
||||
void QbsRunConfiguration::addToBaseEnvironment(Utils::Environment &env) const
|
||||
{
|
||||
const auto key = qMakePair(env.toStringList(), m_usingLibraryPaths);
|
||||
const auto it = m_envCache.constFind(key);
|
||||
if (it != m_envCache.constEnd()) {
|
||||
env = it.value();
|
||||
return;
|
||||
}
|
||||
BuildTargetInfo bti = target()->applicationTargets().buildTargetInfo(buildKey());
|
||||
if (bti.runEnvModifier)
|
||||
bti.runEnvModifier(env, m_usingLibraryPaths);
|
||||
m_envCache.insert(key, env);
|
||||
}
|
||||
|
||||
Utils::OutputFormatter *QbsRunConfiguration::createOutputFormatter() const
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
#include <projectexplorer/runnables.h>
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QHash>
|
||||
#include <QLabel>
|
||||
#include <QPair>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
|
||||
@@ -62,6 +64,8 @@ private:
|
||||
|
||||
void updateTargetInformation();
|
||||
|
||||
using EnvCache = QHash<QPair<QStringList, bool>, Utils::Environment>;
|
||||
mutable EnvCache m_envCache;
|
||||
bool m_usingLibraryPaths = true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user