Utils: Fix build with Qt5

Amends 2b286c755b.

Change-Id: I7f28cb4ac0d5b515df1e46c1f514a0275472d438
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-03-21 10:33:28 +01:00
parent 6b270b8dc9
commit 5474495acd
2 changed files with 3 additions and 1 deletions

View File

@@ -318,7 +318,7 @@ void InfoBarDisplay::update()
auto cb = new QComboBox(); auto cb = new QComboBox();
for (const InfoBarEntry::ComboInfo &comboInfo : qAsConst(info.m_comboInfo)) for (const InfoBarEntry::ComboInfo &comboInfo : qAsConst(info.m_comboInfo))
cb->addItem(comboInfo.displayText, comboInfo.data); cb->addItem(comboInfo.displayText, comboInfo.data);
connect(cb, &QComboBox::currentIndexChanged, [cb, info]() { connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged), [cb, info]() {
info.m_comboCallBack({cb->currentText(), cb->currentData()}); info.m_comboCallBack({cb->currentText(), cb->currentData()});
}); });

View File

@@ -80,3 +80,5 @@ void removeOutdatedKits();
} // namespace McuKitManager } // namespace McuKitManager
} // namespace Internal } // namespace Internal
} // namespace McuSupport } // namespace McuSupport
Q_DECLARE_METATYPE(McuSupport::Internal::McuKitManager::UpgradeOption)