From c2211703d35de8fc24e818680c033503b96167ff Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Tue, 6 Dec 2016 16:46:16 +0100 Subject: QtAutogen: Tests: Don't use std::auto_ptr --- Tests/QtAutoUicInterface/libwidget.cpp | 5 +++++ Tests/QtAutoUicInterface/libwidget.h | 3 ++- Tests/QtAutoUicInterface/mywidget.cpp | 5 +++++ Tests/QtAutoUicInterface/mywidget.h | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Tests/QtAutoUicInterface/libwidget.cpp b/Tests/QtAutoUicInterface/libwidget.cpp index b25f3d7..008c22a 100644 --- a/Tests/QtAutoUicInterface/libwidget.cpp +++ b/Tests/QtAutoUicInterface/libwidget.cpp @@ -7,3 +7,8 @@ LibWidget::LibWidget(QWidget* parent) { ui->setupUi(this); } + +LibWidget::~LibWidget() +{ + delete ui; +} diff --git a/Tests/QtAutoUicInterface/libwidget.h b/Tests/QtAutoUicInterface/libwidget.h index a4400d2..b6f3e82 100644 --- a/Tests/QtAutoUicInterface/libwidget.h +++ b/Tests/QtAutoUicInterface/libwidget.h @@ -16,9 +16,10 @@ class LibWidget : public QWidget Q_OBJECT public: explicit LibWidget(QWidget* parent = 0); + ~LibWidget(); private: - const std::auto_ptr ui; + Ui::LibWidget* ui; }; #endif diff --git a/Tests/QtAutoUicInterface/mywidget.cpp b/Tests/QtAutoUicInterface/mywidget.cpp index 885165b..7cf1a13 100644 --- a/Tests/QtAutoUicInterface/mywidget.cpp +++ b/Tests/QtAutoUicInterface/mywidget.cpp @@ -7,3 +7,8 @@ MyWidget::MyWidget(QWidget* parent) { ui->setupUi(this); } + +MyWidget::~MyWidget() +{ + delete ui; +} diff --git a/Tests/QtAutoUicInterface/mywidget.h b/Tests/QtAutoUicInterface/mywidget.h index fc49e80..c23e55d 100644 --- a/Tests/QtAutoUicInterface/mywidget.h +++ b/Tests/QtAutoUicInterface/mywidget.h @@ -16,9 +16,10 @@ class MyWidget : public QWidget Q_OBJECT public: explicit MyWidget(QWidget* parent = 0); + ~MyWidget(); private: - const std::auto_ptr ui; + Ui::MyWidget* ui; }; #endif -- cgit v0.12