forked from qt-creator/qt-creator
QmlDesigner: Fix remaining C++20 warnings about [=] captures
Change-Id: Ia54208e5e72016f6ca22e0b005d479aac8f49929 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -1462,8 +1462,9 @@ void EffectComposerModel::bakeShaders()
|
|||||||
args << "-o" << outPaths[i] << srcPaths[i];
|
args << "-o" << outPaths[i] << srcPaths[i];
|
||||||
|
|
||||||
auto qsbProcess = new Utils::Process(this);
|
auto qsbProcess = new Utils::Process(this);
|
||||||
connect(qsbProcess, &Utils::Process::done, this, [=] {
|
connect(qsbProcess, &Utils::Process::done, this,
|
||||||
handleQsbProcessExit(qsbProcess, srcPaths[i], preview);
|
[this, qsbProcess, path = srcPaths[i], preview] {
|
||||||
|
handleQsbProcessExit(qsbProcess, path, preview);
|
||||||
});
|
});
|
||||||
qsbProcess->setWorkingDirectory(workDir.absolutePath());
|
qsbProcess->setWorkingDirectory(workDir.absolutePath());
|
||||||
qsbProcess->setCommand({qsbPath, args});
|
qsbProcess->setCommand({qsbPath, args});
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ void RichTextCellEditor::setupSignal(int index, const QString &commentTitle)
|
|||||||
if (m_connection)
|
if (m_connection)
|
||||||
disconnect(m_connection);
|
disconnect(m_connection);
|
||||||
|
|
||||||
m_connection = connect(this, &RichTextCellEditor::clicked, this, [=]() {
|
m_connection = connect(this, &RichTextCellEditor::clicked, this, [this, index, commentTitle] {
|
||||||
emit richTextClicked(index, commentTitle);
|
emit richTextClicked(index, commentTitle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ AnnotationTableView::AnnotationTableView(QWidget *parent)
|
|||||||
if (item->isCheckable())
|
if (item->isCheckable())
|
||||||
m_model->setData(item->index(), item->checkState() == Qt::Checked);
|
m_model->setData(item->index(), item->checkState() == Qt::Checked);
|
||||||
|
|
||||||
if (this->m_modelUpdating)
|
if (m_modelUpdating)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto *valueItem = m_model->item(item->row(), ColumnId::Value);
|
auto *valueItem = m_model->item(item->row(), ColumnId::Value);
|
||||||
|
|||||||
@@ -223,7 +223,9 @@ void SignalList::addConnection(const QModelIndex &modelIndex)
|
|||||||
if (rootModelNode.isValid() && rootModelNode.metaInfo().isValid()) {
|
if (rootModelNode.isValid() && rootModelNode.metaInfo().isValid()) {
|
||||||
NodeMetaInfo nodeMetaInfo = view->model()->qtQuickConnectionsMetaInfo();
|
NodeMetaInfo nodeMetaInfo = view->model()->qtQuickConnectionsMetaInfo();
|
||||||
if (nodeMetaInfo.isValid()) {
|
if (nodeMetaInfo.isValid()) {
|
||||||
view->executeInTransaction("ConnectionModel::addConnection", [=, &rootModelNode](){
|
view->executeInTransaction("ConnectionModel::addConnection",
|
||||||
|
[this, view, nodeMetaInfo, targetModelIndex, modelIndex,
|
||||||
|
buttonModelIndex, signalName, &rootModelNode] {
|
||||||
ModelNode newNode = view->createModelNode("QtQuick.Connections",
|
ModelNode newNode = view->createModelNode("QtQuick.Connections",
|
||||||
nodeMetaInfo.majorVersion(),
|
nodeMetaInfo.majorVersion(),
|
||||||
nodeMetaInfo.minorVersion());
|
nodeMetaInfo.minorVersion());
|
||||||
@@ -263,7 +265,8 @@ void SignalList::removeConnection(const QModelIndex &modelIndex)
|
|||||||
|
|
||||||
ModelNode node = targetSignal.parentModelNode();
|
ModelNode node = targetSignal.parentModelNode();
|
||||||
if (node.isValid()) {
|
if (node.isValid()) {
|
||||||
view->executeInTransaction("ConnectionModel::removeConnection", [=, &node](){
|
view->executeInTransaction("ConnectionModel::removeConnection",
|
||||||
|
[this, modelIndex, buttonModelIndex, targetSignal, &node] {
|
||||||
QList<SignalHandlerProperty> allSignals = node.signalProperties();
|
QList<SignalHandlerProperty> allSignals = node.signalProperties();
|
||||||
if (allSignals.size() > 1) {
|
if (allSignals.size() > 1) {
|
||||||
const auto targetSignalWithPrefix = SignalHandlerProperty::prefixAdded(targetSignal.name());
|
const auto targetSignalWithPrefix = SignalHandlerProperty::prefixAdded(targetSignal.name());
|
||||||
|
|||||||
@@ -46,13 +46,11 @@ CollectionView::CollectionView(ExternalDependenciesInterface &externalDependenci
|
|||||||
|
|
||||||
{
|
{
|
||||||
connect(ProjectExplorer::ProjectManager::instance(),
|
connect(ProjectExplorer::ProjectManager::instance(),
|
||||||
&ProjectExplorer::ProjectManager::startupProjectChanged,
|
&ProjectExplorer::ProjectManager::startupProjectChanged, this, [this] {
|
||||||
this,
|
resetDataStoreNode();
|
||||||
[=] {
|
if (m_widget.get())
|
||||||
resetDataStoreNode();
|
m_widget->collectionDetailsModel()->removeAllCollections();
|
||||||
if (m_widget.get())
|
});
|
||||||
m_widget->collectionDetailsModel()->removeAllCollections();
|
|
||||||
});
|
|
||||||
resetDataStoreNode();
|
resetDataStoreNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ void LayoutInGridLayout::removeSpacersBySpanning(QList<ModelNode> &nodes)
|
|||||||
|
|
||||||
LayoutInGridLayout::LessThan LayoutInGridLayout::lessThan()
|
LayoutInGridLayout::LessThan LayoutInGridLayout::lessThan()
|
||||||
{
|
{
|
||||||
return [=](const ModelNode &node1, const ModelNode &node2)->bool {
|
return [this](const ModelNode &node1, const ModelNode &node2) {
|
||||||
QmlItemNode itemNode1 = QmlItemNode(node1);
|
QmlItemNode itemNode1 = QmlItemNode(node1);
|
||||||
QmlItemNode itemNode2 = QmlItemNode(node2);
|
QmlItemNode itemNode2 = QmlItemNode(node2);
|
||||||
if (itemNode1.isValid() && itemNode2.isValid()) {
|
if (itemNode1.isValid() && itemNode2.isValid()) {
|
||||||
|
|||||||
@@ -227,7 +227,8 @@ void BackendModel::addNewBackend()
|
|||||||
|
|
||||||
/* Add a property for non singleton types. For singletons just adding the import is enough. */
|
/* Add a property for non singleton types. For singletons just adding the import is enough. */
|
||||||
if (!dialog.isSingleton()) {
|
if (!dialog.isSingleton()) {
|
||||||
m_connectionView->executeInTransaction("BackendModel::addNewBackend", [=, &dialog](){
|
m_connectionView->executeInTransaction("BackendModel::addNewBackend",
|
||||||
|
[this, metaInfo, typeName, propertyName, &dialog] {
|
||||||
int minorVersion = metaInfo.minorVersion();
|
int minorVersion = metaInfo.minorVersion();
|
||||||
int majorVersion = metaInfo.majorVersion();
|
int majorVersion = metaInfo.majorVersion();
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,8 @@ void ConnectionModel::addConnection(const PropertyName &signalName)
|
|||||||
signalHandlerName = addOnToSignalName(QString::fromUtf8(signalHandlerName)).toUtf8();
|
signalHandlerName = addOnToSignalName(QString::fromUtf8(signalHandlerName)).toUtf8();
|
||||||
|
|
||||||
connectionView()
|
connectionView()
|
||||||
->executeInTransaction("ConnectionModel::addConnection", [=, &rootModelNode]() {
|
->executeInTransaction("ConnectionModel::addConnection",
|
||||||
|
[this, nodeMetaInfo, signalHandlerName, &rootModelNode] {
|
||||||
ModelNode newNode = connectionView()
|
ModelNode newNode = connectionView()
|
||||||
->createModelNode("QtQuick.Connections",
|
->createModelNode("QtQuick.Connections",
|
||||||
nodeMetaInfo.majorVersion(),
|
nodeMetaInfo.majorVersion(),
|
||||||
|
|||||||
@@ -125,7 +125,8 @@ bool ContentLibraryMaterialsModel::fetchBundleIcons(const QDir &bundleDir)
|
|||||||
downloader->setProbeUrl(false);
|
downloader->setProbeUrl(false);
|
||||||
downloader->setDownloadEnabled(true);
|
downloader->setDownloadEnabled(true);
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir] {
|
||||||
FileExtractor *extractor = new FileExtractor(this);
|
FileExtractor *extractor = new FileExtractor(this);
|
||||||
extractor->setArchiveName(downloader->completeBaseName());
|
extractor->setArchiveName(downloader->completeBaseName());
|
||||||
extractor->setSourceFile(downloader->outputFile());
|
extractor->setSourceFile(downloader->outputFile());
|
||||||
@@ -133,7 +134,8 @@ bool ContentLibraryMaterialsModel::fetchBundleIcons(const QDir &bundleDir)
|
|||||||
extractor->setAlwaysCreateDir(false);
|
extractor->setAlwaysCreateDir(false);
|
||||||
extractor->setClearTargetPathContents(false);
|
extractor->setClearTargetPathContents(false);
|
||||||
|
|
||||||
QObject::connect(extractor, &FileExtractor::finishedChanged, this, [=]() {
|
QObject::connect(extractor, &FileExtractor::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir, extractor] {
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
extractor->deleteLater();
|
extractor->deleteLater();
|
||||||
|
|
||||||
@@ -162,10 +164,10 @@ bool ContentLibraryMaterialsModel::fetchBundleMetadata(const QDir &bundleDir)
|
|||||||
downloader->setDownloadEnabled(true);
|
downloader->setDownloadEnabled(true);
|
||||||
downloader->setTargetFilePath(matBundlePath);
|
downloader->setTargetFilePath(matBundlePath);
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir] {
|
||||||
if (fetchBundleIcons(bundleDir))
|
if (fetchBundleIcons(bundleDir))
|
||||||
loadMaterialBundle(bundleDir);
|
loadMaterialBundle(bundleDir);
|
||||||
|
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -181,7 +183,8 @@ void ContentLibraryMaterialsModel::downloadSharedFiles(const QDir &targetDir, co
|
|||||||
downloader->setProbeUrl(false);
|
downloader->setProbeUrl(false);
|
||||||
downloader->setDownloadEnabled(true);
|
downloader->setDownloadEnabled(true);
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
|
||||||
|
[this, downloader, targetDir] {
|
||||||
FileExtractor *extractor = new FileExtractor(this);
|
FileExtractor *extractor = new FileExtractor(this);
|
||||||
extractor->setArchiveName(downloader->completeBaseName());
|
extractor->setArchiveName(downloader->completeBaseName());
|
||||||
extractor->setSourceFile(downloader->outputFile());
|
extractor->setSourceFile(downloader->outputFile());
|
||||||
|
|||||||
@@ -446,7 +446,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(const QDir &bundleDir)
|
|||||||
downloader->setProbeUrl(false);
|
downloader->setProbeUrl(false);
|
||||||
downloader->setDownloadEnabled(true);
|
downloader->setDownloadEnabled(true);
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::downloadFailed, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::downloadFailed, this,
|
||||||
|
[this, metaFileExists, bundleDir] {
|
||||||
if (metaFileExists) {
|
if (metaFileExists) {
|
||||||
if (fetchTextureBundleIcons(bundleDir)) {
|
if (fetchTextureBundleIcons(bundleDir)) {
|
||||||
QString bundleIconPath = m_downloadPath + "/TextureBundleIcons";
|
QString bundleIconPath = m_downloadPath + "/TextureBundleIcons";
|
||||||
@@ -459,7 +460,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(const QDir &bundleDir)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir, metaFileExists, filePath] {
|
||||||
FileExtractor *extractor = new FileExtractor(this);
|
FileExtractor *extractor = new FileExtractor(this);
|
||||||
extractor->setArchiveName(downloader->completeBaseName());
|
extractor->setArchiveName(downloader->completeBaseName());
|
||||||
extractor->setSourceFile(downloader->outputFile());
|
extractor->setSourceFile(downloader->outputFile());
|
||||||
@@ -469,7 +471,8 @@ bool ContentLibraryWidget::fetchTextureBundleMetadata(const QDir &bundleDir)
|
|||||||
extractor->setAlwaysCreateDir(false);
|
extractor->setAlwaysCreateDir(false);
|
||||||
extractor->setClearTargetPathContents(false);
|
extractor->setClearTargetPathContents(false);
|
||||||
|
|
||||||
QObject::connect(extractor, &FileExtractor::finishedChanged, this, [=]() {
|
QObject::connect(extractor, &FileExtractor::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir, extractor, metaFileExists, filePath] {
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
extractor->deleteLater();
|
extractor->deleteLater();
|
||||||
|
|
||||||
@@ -527,7 +530,8 @@ bool ContentLibraryWidget::fetchTextureBundleIcons(const QDir &bundleDir)
|
|||||||
downloader->setProbeUrl(false);
|
downloader->setProbeUrl(false);
|
||||||
downloader->setDownloadEnabled(true);
|
downloader->setDownloadEnabled(true);
|
||||||
|
|
||||||
QObject::connect(downloader, &FileDownloader::finishedChanged, this, [=]() {
|
QObject::connect(downloader, &FileDownloader::finishedChanged, this,
|
||||||
|
[this, downloader, bundleDir] {
|
||||||
FileExtractor *extractor = new FileExtractor(this);
|
FileExtractor *extractor = new FileExtractor(this);
|
||||||
extractor->setArchiveName(downloader->completeBaseName());
|
extractor->setArchiveName(downloader->completeBaseName());
|
||||||
extractor->setSourceFile(downloader->outputFile());
|
extractor->setSourceFile(downloader->outputFile());
|
||||||
@@ -535,7 +539,8 @@ bool ContentLibraryWidget::fetchTextureBundleIcons(const QDir &bundleDir)
|
|||||||
extractor->setAlwaysCreateDir(false);
|
extractor->setAlwaysCreateDir(false);
|
||||||
extractor->setClearTargetPathContents(false);
|
extractor->setClearTargetPathContents(false);
|
||||||
|
|
||||||
QObject::connect(extractor, &FileExtractor::finishedChanged, this, [=]() {
|
QObject::connect(extractor, &FileExtractor::finishedChanged, this,
|
||||||
|
[this, downloader, extractor] {
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
extractor->deleteLater();
|
extractor->deleteLater();
|
||||||
|
|
||||||
|
|||||||
@@ -643,11 +643,10 @@ void Edit3DView::createSeekerSliderAction()
|
|||||||
m_seekerAction->action()->setEnabled(false);
|
m_seekerAction->action()->setEnabled(false);
|
||||||
m_seekerAction->action()->setToolTip(QLatin1String("Seek particle system time when paused."));
|
m_seekerAction->action()->setToolTip(QLatin1String("Seek particle system time when paused."));
|
||||||
|
|
||||||
connect(m_seekerAction->seekerAction(),
|
connect(m_seekerAction->seekerAction(), &SeekerSliderAction::valueChanged, this,
|
||||||
&SeekerSliderAction::valueChanged,
|
[this] (int value) {
|
||||||
this, [=] (int value) {
|
emitView3DAction(View3DActionType::ParticlesSeek, value);
|
||||||
this->emitView3DAction(View3DActionType::ParticlesSeek, value);
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint Edit3DView::resolveToolbarPopupPos(Edit3DAction *action) const
|
QPoint Edit3DView::resolveToolbarPopupPos(Edit3DAction *action) const
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ EventListModel *EventListView::eventListModel() const
|
|||||||
|
|
||||||
void EventListView::addEvent(const Event &event)
|
void EventListView::addEvent(const Event &event)
|
||||||
{
|
{
|
||||||
executeInTransaction("EventListView::addEvent", [=]() {
|
executeInTransaction("EventListView::addEvent", [this, event] {
|
||||||
|
|
||||||
QByteArray unqualifiedTypeName = "ListElement";
|
QByteArray unqualifiedTypeName = "ListElement";
|
||||||
#ifdef QDS_USE_PROJECTSTORAGE
|
#ifdef QDS_USE_PROJECTSTORAGE
|
||||||
@@ -110,7 +110,7 @@ void EventListView::addEvent(const Event &event)
|
|||||||
|
|
||||||
void EventListView::removeEvent(const QString &eventId)
|
void EventListView::removeEvent(const QString &eventId)
|
||||||
{
|
{
|
||||||
executeInTransaction("EventListView::removeEvent", [=]() {
|
executeInTransaction("EventListView::removeEvent", [this, eventId] {
|
||||||
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
||||||
if (node.variantProperty("eventId").value().toString() == eventId) {
|
if (node.variantProperty("eventId").value().toString() == eventId) {
|
||||||
node.destroy();
|
node.destroy();
|
||||||
@@ -122,7 +122,7 @@ void EventListView::removeEvent(const QString &eventId)
|
|||||||
|
|
||||||
void EventListView::renameEvent(const QString &oldId, const QString &newId)
|
void EventListView::renameEvent(const QString &oldId, const QString &newId)
|
||||||
{
|
{
|
||||||
executeInTransaction("EventListView::renameEvent", [=]() {
|
executeInTransaction("EventListView::renameEvent", [this, oldId, newId] {
|
||||||
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
||||||
if (node.variantProperty("eventId").value().toString() == oldId) {
|
if (node.variantProperty("eventId").value().toString() == oldId) {
|
||||||
node.variantProperty("eventId").setValue(newId);
|
node.variantProperty("eventId").setValue(newId);
|
||||||
@@ -134,7 +134,7 @@ void EventListView::renameEvent(const QString &oldId, const QString &newId)
|
|||||||
|
|
||||||
void EventListView::setShortcut(const QString &id, const QString &text)
|
void EventListView::setShortcut(const QString &id, const QString &text)
|
||||||
{
|
{
|
||||||
executeInTransaction("EventListView::setShortcut", [=]() {
|
executeInTransaction("EventListView::setShortcut", [this, id, text] {
|
||||||
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
||||||
if (node.variantProperty("eventId").value().toString() == id) {
|
if (node.variantProperty("eventId").value().toString() == id) {
|
||||||
node.variantProperty("shortcut").setValue(text);
|
node.variantProperty("shortcut").setValue(text);
|
||||||
@@ -146,7 +146,7 @@ void EventListView::setShortcut(const QString &id, const QString &text)
|
|||||||
|
|
||||||
void EventListView::setDescription(const QString &id, const QString &text)
|
void EventListView::setDescription(const QString &id, const QString &text)
|
||||||
{
|
{
|
||||||
executeInTransaction("EventListView::setDescription", [=]() {
|
executeInTransaction("EventListView::setDescription", [this, id, text] {
|
||||||
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
for (auto node : rootModelNode().defaultNodeListProperty().toModelNodeList()) {
|
||||||
if (node.variantProperty("eventId").value().toString() == id) {
|
if (node.variantProperty("eventId").value().toString() == id) {
|
||||||
node.variantProperty("eventDescription").setValue(text);
|
node.variantProperty("eventDescription").setValue(text);
|
||||||
|
|||||||
@@ -628,11 +628,10 @@ DocumentWarningWidget *FormEditorWidget::errorWidget()
|
|||||||
{
|
{
|
||||||
if (m_documentErrorWidget.isNull()) {
|
if (m_documentErrorWidget.isNull()) {
|
||||||
m_documentErrorWidget = new DocumentWarningWidget(this);
|
m_documentErrorWidget = new DocumentWarningWidget(this);
|
||||||
connect(m_documentErrorWidget.data(),
|
connect(m_documentErrorWidget.data(), &DocumentWarningWidget::gotoCodeClicked,
|
||||||
&DocumentWarningWidget::gotoCodeClicked,
|
[this](const QString &, int codeLine, int codeColumn) {
|
||||||
[=](const QString &, int codeLine, int codeColumn) {
|
m_formEditorView->gotoError(codeLine, codeColumn);
|
||||||
m_formEditorView->gotoError(codeLine, codeColumn);
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return m_documentErrorWidget;
|
return m_documentErrorWidget;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ void MaterialEditorView::handlePreviewEnvChanged(const QString &envAndValue)
|
|||||||
if (parts.size() > 1)
|
if (parts.size() > 1)
|
||||||
value = parts[1];
|
value = parts[1];
|
||||||
|
|
||||||
auto renderPreviews = [=](const QString &auxEnv, const QString &auxValue) {
|
auto renderPreviews = [this](const QString &auxEnv, const QString &auxValue) {
|
||||||
rootModelNode().setAuxiliaryData(materialPreviewEnvDocProperty, auxEnv);
|
rootModelNode().setAuxiliaryData(materialPreviewEnvDocProperty, auxEnv);
|
||||||
rootModelNode().setAuxiliaryData(materialPreviewEnvProperty, auxEnv);
|
rootModelNode().setAuxiliaryData(materialPreviewEnvProperty, auxEnv);
|
||||||
rootModelNode().setAuxiliaryData(materialPreviewEnvValueDocProperty, auxValue);
|
rootModelNode().setAuxiliaryData(materialPreviewEnvValueDocProperty, auxValue);
|
||||||
@@ -491,13 +491,13 @@ void MaterialEditorView::handlePreviewEnvChanged(const QString &envAndValue)
|
|||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(m_colorDialog, &QColorDialog::colorSelected,
|
QObject::connect(m_colorDialog, &QColorDialog::colorSelected,
|
||||||
m_colorDialog, [=](const QColor &color) {
|
m_colorDialog, [this, renderPreviews, env](const QColor &color) {
|
||||||
renderPreviews(env, color.name());
|
renderPreviews(env, color.name());
|
||||||
rootModelNode().setAuxiliaryData(materialPreviewColorDocProperty, color.name());
|
rootModelNode().setAuxiliaryData(materialPreviewColorDocProperty, color.name());
|
||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(m_colorDialog, &QColorDialog::rejected,
|
QObject::connect(m_colorDialog, &QColorDialog::rejected, m_colorDialog,
|
||||||
m_colorDialog, [=]() {
|
[this, renderPreviews, oldEnv, oldValue] {
|
||||||
renderPreviews(oldEnv, oldValue);
|
renderPreviews(oldEnv, oldValue);
|
||||||
initPreviewData();
|
initPreviewData();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ PathTool::PathTool(ExternalDependenciesInterface &externalDepoendencies)
|
|||||||
{
|
{
|
||||||
auto textToolAction = new PathToolAction;
|
auto textToolAction = new PathToolAction;
|
||||||
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
||||||
connect(textToolAction->action(), &QAction::triggered, [=]() {
|
connect(textToolAction->action(), &QAction::triggered, [this] {
|
||||||
if (m_pathToolView.model())
|
if (m_pathToolView.model())
|
||||||
m_pathToolView.model()->detachView(&m_pathToolView);
|
m_pathToolView.model()->detachView(&m_pathToolView);
|
||||||
view()->changeCurrentToolTo(this);
|
view()->changeCurrentToolTo(this);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ void PropertyEditorView::changeValue(const QString &name)
|
|||||||
|
|
||||||
if (QmlDesigner::ModelNode::isValidId(newId) && !hasId(newId)) {
|
if (QmlDesigner::ModelNode::isValidId(newId) && !hasId(newId)) {
|
||||||
executeInTransaction("PropertyEditorView::changeId",
|
executeInTransaction("PropertyEditorView::changeId",
|
||||||
[=] { m_selectedNode.setIdWithRefactoring(newId); });
|
[this, newId] { m_selectedNode.setIdWithRefactoring(newId); });
|
||||||
} else {
|
} else {
|
||||||
m_locked = true;
|
m_locked = true;
|
||||||
value->setValue(m_selectedNode.id());
|
value->setValue(m_selectedNode.id());
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ QWidget *TimelineEditorDelegate::createEditor(QWidget *parent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (comboBox) {
|
if (comboBox) {
|
||||||
connect(comboBox, &QComboBox::activated, this, [=] {
|
connect(comboBox, &QComboBox::activated, this, [this, comboBox] {
|
||||||
auto delegate = const_cast<TimelineEditorDelegate *>(this);
|
auto delegate = const_cast<TimelineEditorDelegate *>(this);
|
||||||
emit delegate->commitData(comboBox);
|
emit delegate->commitData(comboBox);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -336,7 +336,8 @@ const QmlTimeline TimelineView::addNewTimeline()
|
|||||||
|
|
||||||
ModelNode timelineNode;
|
ModelNode timelineNode;
|
||||||
|
|
||||||
executeInTransaction("TimelineView::addNewTimeline", [=, &timelineNode]() {
|
executeInTransaction("TimelineView::addNewTimeline",
|
||||||
|
[this, timelineType, metaInfo, &timelineNode] {
|
||||||
bool hasTimelines = getTimelines().isEmpty();
|
bool hasTimelines = getTimelines().isEmpty();
|
||||||
QString currentStateName = getStateName(this, hasTimelines);
|
QString currentStateName = getStateName(this, hasTimelines);
|
||||||
|
|
||||||
@@ -371,7 +372,8 @@ ModelNode TimelineView::addAnimation(QmlTimeline timeline)
|
|||||||
|
|
||||||
ModelNode animationNode;
|
ModelNode animationNode;
|
||||||
|
|
||||||
executeInTransaction("TimelineView::addAnimation", [=, &animationNode]() {
|
executeInTransaction("TimelineView::addAnimation",
|
||||||
|
[this, timeline, animationType, metaInfo, &animationNode] {
|
||||||
bool hasAnimations = getAnimations(timeline).isEmpty();
|
bool hasAnimations = getAnimations(timeline).isEmpty();
|
||||||
QString currentStateName = getStateName(this, hasAnimations);
|
QString currentStateName = getStateName(this, hasAnimations);
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent)
|
|||||||
m_ignoreWarningsCheckBox->setText(tr("Always ignore these warnings about features "
|
m_ignoreWarningsCheckBox->setText(tr("Always ignore these warnings about features "
|
||||||
"not supported by Qt Quick Designer."));
|
"not supported by Qt Quick Designer."));
|
||||||
|
|
||||||
connect(m_navigateLabel, &QLabel::linkActivated, this, [=](const QString &link) {
|
connect(m_navigateLabel, &QLabel::linkActivated, this, [this](const QString &link) {
|
||||||
if (link == QLatin1String("goToCode")) {
|
if (link == QLatin1String("goToCode")) {
|
||||||
emitGotoCodeClicked(m_messages.at(m_currentMessage));
|
emitGotoCodeClicked(m_messages.at(m_currentMessage));
|
||||||
} else if (link == QLatin1String("previous")) {
|
} else if (link == QLatin1String("previous")) {
|
||||||
@@ -54,7 +54,7 @@ DocumentWarningWidget::DocumentWarningWidget(QWidget *parent)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_continueButton, &QPushButton::clicked, this, [=]() {
|
connect(m_continueButton, &QPushButton::clicked, this, [this] {
|
||||||
if (m_mode == ErrorMode)
|
if (m_mode == ErrorMode)
|
||||||
emitGotoCodeClicked(m_messages.at(m_currentMessage));
|
emitGotoCodeClicked(m_messages.at(m_currentMessage));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie
|
|||||||
st}
|
st}
|
||||||
.attachTo(this);
|
.attachTo(this);
|
||||||
|
|
||||||
connect(m_designerEnableDebuggerCheckBox, &QCheckBox::toggled, [=](bool checked) {
|
connect(m_designerEnableDebuggerCheckBox, &QCheckBox::toggled, [this](bool checked) {
|
||||||
if (checked && ! m_designerShowDebuggerCheckBox->isChecked())
|
if (checked && ! m_designerShowDebuggerCheckBox->isChecked())
|
||||||
m_designerShowDebuggerCheckBox->setChecked(true);
|
m_designerShowDebuggerCheckBox->setChecked(true);
|
||||||
}
|
}
|
||||||
@@ -288,7 +288,7 @@ SettingsPageWidget::SettingsPageWidget(ExternalDependencies &externalDependencie
|
|||||||
m_puppetBuildPathLineEdit, &QLineEdit::setEnabled);
|
m_puppetBuildPathLineEdit, &QLineEdit::setEnabled);
|
||||||
connect(resetStyle, &QPushButton::clicked,
|
connect(resetStyle, &QPushButton::clicked,
|
||||||
m_styleLineEdit, &QLineEdit::clear);
|
m_styleLineEdit, &QLineEdit::clear);
|
||||||
connect(m_controls2StyleComboBox, &QComboBox::currentTextChanged, [=]() {
|
connect(m_controls2StyleComboBox, &QComboBox::currentTextChanged, [this] {
|
||||||
m_styleLineEdit->setText(m_controls2StyleComboBox->currentText());
|
m_styleLineEdit->setText(m_controls2StyleComboBox->currentText());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user