Fixed more dialog instances in AlgorithmToolset.

Thu, 23 Feb 2017 21:03:59 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 23 Feb 2017 21:03:59 +0200
changeset 1165
e6974c4d9e55
parent 1164
eabcd749759a
child 1166
d2e78bb77763

Fixed more dialog instances in AlgorithmToolset.

src/toolsets/algorithmtoolset.cpp file | annotate | diff | comparison | revisions
--- a/src/toolsets/algorithmtoolset.cpp	Thu Feb 23 21:02:14 2017 +0200
+++ b/src/toolsets/algorithmtoolset.cpp	Thu Feb 23 21:03:59 2017 +0200
@@ -246,11 +246,11 @@
 
 void AlgorithmToolset::flip()
 {
-	QDialog* dlg = new QDialog;
+	QDialog dialog {m_window};
 	Ui::FlipUI ui;
-	ui.setupUi (dlg);
+	ui.setupUi(&dialog);
 
-	if (not dlg->exec())
+	if (not dialog.exec())
 		return;
 
 	QList<Axis> sel;
@@ -333,14 +333,14 @@
 	bool ishistory = false;
 	bool prevIsHistory = false;
 
-	QDialog* dlg = new QDialog {m_window};
+	QDialog dialog {m_window};
 	Ui_AddHistoryLine ui;
-	ui.setupUi(dlg);
+	ui.setupUi(&dialog);
 	ui.m_username->setText (m_config->defaultUser());
 	ui.m_date->setDate (QDate::currentDate());
 	ui.m_comment->setFocus();
 
-	if (not dlg->exec())
+	if (not dialog.exec())
 		return;
 
 	// Find a spot to place the new comment

mercurial