src/mainwindow.cpp

changeset 3
55a55a9ec2c2
parent 1
51d14b0c68c0
child 5
593a658cba8e
--- a/src/mainwindow.cpp	Sat Aug 24 14:44:42 2019 +0300
+++ b/src/mainwindow.cpp	Sun Sep 22 11:51:41 2019 +0300
@@ -1,13 +1,14 @@
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "version.h"
+#include <QQuaternion>
 
 MainWindow::MainWindow(QWidget *parent) :
-    QMainWindow{parent},
-    ui{*new Ui_MainWindow}
+	QMainWindow{parent},
+	ui{std::make_unique<Ui_MainWindow>()}
 {
-	ui.setupUi(this);
-	connect(ui.actionQuit, &QAction::triggered, this, &QMainWindow::close);
+	ui->setupUi(this);
+	connect(ui->actionQuit, &QAction::triggered, this, &QMainWindow::close);
 	QString title = ::appName;
 	title += " ";
 	title += fullVersionString();
@@ -16,5 +17,4 @@
 
 MainWindow::~MainWindow()
 {
-    delete &this->ui;
 }

mercurial