Gui: modernize C++: use equals default

This commit is contained in:
wmayer
2023-08-20 18:12:43 +02:00
parent 3e35b5f606
commit c016f1c1fb
188 changed files with 408 additions and 1124 deletions

View File

@@ -56,8 +56,8 @@ DlgAddProperty::DlgAddProperty(QWidget* parent,
std::vector<Base::Type> types;
Base::Type::getAllDerivedFrom(Base::Type::fromName("App::Property"),types);
std::sort(types.begin(), types.end(), [](Base::Type a, Base::Type b) { return strcmp(a.getName(), b.getName()) < 0; });
std::sort(types.begin(), types.end(), [](Base::Type a, Base::Type b) { return strcmp(a.getName(), b.getName()) < 0; });
for(const auto& type : types) {
ui->comboType->addItem(QString::fromLatin1(type.getName()));
if(type == defType)
@@ -72,10 +72,7 @@ DlgAddProperty::DlgAddProperty(QWidget* parent,
/**
* Destroys the object and frees any allocated resources
*/
DlgAddProperty::~DlgAddProperty()
{
// no need to delete child widgets, Qt does it all for us
}
DlgAddProperty::~DlgAddProperty() = default;
static std::string containerName(const App::PropertyContainer *c) {
auto doc = Base::freecad_dynamic_cast<App::Document>(c);