forked from qt-creator/qt-creator
Fix warnings about unused lambda captures
This is the subset of clang complaints that MSVC does not disagree with. Change-Id: I0bc38b0c847d1c54f1ac9cca95d93577d39ddfcd Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -617,8 +617,7 @@ ToolChain::BuiltInHeaderPathsRunner GccToolChain::createBuiltInHeaderPathsRunner
|
|||||||
addToEnvironment(fullEnv);
|
addToEnvironment(fullEnv);
|
||||||
|
|
||||||
// This runner must be thread-safe!
|
// This runner must be thread-safe!
|
||||||
return [this,
|
return [fullEnv,
|
||||||
fullEnv,
|
|
||||||
compilerCommand = compilerCommand(),
|
compilerCommand = compilerCommand(),
|
||||||
platformCodeGenFlags = m_platformCodeGenFlags,
|
platformCodeGenFlags = m_platformCodeGenFlags,
|
||||||
reinterpretOptions = m_optionsReinterpreter,
|
reinterpretOptions = m_optionsReinterpreter,
|
||||||
@@ -1381,7 +1380,7 @@ void ClangToolChain::syncAutodetectedWithParentToolchains()
|
|||||||
|
|
||||||
if (!ToolChainManager::isLoaded()) {
|
if (!ToolChainManager::isLoaded()) {
|
||||||
QObject::connect(ToolChainManager::instance(), &ToolChainManager::toolChainsLoaded,
|
QObject::connect(ToolChainManager::instance(), &ToolChainManager::toolChainsLoaded,
|
||||||
[this, id = id()] {
|
[id = id()] {
|
||||||
if (ToolChain * const tc = ToolChainManager::findToolChain(id)) {
|
if (ToolChain * const tc = ToolChainManager::findToolChain(id)) {
|
||||||
if (tc->typeId() == Constants::CLANG_TOOLCHAIN_TYPEID)
|
if (tc->typeId() == Constants::CLANG_TOOLCHAIN_TYPEID)
|
||||||
static_cast<ClangToolChain *>(tc)->syncAutodetectedWithParentToolchains();
|
static_cast<ClangToolChain *>(tc)->syncAutodetectedWithParentToolchains();
|
||||||
@@ -1535,8 +1534,7 @@ ToolChain::BuiltInHeaderPathsRunner ClangToolChain::createBuiltInHeaderPathsRunn
|
|||||||
addToEnvironment(fullEnv);
|
addToEnvironment(fullEnv);
|
||||||
|
|
||||||
// This runner must be thread-safe!
|
// This runner must be thread-safe!
|
||||||
return [this,
|
return [fullEnv,
|
||||||
fullEnv,
|
|
||||||
compilerCommand = compilerCommand(),
|
compilerCommand = compilerCommand(),
|
||||||
platformCodeGenFlags = m_platformCodeGenFlags,
|
platformCodeGenFlags = m_platformCodeGenFlags,
|
||||||
reinterpretOptions = m_optionsReinterpreter,
|
reinterpretOptions = m_optionsReinterpreter,
|
||||||
|
@@ -514,8 +514,8 @@ bool JsonWizardFactory::isAvailable(Utils::Id platformId) const
|
|||||||
expander.registerVariable("Platform", tr("The platform selected for the wizard."),
|
expander.registerVariable("Platform", tr("The platform selected for the wizard."),
|
||||||
[platformId]() { return platformId.toString(); });
|
[platformId]() { return platformId.toString(); });
|
||||||
expander.registerVariable("Features", tr("The features available to this wizard."),
|
expander.registerVariable("Features", tr("The features available to this wizard."),
|
||||||
[this, e, platformId]() { return JsonWizard::stringListToArrayString(Utils::Id::toStringList(availableFeatures(platformId)), e); });
|
[e, platformId]() { return JsonWizard::stringListToArrayString(Utils::Id::toStringList(availableFeatures(platformId)), e); });
|
||||||
expander.registerVariable("Plugins", tr("The plugins loaded."), [this, e]() {
|
expander.registerVariable("Plugins", tr("The plugins loaded."), [e]() {
|
||||||
return JsonWizard::stringListToArrayString(Utils::Id::toStringList(pluginFeatures()), e);
|
return JsonWizard::stringListToArrayString(Utils::Id::toStringList(pluginFeatures()), e);
|
||||||
});
|
});
|
||||||
Core::JsExpander jsExpander;
|
Core::JsExpander jsExpander;
|
||||||
|
@@ -371,7 +371,7 @@ UserFileAccessor::merge(const MergingSettingsAccessor::SettingsMergeData &global
|
|||||||
// the .user and .shared files, this setting will "unstick".
|
// the .user and .shared files, this setting will "unstick".
|
||||||
SettingsMergeFunction UserFileAccessor::userStickyTrackerFunction(QStringList &stickyKeys) const
|
SettingsMergeFunction UserFileAccessor::userStickyTrackerFunction(QStringList &stickyKeys) const
|
||||||
{
|
{
|
||||||
return [this, &stickyKeys](const SettingsMergeData &global, const SettingsMergeData &local)
|
return [&stickyKeys](const SettingsMergeData &global, const SettingsMergeData &local)
|
||||||
-> SettingsMergeResult {
|
-> SettingsMergeResult {
|
||||||
const QString key = local.key;
|
const QString key = local.key;
|
||||||
const QVariant main = local.main.value(key);
|
const QVariant main = local.main.value(key);
|
||||||
|
@@ -159,7 +159,7 @@ QToolBar *CurveEditor::createToolBar(CurveEditorModel *model)
|
|||||||
cfspin->setMaximum(std::numeric_limits<int>::max());
|
cfspin->setMaximum(std::numeric_limits<int>::max());
|
||||||
|
|
||||||
auto intSignal = static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged);
|
auto intSignal = static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged);
|
||||||
connect(cfspin, intSignal, [this, model](int val) { model->commitCurrentFrame(val); });
|
connect(cfspin, intSignal, [model](int val) { model->commitCurrentFrame(val); });
|
||||||
connect(m_view, &GraphicsView::currentFrameChanged, [cfspin](int val, bool notify) {
|
connect(m_view, &GraphicsView::currentFrameChanged, [cfspin](int val, bool notify) {
|
||||||
if (notify) {
|
if (notify) {
|
||||||
cfspin->setValue(val);
|
cfspin->setValue(val);
|
||||||
|
Reference in New Issue
Block a user