Skip to content

Commit cb9ff69

Browse files
committed
Remove unneeded destructor (rule of 0)
1 parent 3c1ef52 commit cb9ff69

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

qt/HelloQt.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ HelloQt::HelloQt(QWidget *parent) : QWidget(parent)
3939

4040
HelloQt::~HelloQt()
4141
{
42-
// Nothing to do here, the parent system makes sure that all the elements that
43-
// are parented to this is cleaned up
4442
}
4543

4644
void HelloQt::writeToDebug(void)

qt/HelloQt.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ class HelloQt : public QWidget
55
Q_OBJECT;// Very Important, this is all the magic that is needed
66
public:
77
explicit HelloQt(QWidget *parent = nullptr);
8-
~HelloQt();
8+
9+
// No need for a destructor (~HelloQt) here, the parent system makes sure that all the elements that
10+
// are parented to this is cleaned up
11+
912
private slots:
1013
void writeToDebug();
1114
};

0 commit comments

Comments
 (0)