Mod: modernize C++: use equals default

This commit is contained in:
wmayer
2023-08-21 19:34:33 +02:00
committed by wwmayer
parent 09a965d595
commit 142b86fde2
13 changed files with 15 additions and 55 deletions

View File

@@ -42,8 +42,6 @@ public:
initialize("The DraftUtils module contains utility functions for the Draft module."); // register with Python
}
~Module() override {}
private:
Py::Object readDXF(const Py::Tuple& /*args*/)
{

View File

@@ -36,8 +36,6 @@ public:
initialize("This module is the Start module."); // register with Python
}
~Module() override {}
private:
};

View File

@@ -53,8 +53,6 @@ public:
initialize("This module is the StartGui module."); // register with Python
}
~Module() override {}
private:
};

View File

@@ -80,10 +80,7 @@ DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent )
/**
* Destroys the object and frees any allocated resources
*/
DlgStartPreferencesImp::~DlgStartPreferencesImp()
{
// no need to delete child widgets, Qt does it all for us
}
DlgStartPreferencesImp::~DlgStartPreferencesImp() = default;
void DlgStartPreferencesImp::saveSettings()
{

View File

@@ -42,13 +42,9 @@ using namespace StartGui;
TYPESYSTEM_SOURCE(StartGui::Workbench, Gui::StdWorkbench)
StartGui::Workbench::Workbench()
{
}
StartGui::Workbench::Workbench() = default;
StartGui::Workbench::~Workbench()
{
}
StartGui::Workbench::~Workbench() = default;
void StartGui::Workbench::activated()
{

View File

@@ -137,8 +137,6 @@ public:
initialize("This module is the QtUnitGui module"); // register with Python
}
~Module() override {}
private:
Py::Object new_UnitTest(const Py::Tuple& args)
{

View File

@@ -96,9 +96,7 @@ UnitTestDialog::UnitTestDialog(QWidget* parent, Qt::WindowFlags f)
/**
* Destroys the object and frees any allocated resources
*/
UnitTestDialog::~UnitTestDialog()
{
}
UnitTestDialog::~UnitTestDialog() = default;
void UnitTestDialog::setupConnections()
{

View File

@@ -60,13 +60,9 @@ void UnitTestDialogPy::init_type()
add_varargs_method("clearUnitTests",&UnitTestDialogPy::clearUnitTests,"clearUnitTests");
}
UnitTestDialogPy::UnitTestDialogPy()
{
}
UnitTestDialogPy::UnitTestDialogPy() = default;
UnitTestDialogPy::~UnitTestDialogPy()
{
}
UnitTestDialogPy::~UnitTestDialogPy() = default;
Py::Object UnitTestDialogPy::repr()
{

View File

@@ -79,8 +79,6 @@ public:
initialize("This module is the Web module."); // register with Python
}
~Module() override {}
private:
Py::Object startServer(const Py::Tuple& args)
{

View File

@@ -51,13 +51,9 @@ void Firewall::setInstance(Firewall* inst)
}
}
Firewall::Firewall()
{
}
Firewall::Firewall() = default;
Firewall::~Firewall()
{
}
Firewall::~Firewall() = default;
bool Firewall::filter(const QByteArray&) const
{
@@ -69,9 +65,7 @@ FirewallPython::FirewallPython(const Py::Object& o)
{
}
FirewallPython::~FirewallPython()
{
}
FirewallPython::~FirewallPython() = default;
bool FirewallPython::filter(const QByteArray& msg) const
{
@@ -96,9 +90,7 @@ ServerEvent::ServerEvent(QTcpSocket* sock, const QByteArray& msg)
{
}
ServerEvent::~ServerEvent()
{
}
ServerEvent::~ServerEvent() = default;
QTcpSocket* ServerEvent::socket() const
{

View File

@@ -78,8 +78,6 @@ public:
initialize("This module is the WebGui module."); // register with Python
}
~Module() override {}
private:
Py::Object openBrowser(const Py::Tuple& args)
{

View File

@@ -126,9 +126,8 @@ UrlWidget::UrlWidget(BrowserView *view) :
setText(QLatin1String("https://"));
hide();
}
UrlWidget::~UrlWidget()
{
}
UrlWidget::~UrlWidget() = default;
void UrlWidget::keyPressEvent(QKeyEvent *keyEvt)
{
@@ -201,9 +200,7 @@ BrowserViewPy::BrowserViewPy(BrowserView* view) : base(view)
{
}
BrowserViewPy::~BrowserViewPy()
{
}
BrowserViewPy::~BrowserViewPy() = default;
BrowserView* BrowserViewPy::getBrowserViewPtr()
{

View File

@@ -39,13 +39,9 @@ using namespace WebGui;
/// @namespace WebGui @class Workbench
TYPESYSTEM_SOURCE(WebGui::Workbench, Gui::StdWorkbench)
Workbench::Workbench()
{
}
Workbench::Workbench() = default;
Workbench::~Workbench()
{
}
Workbench::~Workbench() = default;
void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) const
{