forked from qt-creator/qt-creator
QmlDesigner: Fix for Annotations dialogs crashes
Change-Id: I161dfcf1181af4a45dd98f71fea08fc8ec56e3f5 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -64,7 +64,7 @@ void AnnotationEditor::showWidget()
|
||||
m_modelNode.customId(),
|
||||
m_modelNode.annotation());
|
||||
|
||||
QObject::connect(m_dialog, &AnnotationEditorDialog::accepted,
|
||||
QObject::connect(m_dialog, &AnnotationEditorDialog::acceptedDialog,
|
||||
this, &AnnotationEditor::acceptedClicked);
|
||||
QObject::connect(m_dialog, &AnnotationEditorDialog::rejected,
|
||||
this, &AnnotationEditor::cancelClicked);
|
||||
|
@@ -149,7 +149,7 @@ void AnnotationEditorDialog::acceptedClicked()
|
||||
|
||||
m_annotation = annotation;
|
||||
|
||||
emit AnnotationEditorDialog::accepted();
|
||||
emit AnnotationEditorDialog::acceptedDialog();
|
||||
}
|
||||
|
||||
void AnnotationEditorDialog::commentTitleChanged(const QString &text, QWidget *tab)
|
||||
|
@@ -49,6 +49,9 @@ public:
|
||||
void setCustomId(const QString &customId);
|
||||
QString customId() const;
|
||||
|
||||
signals:
|
||||
void acceptedDialog(); //use instead of QDialog::accepted
|
||||
|
||||
private slots:
|
||||
void acceptedClicked();
|
||||
void tabChanged(int index);
|
||||
|
@@ -53,7 +53,7 @@ void GlobalAnnotationEditor::showWidget()
|
||||
modelNode().globalAnnotation(),
|
||||
modelNode().globalStatus());
|
||||
|
||||
QObject::connect(m_dialog, &GlobalAnnotationEditorDialog::accepted,
|
||||
QObject::connect(m_dialog, &GlobalAnnotationEditorDialog::acceptedDialog,
|
||||
this, &GlobalAnnotationEditor::acceptedClicked);
|
||||
QObject::connect(m_dialog, &GlobalAnnotationEditorDialog::rejected,
|
||||
this, &GlobalAnnotationEditor::cancelClicked);
|
||||
|
@@ -164,7 +164,7 @@ void GlobalAnnotationEditorDialog::acceptedClicked()
|
||||
m_globalStatus.setStatus(ui->statusComboBox->currentIndex());
|
||||
}
|
||||
|
||||
emit GlobalAnnotationEditorDialog::accepted();
|
||||
emit GlobalAnnotationEditorDialog::acceptedDialog();
|
||||
}
|
||||
|
||||
void GlobalAnnotationEditorDialog::commentTitleChanged(const QString &text, QWidget *tab)
|
||||
|
@@ -49,6 +49,9 @@ public:
|
||||
void setStatus(GlobalAnnotationStatus status);
|
||||
GlobalAnnotationStatus globalStatus() const;
|
||||
|
||||
signals:
|
||||
void acceptedDialog(); //use instead of QDialog::accepted
|
||||
|
||||
private slots:
|
||||
void acceptedClicked();
|
||||
void tabChanged(int index);
|
||||
|
@@ -429,7 +429,7 @@ void FormEditorAnnotationIcon::createAnnotationEditor()
|
||||
m_modelNode.customId(),
|
||||
m_modelNode.annotation());
|
||||
|
||||
connect(m_annotationEditor, &AnnotationEditorDialog::accepted,
|
||||
connect(m_annotationEditor, &AnnotationEditorDialog::acceptedDialog,
|
||||
this, &FormEditorAnnotationIcon::annotationDialogAccepted);
|
||||
connect(m_annotationEditor, &QDialog::rejected,
|
||||
this, &FormEditorAnnotationIcon::annotationDialogRejected);
|
||||
|
Reference in New Issue
Block a user