diff --git a/src/Gui/ActionFunction.cpp b/src/Gui/ActionFunction.cpp index b6beeaf542..5ef70c8448 100644 --- a/src/Gui/ActionFunction.cpp +++ b/src/Gui/ActionFunction.cpp @@ -50,9 +50,7 @@ ActionFunction::ActionFunction(QObject* parent) { } -ActionFunction::~ActionFunction() -{ -} +ActionFunction::~ActionFunction() = default; void ActionFunction::trigger(QAction* action, std::function func) { @@ -135,9 +133,7 @@ TimerFunction::TimerFunction(QObject* parent) d_ptr->autoDelete = false; } -TimerFunction::~TimerFunction() -{ -} +TimerFunction::~TimerFunction() = default; void TimerFunction::setFunction(std::function func) { diff --git a/src/Gui/AutoSaver.cpp b/src/Gui/AutoSaver.cpp index 74086a8ea8..9e89ab081b 100644 --- a/src/Gui/AutoSaver.cpp +++ b/src/Gui/AutoSaver.cpp @@ -66,9 +66,7 @@ AutoSaver::AutoSaver(QObject* parent) //NOLINTEND } -AutoSaver::~AutoSaver() -{ -} +AutoSaver::~AutoSaver() = default; AutoSaver* AutoSaver::instance() { @@ -290,9 +288,7 @@ RecoveryWriter::RecoveryWriter(AutoSaveProperty& saver) { } -RecoveryWriter::~RecoveryWriter() -{ -} +RecoveryWriter::~RecoveryWriter() = default; bool RecoveryWriter::shouldWrite(const std::string& name, const Base::Persistence *object) const { diff --git a/src/Gui/BlenderNavigationStyle.cpp b/src/Gui/BlenderNavigationStyle.cpp index 0ef5bb4e8f..b9f209ba88 100644 --- a/src/Gui/BlenderNavigationStyle.cpp +++ b/src/Gui/BlenderNavigationStyle.cpp @@ -43,9 +43,7 @@ BlenderNavigationStyle::BlenderNavigationStyle() : lockButton1(false) { } -BlenderNavigationStyle::~BlenderNavigationStyle() -{ -} +BlenderNavigationStyle::~BlenderNavigationStyle() = default; const char* BlenderNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/CADNavigationStyle.cpp b/src/Gui/CADNavigationStyle.cpp index 3cd1f7942e..e0dd117231 100644 --- a/src/Gui/CADNavigationStyle.cpp +++ b/src/Gui/CADNavigationStyle.cpp @@ -42,9 +42,7 @@ CADNavigationStyle::CADNavigationStyle() : lockButton1(false) { } -CADNavigationStyle::~CADNavigationStyle() -{ -} +CADNavigationStyle::~CADNavigationStyle() = default; const char* CADNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 517fbef1a5..35f5b9f33f 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -120,9 +120,7 @@ CallTipsList::CallTipsList(QPlainTextEdit* parent) compKeys.append(Qt::Key_BraceRight); } -CallTipsList::~CallTipsList() -{ -} +CallTipsList::~CallTipsList() = default; void CallTipsList::keyboardSearch(const QString& wordPrefix) { diff --git a/src/Gui/ComboView.cpp b/src/Gui/ComboView.cpp index 5ffeb3c1ea..f142d7672f 100644 --- a/src/Gui/ComboView.cpp +++ b/src/Gui/ComboView.cpp @@ -87,9 +87,7 @@ ComboView::ComboView(bool showModel, Gui::Document* pcDocument, QWidget *parent) //tabs->addTab(projectView, tr("Project")); } -ComboView::~ComboView() -{ -} +ComboView::~ComboView() = default; void ComboView::showDialog(Gui::TaskView::TaskDialog *dlg) { diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 29da29c69e..52076fa768 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -228,9 +228,7 @@ Command::Command(const char* name) bCanLog = true; } -Command::~Command() -{ -} +Command::~Command() = default; void Command::setShortcut(const QString &shortcut) { @@ -1118,9 +1116,7 @@ MacroCommand::MacroCommand(const char* name, bool system) sScriptName = nullptr; } -MacroCommand::~MacroCommand() -{ -} +MacroCommand::~MacroCommand() = default; void MacroCommand::activated(int iMsg) { @@ -1787,9 +1783,7 @@ void PythonGroupCommand::onActionInit() const // CommandManager //=========================================================================== -CommandManager::CommandManager() -{ -} +CommandManager::CommandManager() = default; CommandManager::~CommandManager() { diff --git a/src/Gui/CommandActionPy.cpp b/src/Gui/CommandActionPy.cpp index 3ca1a46d04..389f68783c 100644 --- a/src/Gui/CommandActionPy.cpp +++ b/src/Gui/CommandActionPy.cpp @@ -46,9 +46,7 @@ CommandActionPy::CommandActionPy(Py::PythonClassInstance* self, Py::Tuple& args, cmd = Application::Instance->commandManager().getCommandByName(name); } -CommandActionPy::~CommandActionPy() -{ -} +CommandActionPy::~CommandActionPy() = default; Py::Object CommandActionPy::getAction() { diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index 83b2b5ee06..c5d50cb2ac 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -855,7 +855,7 @@ class StdCmdUserEditMode : public Gui::Command { public: StdCmdUserEditMode(); - ~StdCmdUserEditMode() override{} + ~StdCmdUserEditMode() override = default; void languageChange() override; const char* className() const override {return "StdCmdUserEditMode";} void updateIcon(int mode); diff --git a/src/Gui/CommandTest.cpp b/src/Gui/CommandTest.cpp index b2f42206f0..21014a228d 100644 --- a/src/Gui/CommandTest.cpp +++ b/src/Gui/CommandTest.cpp @@ -567,9 +567,7 @@ public: explicit BarThread(unsigned long s) : steps(s) { } - ~BarThread() override - { - } + ~BarThread() override = default; void run() override { QMutex mutex; diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 17b468e0c8..f3e5b0e75c 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -287,7 +287,7 @@ class StdCmdFreezeViews : public Gui::Command { public: StdCmdFreezeViews(); - ~StdCmdFreezeViews() override{} + ~StdCmdFreezeViews() override = default; const char* className() const override { return "StdCmdFreezeViews"; } @@ -636,7 +636,7 @@ class StdCmdDrawStyle : public Gui::Command { public: StdCmdDrawStyle(); - ~StdCmdDrawStyle() override{} + ~StdCmdDrawStyle() override = default; void languageChange() override; const char* className() const override {return "StdCmdDrawStyle";} void updateIcon(const Gui::MDIView* view); diff --git a/src/Gui/Control.cpp b/src/Gui/Control.cpp index 83e1b4084e..47e21cd17b 100644 --- a/src/Gui/Control.cpp +++ b/src/Gui/Control.cpp @@ -54,10 +54,7 @@ ControlSingleton::ControlSingleton() } -ControlSingleton::~ControlSingleton() -{ - -} +ControlSingleton::~ControlSingleton() = default; Gui::TaskView::TaskView* ControlSingleton::taskPanel() const { diff --git a/src/Gui/DAGView/DAGModel.h b/src/Gui/DAGView/DAGModel.h index 624fed7818..eb809b95cb 100644 --- a/src/Gui/DAGView/DAGModel.h +++ b/src/Gui/DAGView/DAGModel.h @@ -84,7 +84,7 @@ namespace Gui void editingFinishedSlot(); private: - Model(){} + Model() = default; //documentObject slots. using Connection = boost::signals2::connection; Connection connectNewObject; diff --git a/src/Gui/DAGView/DAGView.cpp b/src/Gui/DAGView/DAGView.cpp index e4f34a0337..d525bbc9b1 100644 --- a/src/Gui/DAGView/DAGView.cpp +++ b/src/Gui/DAGView/DAGView.cpp @@ -60,9 +60,7 @@ View::View(QWidget* parentIn): QGraphicsView(parentIn) this, &View::awakeSlot); } -View::~View() -{ -} +View::~View() = default; void View::slotActiveDocument(const Document &documentIn) { diff --git a/src/Gui/DAGView/DAGView.h b/src/Gui/DAGView/DAGView.h index 1229bfe32b..9b9ccd75e9 100644 --- a/src/Gui/DAGView/DAGView.h +++ b/src/Gui/DAGView/DAGView.h @@ -67,7 +67,7 @@ namespace Gui Q_OBJECT public: explicit DockWindow(Gui::Document* gDocumentIn = nullptr, QWidget *parent = nullptr); - ~DockWindow() override{} + ~DockWindow() override = default; private: View *dagView; diff --git a/src/Gui/DlgActionsImp.cpp b/src/Gui/DlgActionsImp.cpp index 4031975dc3..ddddeb7d15 100644 --- a/src/Gui/DlgActionsImp.cpp +++ b/src/Gui/DlgActionsImp.cpp @@ -564,9 +564,7 @@ IconFolders::IconFolders(const QStringList& paths, QWidget* parent) addButton->setDisabled(true); } -IconFolders::~IconFolders() -{ -} +IconFolders::~IconFolders() = default; void IconFolders::addFolder() { diff --git a/src/Gui/DlgAddProperty.cpp b/src/Gui/DlgAddProperty.cpp index 40ab59df9d..088d9f2372 100644 --- a/src/Gui/DlgAddProperty.cpp +++ b/src/Gui/DlgAddProperty.cpp @@ -56,8 +56,8 @@ DlgAddProperty::DlgAddProperty(QWidget* parent, std::vector 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(c); diff --git a/src/Gui/DlgCreateNewPreferencePackImp.cpp b/src/Gui/DlgCreateNewPreferencePackImp.cpp index f02535c21a..af7f586c2e 100644 --- a/src/Gui/DlgCreateNewPreferencePackImp.cpp +++ b/src/Gui/DlgCreateNewPreferencePackImp.cpp @@ -57,9 +57,7 @@ DlgCreateNewPreferencePackImp::DlgCreateNewPreferencePackImp(QWidget* parent) } -DlgCreateNewPreferencePackImp::~DlgCreateNewPreferencePackImp() -{ -} +DlgCreateNewPreferencePackImp::~DlgCreateNewPreferencePackImp() = default; void DlgCreateNewPreferencePackImp::setPreferencePackTemplates(const std::vector& availableTemplates) { diff --git a/src/Gui/DlgCustomizeImp.cpp b/src/Gui/DlgCustomizeImp.cpp index 516ee8466f..c1109d25c5 100644 --- a/src/Gui/DlgCustomizeImp.cpp +++ b/src/Gui/DlgCustomizeImp.cpp @@ -104,10 +104,7 @@ DlgCustomizeImp::DlgCustomizeImp(QWidget* parent, Qt::WindowFlags fl) /** * Destroys the object and frees any allocated resources */ -DlgCustomizeImp::~DlgCustomizeImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgCustomizeImp::~DlgCustomizeImp() = default; /** * Adds a customize page with its class name \a className. diff --git a/src/Gui/DlgCustomizeSpNavSettings.cpp b/src/Gui/DlgCustomizeSpNavSettings.cpp index 78a42a6106..441ef48ea6 100644 --- a/src/Gui/DlgCustomizeSpNavSettings.cpp +++ b/src/Gui/DlgCustomizeSpNavSettings.cpp @@ -51,9 +51,7 @@ DlgCustomizeSpNavSettings::DlgCustomizeSpNavSettings(QWidget *parent) : initialize(); } -DlgCustomizeSpNavSettings::~DlgCustomizeSpNavSettings() -{ -} +DlgCustomizeSpNavSettings::~DlgCustomizeSpNavSettings() = default; void DlgCustomizeSpNavSettings::setupConnections() { diff --git a/src/Gui/DlgCustomizeSpaceball.cpp b/src/Gui/DlgCustomizeSpaceball.cpp index d650d625d0..aa4a00cca6 100644 --- a/src/Gui/DlgCustomizeSpaceball.cpp +++ b/src/Gui/DlgCustomizeSpaceball.cpp @@ -690,10 +690,7 @@ DlgCustomizeSpaceball::DlgCustomizeSpaceball(QWidget *parent) connect(printReference, &QPushButton::clicked, this, &DlgCustomizeSpaceball::goPrint); } -DlgCustomizeSpaceball::~DlgCustomizeSpaceball() -{ - -} +DlgCustomizeSpaceball::~DlgCustomizeSpaceball() = default; void DlgCustomizeSpaceball::setMessage(const QString& message) { diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index 87143ca0cd..07957396e1 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -632,10 +632,7 @@ TaskDisplayProperties::TaskDisplayProperties() Content.push_back(taskbox); } -TaskDisplayProperties::~TaskDisplayProperties() -{ - // automatically deleted in the sub-class -} +TaskDisplayProperties::~TaskDisplayProperties() = default; QDialogButtonBox::StandardButtons TaskDisplayProperties::getStandardButtons() const { diff --git a/src/Gui/DlgEditFileIncludePropertyExternal.cpp b/src/Gui/DlgEditFileIncludePropertyExternal.cpp index 82cdb62c7e..f273a21611 100644 --- a/src/Gui/DlgEditFileIncludePropertyExternal.cpp +++ b/src/Gui/DlgEditFileIncludePropertyExternal.cpp @@ -49,11 +49,7 @@ DlgEditFileIncludePropertyExternal(App::PropertyFileIncluded& Prop, /** * Destroys the object and frees any allocated resources */ -DlgEditFileIncludePropertyExternal::~DlgEditFileIncludePropertyExternal() -{ - // no need to delete child widgets, Qt does it all for us -} - +DlgEditFileIncludePropertyExternal::~DlgEditFileIncludePropertyExternal() = default; int DlgEditFileIncludePropertyExternal::processFile() { diff --git a/src/Gui/DlgInputDialogImp.cpp b/src/Gui/DlgInputDialogImp.cpp index 3941b0f271..5f70de8a6c 100644 --- a/src/Gui/DlgInputDialogImp.cpp +++ b/src/Gui/DlgInputDialogImp.cpp @@ -61,10 +61,7 @@ DlgInputDialogImp::DlgInputDialogImp( const QString& labelTxt, QWidget* parent, /** * Destroys the object and frees any allocated resources */ -DlgInputDialogImp::~DlgInputDialogImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgInputDialogImp::~DlgInputDialogImp() = default; void DlgInputDialogImp::textChanged( const QString &s ) { diff --git a/src/Gui/DlgKeyboardImp.cpp b/src/Gui/DlgKeyboardImp.cpp index f5f81e174a..08f0381c34 100644 --- a/src/Gui/DlgKeyboardImp.cpp +++ b/src/Gui/DlgKeyboardImp.cpp @@ -111,9 +111,7 @@ DlgCustomKeyboardImp::DlgCustomKeyboardImp( QWidget* parent ) } /** Destroys the object and frees any allocated resources */ -DlgCustomKeyboardImp::~DlgCustomKeyboardImp() -{ -} +DlgCustomKeyboardImp::~DlgCustomKeyboardImp() = default; void DlgCustomKeyboardImp::setupConnections() { diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index a6b258d67e..640addab09 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -58,7 +58,7 @@ namespace Gui { : QTreeWidgetItem(widget), systemWide(systemwide){} - ~MacroItem() override{} + ~MacroItem() override = default; bool systemWide; }; @@ -104,10 +104,7 @@ DlgMacroExecuteImp::DlgMacroExecuteImp( QWidget* parent, Qt::WindowFlags fl ) /** * Destroys the object and frees any allocated resources */ -DlgMacroExecuteImp::~DlgMacroExecuteImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgMacroExecuteImp::~DlgMacroExecuteImp() = default; void DlgMacroExecuteImp::setupConnections() { diff --git a/src/Gui/DlgMacroRecordImp.cpp b/src/Gui/DlgMacroRecordImp.cpp index 9afc0d7322..0796749b16 100644 --- a/src/Gui/DlgMacroRecordImp.cpp +++ b/src/Gui/DlgMacroRecordImp.cpp @@ -73,10 +73,7 @@ DlgMacroRecordImp::DlgMacroRecordImp( QWidget* parent, Qt::WindowFlags fl ) /** * Destroys the object and frees any allocated resources */ -DlgMacroRecordImp::~DlgMacroRecordImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgMacroRecordImp::~DlgMacroRecordImp() = default; void DlgMacroRecordImp::setupConnections() { diff --git a/src/Gui/DlgMaterialPropertiesImp.cpp b/src/Gui/DlgMaterialPropertiesImp.cpp index 08331a4261..27448e50c1 100644 --- a/src/Gui/DlgMaterialPropertiesImp.cpp +++ b/src/Gui/DlgMaterialPropertiesImp.cpp @@ -64,9 +64,7 @@ DlgMaterialPropertiesImp::DlgMaterialPropertiesImp(const std::string& mat, QWidg /** * Destroys the object and frees any allocated resources */ -DlgMaterialPropertiesImp::~DlgMaterialPropertiesImp() -{ -} +DlgMaterialPropertiesImp::~DlgMaterialPropertiesImp() = default; void DlgMaterialPropertiesImp::setupConnections() { diff --git a/src/Gui/DlgOnlineHelpImp.cpp b/src/Gui/DlgOnlineHelpImp.cpp index aa3749c0a6..a16cf2ec1e 100644 --- a/src/Gui/DlgOnlineHelpImp.cpp +++ b/src/Gui/DlgOnlineHelpImp.cpp @@ -58,9 +58,7 @@ DlgOnlineHelpImp::DlgOnlineHelpImp( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgOnlineHelpImp::~DlgOnlineHelpImp() -{ -} +DlgOnlineHelpImp::~DlgOnlineHelpImp() = default; /** * Returns the start page for the HelpView. If none is defined the default diff --git a/src/Gui/DlgParameterImp.cpp b/src/Gui/DlgParameterImp.cpp index 8df3dda0e1..1105d2afb7 100644 --- a/src/Gui/DlgParameterImp.cpp +++ b/src/Gui/DlgParameterImp.cpp @@ -479,9 +479,7 @@ ParameterGroup::ParameterGroup( QWidget * parent ) menuEdit->setDefaultAction(expandAct); } -ParameterGroup::~ParameterGroup() -{ -} +ParameterGroup::~ParameterGroup() = default; void ParameterGroup::contextMenuEvent ( QContextMenuEvent* event ) { @@ -680,9 +678,7 @@ ParameterValue::ParameterValue( QWidget * parent ) this, qOverload(&ParameterValue::onChangeSelectedItem)); } -ParameterValue::~ParameterValue() -{ -} +ParameterValue::~ParameterValue() = default; void ParameterValue::setCurrentGroup( const Base::Reference& hGrp ) { @@ -1020,9 +1016,7 @@ ParameterValueItem::ParameterValueItem ( QTreeWidget* parent, const Base::Refere setFlags(flags() | Qt::ItemIsEditable); } -ParameterValueItem::~ParameterValueItem() -{ -} +ParameterValueItem::~ParameterValueItem() = default; void ParameterValueItem::setData ( int column, int role, const QVariant & value ) { @@ -1052,9 +1046,7 @@ ParameterText::ParameterText ( QTreeWidget * parent, QString label, const char* setText(2, QString::fromUtf8(value)); } -ParameterText::~ParameterText() -{ -} +ParameterText::~ParameterText() = default; void ParameterText::changeValue() { @@ -1096,9 +1088,7 @@ ParameterInt::ParameterInt ( QTreeWidget * parent, QString label, long value, co setText(2, QString::fromLatin1("%1").arg(value)); } -ParameterInt::~ParameterInt() -{ -} +ParameterInt::~ParameterInt() = default; void ParameterInt::changeValue() { @@ -1140,9 +1130,7 @@ ParameterUInt::ParameterUInt ( QTreeWidget * parent, QString label, unsigned lon setText(2, QString::fromLatin1("%1").arg(value)); } -ParameterUInt::~ParameterUInt() -{ -} +ParameterUInt::~ParameterUInt() = default; void ParameterUInt::changeValue() { @@ -1193,9 +1181,7 @@ ParameterFloat::ParameterFloat ( QTreeWidget * parent, QString label, double val setText(2, QString::fromLatin1("%1").arg(value)); } -ParameterFloat::~ParameterFloat() -{ -} +ParameterFloat::~ParameterFloat() = default; void ParameterFloat::changeValue() { @@ -1237,9 +1223,7 @@ ParameterBool::ParameterBool ( QTreeWidget * parent, QString label, bool value, setText(2, QString::fromLatin1((value ? "true" : "false"))); } -ParameterBool::~ParameterBool() -{ -} +ParameterBool::~ParameterBool() = default; void ParameterBool::changeValue() { diff --git a/src/Gui/DlgPreferencePackManagementImp.cpp b/src/Gui/DlgPreferencePackManagementImp.cpp index b956965e79..a1a0dad41a 100644 --- a/src/Gui/DlgPreferencePackManagementImp.cpp +++ b/src/Gui/DlgPreferencePackManagementImp.cpp @@ -212,9 +212,7 @@ void DlgPreferencePackManagementImp::showAddonManager() close(); } -DlgPreferencePackManagementImp::~DlgPreferencePackManagementImp() -{ -} +DlgPreferencePackManagementImp::~DlgPreferencePackManagementImp() = default; diff --git a/src/Gui/DlgProjectUtility.cpp b/src/Gui/DlgProjectUtility.cpp index 15a6759ef8..c9877786b9 100644 --- a/src/Gui/DlgProjectUtility.cpp +++ b/src/Gui/DlgProjectUtility.cpp @@ -53,9 +53,7 @@ DlgProjectUtility::DlgProjectUtility(QWidget* parent, Qt::WindowFlags fl) /** * Destroys the object and frees any allocated resources */ -DlgProjectUtility::~DlgProjectUtility() -{ -} +DlgProjectUtility::~DlgProjectUtility() = default; void DlgProjectUtility::extractButton() { diff --git a/src/Gui/DlgRevertToBackupConfigImp.cpp b/src/Gui/DlgRevertToBackupConfigImp.cpp index 4cbb3f76ff..c61d23f077 100644 --- a/src/Gui/DlgRevertToBackupConfigImp.cpp +++ b/src/Gui/DlgRevertToBackupConfigImp.cpp @@ -46,9 +46,7 @@ DlgRevertToBackupConfigImp::DlgRevertToBackupConfigImp(QWidget* parent) connect(ui->listWidget, &QListWidget::itemSelectionChanged, this, &DlgRevertToBackupConfigImp::onItemSelectionChanged); } -DlgRevertToBackupConfigImp::~DlgRevertToBackupConfigImp() -{ -} +DlgRevertToBackupConfigImp::~DlgRevertToBackupConfigImp() = default; void Gui::Dialog::DlgRevertToBackupConfigImp::onItemSelectionChanged() { diff --git a/src/Gui/DlgRunExternal.cpp b/src/Gui/DlgRunExternal.cpp index b54b81dee7..39d831dbb8 100644 --- a/src/Gui/DlgRunExternal.cpp +++ b/src/Gui/DlgRunExternal.cpp @@ -63,9 +63,7 @@ DlgRunExternal::DlgRunExternal( QWidget* parent, Qt::WindowFlags fl ) /** * Destroys the object and frees any allocated resources */ -DlgRunExternal::~DlgRunExternal() -{ -} +DlgRunExternal::~DlgRunExternal() = default; void DlgRunExternal::addArgument(const QString& arg) { diff --git a/src/Gui/DlgSettingsColorGradientImp.cpp b/src/Gui/DlgSettingsColorGradientImp.cpp index 97ef8a1aea..d062cac461 100644 --- a/src/Gui/DlgSettingsColorGradientImp.cpp +++ b/src/Gui/DlgSettingsColorGradientImp.cpp @@ -77,10 +77,7 @@ DlgSettingsColorGradientImp::DlgSettingsColorGradientImp(const App::ColorGradien /** * Destroys the object and frees any allocated resources */ -DlgSettingsColorGradientImp::~DlgSettingsColorGradientImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettingsColorGradientImp::~DlgSettingsColorGradientImp() = default; void DlgSettingsColorGradientImp::setupConnections() { diff --git a/src/Gui/DlgSettingsImageImp.cpp b/src/Gui/DlgSettingsImageImp.cpp index 09b0579e4d..4d4da8b2b5 100644 --- a/src/Gui/DlgSettingsImageImp.cpp +++ b/src/Gui/DlgSettingsImageImp.cpp @@ -63,10 +63,7 @@ DlgSettingsImageImp::DlgSettingsImageImp( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsImageImp::~DlgSettingsImageImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettingsImageImp::~DlgSettingsImageImp() = default; void DlgSettingsImageImp::setupConnections() { diff --git a/src/Gui/DlgToolbarsImp.cpp b/src/Gui/DlgToolbarsImp.cpp index b597af5a97..703030d8ca 100644 --- a/src/Gui/DlgToolbarsImp.cpp +++ b/src/Gui/DlgToolbarsImp.cpp @@ -113,9 +113,7 @@ DlgCustomToolbars::DlgCustomToolbars(DlgCustomToolbars::Type t, QWidget* parent) } /** Destroys the object and frees any allocated resources */ -DlgCustomToolbars::~DlgCustomToolbars() -{ -} +DlgCustomToolbars::~DlgCustomToolbars() = default; void DlgCustomToolbars::setupConnections() { @@ -578,9 +576,7 @@ DlgCustomToolbarsImp::DlgCustomToolbarsImp( QWidget* parent ) } /** Destroys the object and frees any allocated resources */ -DlgCustomToolbarsImp::~DlgCustomToolbarsImp() -{ -} +DlgCustomToolbarsImp::~DlgCustomToolbarsImp() = default; void DlgCustomToolbarsImp::addCustomToolbar(const QString& name) { @@ -845,9 +841,7 @@ DlgCustomToolBoxbarsImp::DlgCustomToolBoxbarsImp( QWidget* parent ) } /** Destroys the object and frees any allocated resources */ -DlgCustomToolBoxbarsImp::~DlgCustomToolBoxbarsImp() -{ -} +DlgCustomToolBoxbarsImp::~DlgCustomToolBoxbarsImp() = default; void DlgCustomToolBoxbarsImp::changeEvent(QEvent *e) { diff --git a/src/Gui/DlgUndoRedo.cpp b/src/Gui/DlgUndoRedo.cpp index fd77f2b00b..64190bcc13 100644 --- a/src/Gui/DlgUndoRedo.cpp +++ b/src/Gui/DlgUndoRedo.cpp @@ -50,10 +50,7 @@ UndoDialog::UndoDialog( QWidget* parent ) /** * Destroys the object and frees any allocated resources. */ -UndoDialog::~UndoDialog() -{ - // no need to delete child widgets, Qt does it all for us -} +UndoDialog::~UndoDialog() = default; /** * This method fetches the undo / redo information from the @@ -99,10 +96,7 @@ RedoDialog::RedoDialog( QWidget* parent ) /** * Destroys the object and frees any allocated resources. */ -RedoDialog::~RedoDialog() -{ - // no need to delete child widgets, Qt does it all for us -} +RedoDialog::~RedoDialog() = default; /** * This method fetches the undo / redo information from the diff --git a/src/Gui/DlgUnitsCalculatorImp.cpp b/src/Gui/DlgUnitsCalculatorImp.cpp index a215f98fab..ad36fa1ab6 100644 --- a/src/Gui/DlgUnitsCalculatorImp.cpp +++ b/src/Gui/DlgUnitsCalculatorImp.cpp @@ -134,9 +134,7 @@ DlgUnitsCalculator::DlgUnitsCalculator( QWidget* parent, Qt::WindowFlags fl ) } /** Destroys the object and frees any allocated resources */ -DlgUnitsCalculator::~DlgUnitsCalculator() -{ -} +DlgUnitsCalculator::~DlgUnitsCalculator() = default; void DlgUnitsCalculator::accept() { diff --git a/src/Gui/DockWindow.cpp b/src/Gui/DockWindow.cpp index 74885d8518..39ad26427d 100644 --- a/src/Gui/DockWindow.cpp +++ b/src/Gui/DockWindow.cpp @@ -32,8 +32,6 @@ DockWindow::DockWindow( Gui::Document* pcDocument, QWidget *parent) { } -DockWindow::~DockWindow() -{ -} +DockWindow::~DockWindow() = default; #include "moc_DockWindow.cpp" diff --git a/src/Gui/DockWindowManager.cpp b/src/Gui/DockWindowManager.cpp index cb62a615de..e7864e0da1 100644 --- a/src/Gui/DockWindowManager.cpp +++ b/src/Gui/DockWindowManager.cpp @@ -37,13 +37,9 @@ using namespace Gui; -DockWindowItems::DockWindowItems() -{ -} +DockWindowItems::DockWindowItems() = default; -DockWindowItems::~DockWindowItems() -{ -} +DockWindowItems::~DockWindowItems() = default; void DockWindowItems::addDockWidget(const char* name, Qt::DockWidgetArea pos, bool visibility, bool tabbed) { diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index 2020f5741a..afbe60169b 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -116,7 +116,7 @@ namespace Gui { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - ApplicationIndex(){} + ApplicationIndex() = default; int findChild(const Gui::Document& d) const; Qt::ItemFlags flags() const override; QVariant data(int role) const override; diff --git a/src/Gui/DocumentObserver.cpp b/src/Gui/DocumentObserver.cpp index 2d12579ea7..90d8168f2c 100644 --- a/src/Gui/DocumentObserver.cpp +++ b/src/Gui/DocumentObserver.cpp @@ -40,9 +40,7 @@ using namespace Gui; namespace sp = std::placeholders; -DocumentT::DocumentT() -{ -} +DocumentT::DocumentT() = default; DocumentT::DocumentT(Document* doc) { @@ -59,9 +57,7 @@ DocumentT::DocumentT(const DocumentT& doc) document = doc.document; } -DocumentT::~DocumentT() -{ -} +DocumentT::~DocumentT() = default; void DocumentT::operator=(const DocumentT& doc) { @@ -122,9 +118,7 @@ std::string DocumentT::getAppDocumentPython() const // ----------------------------------------------------------------------------- -ViewProviderT::ViewProviderT() -{ -} +ViewProviderT::ViewProviderT() = default; ViewProviderT::ViewProviderT(const ViewProviderT& other) { @@ -141,9 +135,7 @@ ViewProviderT::ViewProviderT(const ViewProviderDocumentObject* obj) *this = obj; } -ViewProviderT::~ViewProviderT() -{ -} +ViewProviderT::~ViewProviderT() = default; ViewProviderT & ViewProviderT::operator=(const ViewProviderT& obj) { @@ -266,9 +258,7 @@ DocumentWeakPtrT::DocumentWeakPtrT(Gui::Document* doc) noexcept { } -DocumentWeakPtrT::~DocumentWeakPtrT() -{ -} +DocumentWeakPtrT::~DocumentWeakPtrT() = default; void DocumentWeakPtrT::reset() noexcept { @@ -360,10 +350,7 @@ ViewProviderWeakPtrT::ViewProviderWeakPtrT(ViewProviderDocumentObject* obj) { } -ViewProviderWeakPtrT::~ViewProviderWeakPtrT() -{ - -} +ViewProviderWeakPtrT::~ViewProviderWeakPtrT() = default; ViewProviderDocumentObject* ViewProviderWeakPtrT::_get() const noexcept { @@ -409,18 +396,14 @@ bool ViewProviderWeakPtrT::operator!= (const ViewProviderWeakPtrT& p) const noex // ----------------------------------------------------------------------------- -DocumentObserver::DocumentObserver() -{ -} +DocumentObserver::DocumentObserver() = default; DocumentObserver::DocumentObserver(Document* doc) { attachDocument(doc); } -DocumentObserver::~DocumentObserver() -{ -} +DocumentObserver::~DocumentObserver() = default; void DocumentObserver::attachDocument(Document* doc) { diff --git a/src/Gui/DocumentObserver.h b/src/Gui/DocumentObserver.h index cc25e73c2e..a3400b23d3 100644 --- a/src/Gui/DocumentObserver.h +++ b/src/Gui/DocumentObserver.h @@ -240,8 +240,7 @@ class WeakPtrT public: explicit WeakPtrT(T* t) : ptr(t) { } - ~WeakPtrT() { - } + ~WeakPtrT() = default; /*! * \brief reset diff --git a/src/Gui/DocumentObserverPython.cpp b/src/Gui/DocumentObserverPython.cpp index 8bb41a7abe..c50e547bb4 100644 --- a/src/Gui/DocumentObserverPython.cpp +++ b/src/Gui/DocumentObserverPython.cpp @@ -89,9 +89,7 @@ DocumentObserverPython::DocumentObserverPython(const Py::Object& obj) : inst(obj //NOLINTEND } -DocumentObserverPython::~DocumentObserverPython() -{ -} +DocumentObserverPython::~DocumentObserverPython() = default; void DocumentObserverPython::slotCreatedDocument(const Gui::Document& Doc) { diff --git a/src/Gui/DocumentRecovery.cpp b/src/Gui/DocumentRecovery.cpp index 2d64df6d05..6ebfd10358 100644 --- a/src/Gui/DocumentRecovery.cpp +++ b/src/Gui/DocumentRecovery.cpp @@ -200,9 +200,7 @@ DocumentRecovery::DocumentRecovery(const QList& dirs, QWidget* parent this->adjustSize(); } -DocumentRecovery::~DocumentRecovery() -{ -} +DocumentRecovery::~DocumentRecovery() = default; bool DocumentRecovery::foundDocuments() const { diff --git a/src/Gui/EditorView.cpp b/src/Gui/EditorView.cpp index 89db2b611a..3fc09cf801 100644 --- a/src/Gui/EditorView.cpp +++ b/src/Gui/EditorView.cpp @@ -598,9 +598,7 @@ PythonEditorView::PythonEditorView(PythonEditor* editor, QWidget* parent) editor, &PythonEditor::setFileName); } -PythonEditorView::~PythonEditorView() -{ -} +PythonEditorView::~PythonEditorView() = default; /** * Runs the action specified by \a pMsg. diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index e1c0f20fa5..72472fada9 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -53,9 +53,7 @@ ExpressionBinding::ExpressionBinding() } -ExpressionBinding::~ExpressionBinding() -{ -} +ExpressionBinding::~ExpressionBinding() = default; bool ExpressionBinding::isBound() const { diff --git a/src/Gui/ExpressionBindingPy.cpp b/src/Gui/ExpressionBindingPy.cpp index 548f1e7050..36938d469e 100644 --- a/src/Gui/ExpressionBindingPy.cpp +++ b/src/Gui/ExpressionBindingPy.cpp @@ -51,9 +51,7 @@ ExpressionBindingPy::ExpressionBindingPy(Py::PythonClassInstance* self, Py::Tupl } } -ExpressionBindingPy::~ExpressionBindingPy() -{ -} +ExpressionBindingPy::~ExpressionBindingPy() = default; ExpressionBinding* ExpressionBindingPy::asBinding(QWidget* obj) { diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index 0a23c859ba..d340197489 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -80,9 +80,7 @@ FileDialog::FileDialog(QWidget * parent) connect(this, &QFileDialog::filterSelected, this, &FileDialog::onSelectedFilter); } -FileDialog::~FileDialog() -{ -} +FileDialog::~FileDialog() = default; void FileDialog::onSelectedFilter(const QString& /*filter*/) { @@ -455,9 +453,7 @@ FileOptionsDialog::FileOptionsDialog( QWidget* parent, Qt::WindowFlags fl ) connect(extensionButton, &QPushButton::clicked, this, &FileOptionsDialog::toggleExtension); } -FileOptionsDialog::~FileOptionsDialog() -{ -} +FileOptionsDialog::~FileOptionsDialog() = default; void FileOptionsDialog::accept() { @@ -584,13 +580,9 @@ QWidget* FileOptionsDialog::getOptionsWidget() const /** * Constructs an empty file icon provider called \a name, with the parent \a parent. */ -FileIconProvider::FileIconProvider() -{ -} +FileIconProvider::FileIconProvider() = default; -FileIconProvider::~FileIconProvider() -{ -} +FileIconProvider::~FileIconProvider() = default; QIcon FileIconProvider::icon(IconType type) const { @@ -691,9 +683,7 @@ FileChooser::FileChooser ( QWidget * parent ) setFocusProxy(lineEdit); } -FileChooser::~FileChooser() -{ -} +FileChooser::~FileChooser() = default; void FileChooser::resizeEvent(QResizeEvent* e) { @@ -916,9 +906,7 @@ SelectModule::SelectModule (const QString& type, const SelectModule::Dict& types #endif } -SelectModule::~SelectModule() -{ -} +SelectModule::~SelectModule() = default; void SelectModule::accept() { diff --git a/src/Gui/Flag.cpp b/src/Gui/Flag.cpp index b741a0db63..5d1fcde8fe 100644 --- a/src/Gui/Flag.cpp +++ b/src/Gui/Flag.cpp @@ -49,9 +49,7 @@ Flag::Flag(QWidget* parent) setAutoFillBackground(true); } -Flag::~Flag() -{ -} +Flag::~Flag() = default; void Flag::initializeGL() { diff --git a/src/Gui/GLPainter.cpp b/src/Gui/GLPainter.cpp index 934931b14d..4844d64424 100644 --- a/src/Gui/GLPainter.cpp +++ b/src/Gui/GLPainter.cpp @@ -234,9 +234,7 @@ Rubberband::Rubberband() : viewer(nullptr) rgb_a = 1.0f; } -Rubberband::~Rubberband() -{ -} +Rubberband::~Rubberband() = default; void Rubberband::setWorking(bool on) { @@ -340,9 +338,7 @@ Polyline::Polyline() : viewer(nullptr) rgb_a = 1.0f; } -Polyline::~Polyline() -{ -} +Polyline::~Polyline() = default; void Polyline::setWorking(bool on) { diff --git a/src/Gui/GLPainter.h b/src/Gui/GLPainter.h index f6b3307eed..28a2294fb2 100644 --- a/src/Gui/GLPainter.h +++ b/src/Gui/GLPainter.h @@ -88,12 +88,8 @@ class GuiExport GLGraphicsItem : public Base::BaseClass TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - GLGraphicsItem() - { - } - ~GLGraphicsItem() override - { - } + GLGraphicsItem() = default; + ~GLGraphicsItem() override = default; virtual void paintGL() = 0; }; diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index 70e87f80a2..d8a362f276 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -94,7 +94,7 @@ class NS::Event : public sc::event { public: Event():inventor_event(nullptr), modifiers{}, flags(new Flags){} - virtual ~Event(){} + virtual ~Event() = default; void log() const { if (isPress(1)) @@ -245,7 +245,7 @@ public: if (ns.logging) Base::Console().Log(" -> IdleState\n"); } - virtual ~IdleState(){} + virtual ~IdleState() = default; sc::result react(const NS::Event& ev){ auto &ns = this->outermost_context().ns; @@ -494,7 +494,7 @@ public: if (ns.logging) Base::Console().Log(" -> RotateState\n"); } - virtual ~RotateState(){} + virtual ~RotateState() = default; sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -539,7 +539,7 @@ public: this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); ns.pan(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } - virtual ~PanState(){} + virtual ~PanState() = default; sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -631,7 +631,7 @@ public: Base::Console().Log(" -> TiltState\n"); ns.pan(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } - virtual ~TiltState(){} + virtual ~TiltState() = default; sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -759,7 +759,7 @@ public: if (ns.logging) Base::Console().Log(" -> AwaitingReleaseState\n"); } - virtual ~AwaitingReleaseState(){} + virtual ~AwaitingReleaseState() = default; sc::result react(const NS::Event& ev){ auto &ns = this->outermost_context().ns; @@ -810,7 +810,7 @@ public: if (ns.logging) Base::Console().Log(" -> InteractState\n"); } - virtual ~InteractState(){} + virtual ~InteractState() = default; sc::result react(const NS::Event& ev){ if(ev.isMouseButtonEvent()){ @@ -842,10 +842,7 @@ GestureNavigationStyle::GestureNavigationStyle() } -GestureNavigationStyle::~GestureNavigationStyle() -{ - -} +GestureNavigationStyle::~GestureNavigationStyle() = default; const char* GestureNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/GuiApplication.cpp b/src/Gui/GuiApplication.cpp index a0f27370a8..c297826795 100644 --- a/src/Gui/GuiApplication.cpp +++ b/src/Gui/GuiApplication.cpp @@ -66,9 +66,7 @@ GUIApplication::GUIApplication(int & argc, char ** argv) #endif } -GUIApplication::~GUIApplication() -{ -} +GUIApplication::~GUIApplication() = default; bool GUIApplication::notify (QObject * receiver, QEvent * event) { @@ -234,9 +232,7 @@ GUISingleApplication::GUISingleApplication(int & argc, char ** argv) connect(d_ptr->timer, &QTimer::timeout, this, &GUISingleApplication::processMessages); } -GUISingleApplication::~GUISingleApplication() -{ -} +GUISingleApplication::~GUISingleApplication() = default; bool GUISingleApplication::isRunning() const { diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 981307e17f..3c2bdec531 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -54,9 +54,7 @@ Gui::GUIApplicationNativeEventAware::GUIApplicationNativeEventAware(int &argc, c #endif } -Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() -{ -} +Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() = default; void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window) { diff --git a/src/Gui/GuiConsole.cpp b/src/Gui/GuiConsole.cpp index 9516980443..d9f073d3d3 100644 --- a/src/Gui/GuiConsole.cpp +++ b/src/Gui/GuiConsole.cpp @@ -119,8 +119,8 @@ void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg #else /* FC_OS_LINUX */ // safely ignore GUIConsole::s_nMaxLines and GUIConsole::s_nRefCount -GUIConsole::GUIConsole () {} -GUIConsole::~GUIConsole () {} +GUIConsole::GUIConsole () = default; +GUIConsole::~GUIConsole () = default; void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) { diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index d97eb9f8c8..ae2641cb45 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -103,9 +103,7 @@ InputField::InputField(QWidget * parent) connect(this, &QLineEdit::textChanged, this, &InputField::newInput); } -InputField::~InputField() -{ -} +InputField::~InputField() = default; void InputField::bind(const App::ObjectIdentifier &_path) { @@ -765,9 +763,7 @@ InputValidator::InputValidator(InputField* parent) : QValidator(parent), dptr(pa { } -InputValidator::~InputValidator() -{ -} +InputValidator::~InputValidator() = default; void InputValidator::fixup(QString& input) const { diff --git a/src/Gui/InputVector.cpp b/src/Gui/InputVector.cpp index 6e0ca90baf..9220a23df2 100644 --- a/src/Gui/InputVector.cpp +++ b/src/Gui/InputVector.cpp @@ -79,9 +79,7 @@ LocationWidget::LocationWidget (QWidget * parent) retranslateUi(); } -LocationWidget::~LocationWidget() -{ -} +LocationWidget::~LocationWidget() = default; QSize LocationWidget::sizeHint() const { @@ -227,9 +225,7 @@ LocationDialog::LocationDialog(QWidget* parent, Qt::WindowFlags fl) { } -LocationDialog::~LocationDialog() -{ -} +LocationDialog::~LocationDialog() = default; Base::Vector3d LocationDialog::getUserDirection(bool* ok) const { @@ -260,10 +256,7 @@ void LocationDialog::onDirectionActivated(int index) // ----------------------------------------------------------- -LocationDialogUiImp::~LocationDialogUiImp() -{ - // no need to delete child widgets, Qt does it all for us -} +LocationDialogUiImp::~LocationDialogUiImp() = default; Base::Vector3d LocationDialogUiImp::getDirection() const { diff --git a/src/Gui/InputVector.h b/src/Gui/InputVector.h index 444898d67b..89dc54c3fc 100644 --- a/src/Gui/InputVector.h +++ b/src/Gui/InputVector.h @@ -118,7 +118,7 @@ public: this->setupUi(this); this->retranslate(); } - ~LocationDialogUi() override{} + ~LocationDialogUi() override = default; void retranslate() { @@ -247,9 +247,7 @@ public: this->setupUi(dlg); this->retranslate(dlg); } - ~LocationUi() - { - } + ~LocationUi() = default; void retranslate(QDialog *dlg) { @@ -367,10 +365,7 @@ public: : LocationDialog(parent, fl), ui(this) { } - ~LocationDialogImp() override - { - // no need to delete child widgets, Qt does it all for us - } + ~LocationDialogImp() override = default; Base::Vector3d getDirection() const override { @@ -428,9 +423,7 @@ public: LocationImpUi(Ui* ui) : ui(ui) { } - ~LocationImpUi() override - { - } + ~LocationImpUi() override = default; boost::any get() override { diff --git a/src/Gui/Inventor/SmSwitchboard.cpp b/src/Gui/Inventor/SmSwitchboard.cpp index 28df7e10a0..fee7674f14 100644 --- a/src/Gui/Inventor/SmSwitchboard.cpp +++ b/src/Gui/Inventor/SmSwitchboard.cpp @@ -113,9 +113,7 @@ SmSwitchboard::SmSwitchboard(int numchildren) /*! Destructor. */ -SmSwitchboard::~SmSwitchboard() // virtual, protected -{ -} +SmSwitchboard::~SmSwitchboard() = default;// virtual, protected // Documented in superclass. void diff --git a/src/Gui/Inventor/SoAutoZoomTranslation.h b/src/Gui/Inventor/SoAutoZoomTranslation.h index 1bd5c290de..34d033a2b4 100644 --- a/src/Gui/Inventor/SoAutoZoomTranslation.h +++ b/src/Gui/Inventor/SoAutoZoomTranslation.h @@ -42,7 +42,7 @@ public: SoSFFloat scaleFactor; protected: - ~SoAutoZoomTranslation() override {} + ~SoAutoZoomTranslation() override = default; void doAction(SoAction * action) override; void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; void getMatrix(SoGetMatrixAction * action) override; diff --git a/src/Gui/Inventor/SoDrawingGrid.h b/src/Gui/Inventor/SoDrawingGrid.h index 8b625cea19..7a53d09d83 100644 --- a/src/Gui/Inventor/SoDrawingGrid.h +++ b/src/Gui/Inventor/SoDrawingGrid.h @@ -48,7 +48,7 @@ public: private: void renderGrid(SoGLRenderAction *action); // Force using the reference count mechanism. - ~SoDrawingGrid() override {} + ~SoDrawingGrid() override = default; }; } // namespace Inventor diff --git a/src/Gui/InventorNavigationStyle.cpp b/src/Gui/InventorNavigationStyle.cpp index 19b3e0c6e7..f4db29b1a2 100644 --- a/src/Gui/InventorNavigationStyle.cpp +++ b/src/Gui/InventorNavigationStyle.cpp @@ -40,13 +40,9 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::InventorNavigationStyle, Gui::UserNavigationStyle) -InventorNavigationStyle::InventorNavigationStyle() -{ -} +InventorNavigationStyle::InventorNavigationStyle() = default; -InventorNavigationStyle::~InventorNavigationStyle() -{ -} +InventorNavigationStyle::~InventorNavigationStyle() = default; const char* InventorNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/ListWidgetDragBugFix.cpp b/src/Gui/ListWidgetDragBugFix.cpp index dfaaa01b74..30b2c92d6d 100644 --- a/src/Gui/ListWidgetDragBugFix.cpp +++ b/src/Gui/ListWidgetDragBugFix.cpp @@ -35,9 +35,7 @@ ListWidgetDragBugFix::ListWidgetDragBugFix(QWidget * parent) { } -ListWidgetDragBugFix::~ListWidgetDragBugFix() -{ -} +ListWidgetDragBugFix::~ListWidgetDragBugFix() = default; void ListWidgetDragBugFix::dragMoveEvent(QDragMoveEvent *event) { diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 17dd498f1d..b7f5c640cc 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -136,8 +136,7 @@ public: CustomMessageEvent(int t, const QString& s, int timeout=0) : QEvent(QEvent::User), _type(t), msg(s), _timeout(timeout) { } - ~CustomMessageEvent() override - { } + ~CustomMessageEvent() override = default; int type() const { return _type; } const QString& message() const diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 780c095338..9ac6e7b8b5 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -58,8 +58,7 @@ public: explicit UrlHandler(QObject* parent = nullptr) : QObject(parent){ } - ~UrlHandler() override { - } + ~UrlHandler() override = default; virtual void openUrl(App::Document*, const QUrl&) { } }; diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index 04fe792187..fbac6c0621 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -64,13 +64,9 @@ using namespace Gui; namespace sp = std::placeholders; -AlignmentGroup::AlignmentGroup() -{ -} +AlignmentGroup::AlignmentGroup() = default; -AlignmentGroup::~AlignmentGroup() -{ -} +AlignmentGroup::~AlignmentGroup() = default; void AlignmentGroup::addView(App::DocumentObject* pView) { @@ -254,33 +250,21 @@ Base::BoundBox3d AlignmentGroup::getBoundingBox() const // ------------------------------------------------------------------ -MovableGroup::MovableGroup() -{ -} +MovableGroup::MovableGroup() = default; -MovableGroup::~MovableGroup() -{ -} +MovableGroup::~MovableGroup() = default; // ------------------------------------------------------------------ -FixedGroup::FixedGroup() -{ -} +FixedGroup::FixedGroup() = default; -FixedGroup::~FixedGroup() -{ -} +FixedGroup::~FixedGroup() = default; // ------------------------------------------------------------------ -MovableGroupModel::MovableGroupModel() -{ -} +MovableGroupModel::MovableGroupModel() = default; -MovableGroupModel::~MovableGroupModel() -{ -} +MovableGroupModel::~MovableGroupModel() = default; void MovableGroupModel::addGroup(const MovableGroup& grp) { @@ -426,9 +410,7 @@ public: static_cast(getViewer(1)->getSoRenderManager()->getSceneGraph())-> addChild(setupHeadUpDisplay(tr("Fixed object"))); } - ~AlignmentView() override - { - } + ~AlignmentView() override = default; PyObject* getPyObject() override { Py_Return; diff --git a/src/Gui/ManualAlignment.h b/src/Gui/ManualAlignment.h index f31a96a855..d881da101f 100644 --- a/src/Gui/ManualAlignment.h +++ b/src/Gui/ManualAlignment.h @@ -42,7 +42,7 @@ class View3DInventorViewer; class PickedPoint { public: - PickedPoint() {} + PickedPoint() = default; PickedPoint(const Base::Vector3d& p, const Base::Vector3d& n) : point(p), normal(n) {} Base::Vector3d point; Base::Vector3d normal; diff --git a/src/Gui/MayaGestureNavigationStyle.cpp b/src/Gui/MayaGestureNavigationStyle.cpp index 3fe368d8b8..5f5bf36375 100644 --- a/src/Gui/MayaGestureNavigationStyle.cpp +++ b/src/Gui/MayaGestureNavigationStyle.cpp @@ -85,9 +85,7 @@ MayaGestureNavigationStyle::MayaGestureNavigationStyle() inGesture = false; } -MayaGestureNavigationStyle::~MayaGestureNavigationStyle() -{ -} +MayaGestureNavigationStyle::~MayaGestureNavigationStyle() = default; const char* MayaGestureNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/MenuManager.cpp b/src/Gui/MenuManager.cpp index 02dbc448d7..30c03457de 100644 --- a/src/Gui/MenuManager.cpp +++ b/src/Gui/MenuManager.cpp @@ -37,9 +37,7 @@ using namespace Gui; -MenuItem::MenuItem() -{ -} +MenuItem::MenuItem() = default; MenuItem::MenuItem(MenuItem* item) { @@ -197,13 +195,9 @@ void MenuManager::destruct() _instance = nullptr; } -MenuManager::MenuManager() -{ -} +MenuManager::MenuManager() = default; -MenuManager::~MenuManager() -{ -} +MenuManager::~MenuManager() = default; void MenuManager::setup(MenuItem* menuItems) const { diff --git a/src/Gui/MouseSelection.cpp b/src/Gui/MouseSelection.cpp index 8fdd43842d..3c1c639cba 100644 --- a/src/Gui/MouseSelection.cpp +++ b/src/Gui/MouseSelection.cpp @@ -204,9 +204,7 @@ void PolyPickerSelection::draw() _pcView3D->redraw(); } -PolyPickerSelection::~PolyPickerSelection() -{ -} +PolyPickerSelection::~PolyPickerSelection() = default; int PolyPickerSelection::popupMenu() { @@ -357,9 +355,7 @@ PolyClipSelection::PolyClipSelection() selectionBits.set(2); } -PolyClipSelection::~PolyClipSelection() -{ -} +PolyClipSelection::~PolyClipSelection() = default; int PolyClipSelection::popupMenu() { @@ -404,14 +400,9 @@ int PolyClipSelection::popupMenu() // ----------------------------------------------------------------------------------- -FreehandSelection::FreehandSelection() -{ -} +FreehandSelection::FreehandSelection() = default; -FreehandSelection::~FreehandSelection() -{ - -} +FreehandSelection::~FreehandSelection() = default; void FreehandSelection::setClosed(bool on) { @@ -565,9 +556,7 @@ RubberbandSelection::RubberbandSelection() rubberband.setColor(1.0, 1.0, 0.0, 0.5); } -RubberbandSelection::~RubberbandSelection() -{ -} +RubberbandSelection::~RubberbandSelection() = default; void RubberbandSelection::setColor(float r, float g, float b, float a) { @@ -665,19 +654,13 @@ RectangleSelection::RectangleSelection() : RubberbandSelection() rubberband.setColor(0.0,0.0,1.0,1.0); } -RectangleSelection::~RectangleSelection() -{ -} +RectangleSelection::~RectangleSelection() = default; // ----------------------------------------------------------------------------------- -BoxZoomSelection::BoxZoomSelection() -{ -} +BoxZoomSelection::BoxZoomSelection() = default; -BoxZoomSelection::~BoxZoomSelection() -{ -} +BoxZoomSelection::~BoxZoomSelection() = default; void BoxZoomSelection::terminate(bool abort) { diff --git a/src/Gui/MouseSelection.h b/src/Gui/MouseSelection.h index 8b227bf2a4..5191f22d2a 100644 --- a/src/Gui/MouseSelection.h +++ b/src/Gui/MouseSelection.h @@ -36,6 +36,7 @@ class QWheelEvent; class QKeyEvent; class QPaintEvent; class QResizeEvent; +class SbVec2s; class SoEvent; class SbViewportRegion; class SoMouseButtonEvent; @@ -58,7 +59,7 @@ public: enum { Continue=0, Restart=1, Finish=2, Cancel=3, Ignore=4 }; AbstractMouseSelection(); - virtual ~AbstractMouseSelection() {} + virtual ~AbstractMouseSelection() = default; /// implement this in derived classes virtual void initialize() = 0; /// implement this in derived classes @@ -112,7 +113,7 @@ class GuiExport BaseMouseSelection : public AbstractMouseSelection { public: BaseMouseSelection(); - ~BaseMouseSelection() override{} + ~BaseMouseSelection() override = default; }; // ----------------------------------------------------------------------------------- diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 81bec5ab1d..f35265f303 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -177,9 +177,7 @@ NavigationStyleEvent::NavigationStyleEvent(const Base::Type& s) { } -NavigationStyleEvent::~NavigationStyleEvent() -{ -} +NavigationStyleEvent::~NavigationStyleEvent() = default; const Base::Type& NavigationStyleEvent::style() const { diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index 762380bf56..8d9b2dfb1a 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -283,8 +283,8 @@ class GuiExport UserNavigationStyle : public NavigationStyle { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - UserNavigationStyle(){} - ~UserNavigationStyle() override{} + UserNavigationStyle() = default; + ~UserNavigationStyle() override = default; virtual const char* mouseButtons(ViewerMode) = 0; virtual std::string userFriendlyName() const; static std::map getUserFriendlyNames(); diff --git a/src/Gui/OnlineDocumentation.cpp b/src/Gui/OnlineDocumentation.cpp index 9a1a9b8bb7..7d786601be 100644 --- a/src/Gui/OnlineDocumentation.cpp +++ b/src/Gui/OnlineDocumentation.cpp @@ -65,13 +65,9 @@ static const unsigned char navicon_data[] = { 0x9c,0x3d,0x00,0x00,0x9f,0xfd,0x00,0x00,0x80,0xfd,0x00,0x00,0xff,0x7d, 0x00,0x00,0xfe,0x01,0x00,0x00,0xff,0x7f,0x00,0x00}; -PythonOnlineHelp::PythonOnlineHelp() -{ -} +PythonOnlineHelp::PythonOnlineHelp() = default; -PythonOnlineHelp::~PythonOnlineHelp() -{ -} +PythonOnlineHelp::~PythonOnlineHelp() = default; QByteArray PythonOnlineHelp::loadResource(const QString& filename) const { diff --git a/src/Gui/OpenCascadeNavigationStyle.cpp b/src/Gui/OpenCascadeNavigationStyle.cpp index 1d219da314..8c98567d73 100644 --- a/src/Gui/OpenCascadeNavigationStyle.cpp +++ b/src/Gui/OpenCascadeNavigationStyle.cpp @@ -38,13 +38,9 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::OpenCascadeNavigationStyle, Gui::UserNavigationStyle) -OpenCascadeNavigationStyle::OpenCascadeNavigationStyle() -{ -} +OpenCascadeNavigationStyle::OpenCascadeNavigationStyle() = default; -OpenCascadeNavigationStyle::~OpenCascadeNavigationStyle() -{ -} +OpenCascadeNavigationStyle::~OpenCascadeNavigationStyle() = default; const char* OpenCascadeNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/OpenSCADNavigationStyle.cpp b/src/Gui/OpenSCADNavigationStyle.cpp index e013541367..3a9b183a8b 100644 --- a/src/Gui/OpenSCADNavigationStyle.cpp +++ b/src/Gui/OpenSCADNavigationStyle.cpp @@ -38,13 +38,9 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::OpenSCADNavigationStyle, Gui::UserNavigationStyle) -OpenSCADNavigationStyle::OpenSCADNavigationStyle() -{ -} +OpenSCADNavigationStyle::OpenSCADNavigationStyle() = default; -OpenSCADNavigationStyle::~OpenSCADNavigationStyle() -{ -} +OpenSCADNavigationStyle::~OpenSCADNavigationStyle() = default; const char* OpenSCADNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 1dc3029982..def5130319 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -990,9 +990,7 @@ DockablePlacement::DockablePlacement(QWidget* parent, Qt::WindowFlags fl) : Plac dw->show(); } -DockablePlacement::~DockablePlacement() -{ -} +DockablePlacement::~DockablePlacement() = default; void DockablePlacement::accept() { @@ -1026,10 +1024,7 @@ TaskPlacement::TaskPlacement() connect(widget, &Placement::placementChanged, this, &TaskPlacement::slotPlacementChanged); } -TaskPlacement::~TaskPlacement() -{ - // automatically deleted in the sub-class -} +TaskPlacement::~TaskPlacement() = default; /*! diff --git a/src/Gui/PrefWidgets.cpp b/src/Gui/PrefWidgets.cpp index 3b86963b76..314380b311 100644 --- a/src/Gui/PrefWidgets.cpp +++ b/src/Gui/PrefWidgets.cpp @@ -171,9 +171,7 @@ PrefSpinBox::PrefSpinBox ( QWidget * parent ) { } -PrefSpinBox::~PrefSpinBox() -{ -} +PrefSpinBox::~PrefSpinBox() = default; void PrefSpinBox::restorePreferences() { @@ -205,9 +203,7 @@ PrefDoubleSpinBox::PrefDoubleSpinBox ( QWidget * parent ) { } -PrefDoubleSpinBox::~PrefDoubleSpinBox() -{ -} +PrefDoubleSpinBox::~PrefDoubleSpinBox() = default; void PrefDoubleSpinBox::restorePreferences() { @@ -239,9 +235,7 @@ PrefLineEdit::PrefLineEdit ( QWidget * parent ) { } -PrefLineEdit::~PrefLineEdit() -{ -} +PrefLineEdit::~PrefLineEdit() = default; void PrefLineEdit::restorePreferences() { @@ -274,9 +268,7 @@ PrefTextEdit::PrefTextEdit(QWidget* parent) { } -PrefTextEdit::~PrefTextEdit() -{ -} +PrefTextEdit::~PrefTextEdit() = default; void PrefTextEdit::restorePreferences() { @@ -310,9 +302,7 @@ PrefFileChooser::PrefFileChooser ( QWidget * parent ) { } -PrefFileChooser::~PrefFileChooser() -{ -} +PrefFileChooser::~PrefFileChooser() = default; void PrefFileChooser::restorePreferences() { @@ -344,9 +334,7 @@ PrefComboBox::PrefComboBox ( QWidget * parent ) { } -PrefComboBox::~PrefComboBox() -{ -} +PrefComboBox::~PrefComboBox() = default; QMetaType::Type PrefComboBox::getParamType() const { @@ -439,9 +427,7 @@ PrefCheckBox::PrefCheckBox ( QWidget * parent ) { } -PrefCheckBox::~PrefCheckBox() -{ -} +PrefCheckBox::~PrefCheckBox() = default; void PrefCheckBox::restorePreferences() { @@ -473,9 +459,7 @@ PrefRadioButton::PrefRadioButton ( QWidget * parent ) { } -PrefRadioButton::~PrefRadioButton() -{ -} +PrefRadioButton::~PrefRadioButton() = default; void PrefRadioButton::restorePreferences() { @@ -507,9 +491,7 @@ PrefSlider::PrefSlider ( QWidget * parent ) { } -PrefSlider::~PrefSlider() -{ -} +PrefSlider::~PrefSlider() = default; void PrefSlider::restorePreferences() { @@ -541,9 +523,7 @@ PrefColorButton::PrefColorButton ( QWidget * parent ) { } -PrefColorButton::~PrefColorButton() -{ -} +PrefColorButton::~PrefColorButton() = default; void PrefColorButton::restorePreferences() { @@ -588,9 +568,7 @@ PrefUnitSpinBox::PrefUnitSpinBox ( QWidget * parent ) { } -PrefUnitSpinBox::~PrefUnitSpinBox() -{ -} +PrefUnitSpinBox::~PrefUnitSpinBox() = default; void PrefUnitSpinBox::restorePreferences() { @@ -686,9 +664,7 @@ PrefQuantitySpinBox::PrefQuantitySpinBox (QWidget * parent) { } -PrefQuantitySpinBox::~PrefQuantitySpinBox() -{ -} +PrefQuantitySpinBox::~PrefQuantitySpinBox() = default; void PrefQuantitySpinBox::contextMenuEvent(QContextMenuEvent *event) { @@ -810,9 +786,7 @@ PrefFontBox::PrefFontBox ( QWidget * parent ) { } -PrefFontBox::~PrefFontBox() -{ -} +PrefFontBox::~PrefFontBox() = default; void PrefFontBox::restorePreferences() { diff --git a/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp b/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp index 54da5b482e..65c0677e82 100644 --- a/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp +++ b/src/Gui/PreferencePages/DlgSettings3DViewImp.cpp @@ -56,10 +56,7 @@ DlgSettings3DViewImp::DlgSettings3DViewImp(QWidget* parent) /** * Destroys the object and frees any allocated resources */ -DlgSettings3DViewImp::~DlgSettings3DViewImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettings3DViewImp::~DlgSettings3DViewImp() = default; void DlgSettings3DViewImp::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsCacheDirectory.cpp b/src/Gui/PreferencePages/DlgSettingsCacheDirectory.cpp index 2bd7b63049..8af2959bb4 100644 --- a/src/Gui/PreferencePages/DlgSettingsCacheDirectory.cpp +++ b/src/Gui/PreferencePages/DlgSettingsCacheDirectory.cpp @@ -74,9 +74,7 @@ DlgSettingsCacheDirectory::DlgSettingsCacheDirectory(QWidget* parent) connect(ui->openButton, &QPushButton::clicked, this, &DlgSettingsCacheDirectory::openDirectory); } -DlgSettingsCacheDirectory::~DlgSettingsCacheDirectory() -{ -} +DlgSettingsCacheDirectory::~DlgSettingsCacheDirectory() = default; void DlgSettingsCacheDirectory::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsDocumentImp.cpp b/src/Gui/PreferencePages/DlgSettingsDocumentImp.cpp index 7653d19f5c..a5053a788b 100644 --- a/src/Gui/PreferencePages/DlgSettingsDocumentImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsDocumentImp.cpp @@ -64,11 +64,7 @@ DlgSettingsDocumentImp::DlgSettingsDocumentImp( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsDocumentImp::~DlgSettingsDocumentImp() -{ - // no need to delete child widgets, Qt does it all for us -} - +DlgSettingsDocumentImp::~DlgSettingsDocumentImp() = default; void DlgSettingsDocumentImp::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp index 71cac7594f..f2e26029fd 100644 --- a/src/Gui/PreferencePages/DlgSettingsGeneral.cpp +++ b/src/Gui/PreferencePages/DlgSettingsGeneral.cpp @@ -111,9 +111,7 @@ DlgSettingsGeneral::DlgSettingsGeneral( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsGeneral::~DlgSettingsGeneral() -{ -} +DlgSettingsGeneral::~DlgSettingsGeneral() = default; /** Sets the size of the recent file list from the user parameters. * @see RecentFilesAction diff --git a/src/Gui/PreferencePages/DlgSettingsMacroImp.cpp b/src/Gui/PreferencePages/DlgSettingsMacroImp.cpp index fb548c6666..46f8d4a588 100644 --- a/src/Gui/PreferencePages/DlgSettingsMacroImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsMacroImp.cpp @@ -56,10 +56,8 @@ DlgSettingsMacroImp::DlgSettingsMacroImp( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsMacroImp::~DlgSettingsMacroImp() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettingsMacroImp::~DlgSettingsMacroImp() = default; + /** Sets the size of the recent macros list from the user parameters. * @see RecentMacrosAction * @see StdCmdRecentMacros diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp index 3defa2a97c..ee65c0d091 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp @@ -64,9 +64,7 @@ DlgSettingsNavigation::DlgSettingsNavigation(QWidget* parent) /** * Destroys the object and frees any allocated resources */ -DlgSettingsNavigation::~DlgSettingsNavigation() -{ -} +DlgSettingsNavigation::~DlgSettingsNavigation() = default; void DlgSettingsNavigation::saveSettings() { @@ -342,9 +340,7 @@ CameraDialog::CameraDialog(QWidget* parent) &CameraDialog::onCurrentViewClicked); } -CameraDialog::~CameraDialog() -{ -} +CameraDialog::~CameraDialog() = default; void CameraDialog::setValues(double q0, double q1, double q2, double q3) { diff --git a/src/Gui/PreferencePages/DlgSettingsNotificationArea.cpp b/src/Gui/PreferencePages/DlgSettingsNotificationArea.cpp index e7949cf651..b75ae57207 100644 --- a/src/Gui/PreferencePages/DlgSettingsNotificationArea.cpp +++ b/src/Gui/PreferencePages/DlgSettingsNotificationArea.cpp @@ -51,8 +51,7 @@ DlgSettingsNotificationArea::DlgSettingsNotificationArea(QWidget* parent) }); } -DlgSettingsNotificationArea::~DlgSettingsNotificationArea() -{} +DlgSettingsNotificationArea::~DlgSettingsNotificationArea() = default; void DlgSettingsNotificationArea::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp b/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp index 5a52b40bb0..6e59fad4ca 100644 --- a/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp +++ b/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp @@ -37,9 +37,7 @@ DlgSettingsPythonConsole::DlgSettingsPythonConsole(QWidget* parent) ui->setupUi(this); } -DlgSettingsPythonConsole::~DlgSettingsPythonConsole() -{ -} +DlgSettingsPythonConsole::~DlgSettingsPythonConsole() = default; void DlgSettingsPythonConsole::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsReportView.cpp b/src/Gui/PreferencePages/DlgSettingsReportView.cpp index e1032237e7..0cf0791b9b 100644 --- a/src/Gui/PreferencePages/DlgSettingsReportView.cpp +++ b/src/Gui/PreferencePages/DlgSettingsReportView.cpp @@ -48,9 +48,7 @@ DlgSettingsReportView::DlgSettingsReportView( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsReportView::~DlgSettingsReportView() -{ -} +DlgSettingsReportView::~DlgSettingsReportView() = default; void DlgSettingsReportView::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsSelection.cpp b/src/Gui/PreferencePages/DlgSettingsSelection.cpp index a079c37312..315376fd9a 100644 --- a/src/Gui/PreferencePages/DlgSettingsSelection.cpp +++ b/src/Gui/PreferencePages/DlgSettingsSelection.cpp @@ -39,9 +39,7 @@ DlgSettingsSelection::DlgSettingsSelection(QWidget* parent) ui->setupUi(this); } -DlgSettingsSelection::~DlgSettingsSelection() -{ -} +DlgSettingsSelection::~DlgSettingsSelection() = default; void DlgSettingsSelection::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsTheme.cpp b/src/Gui/PreferencePages/DlgSettingsTheme.cpp index f8a2b3708a..06f6ab9e61 100644 --- a/src/Gui/PreferencePages/DlgSettingsTheme.cpp +++ b/src/Gui/PreferencePages/DlgSettingsTheme.cpp @@ -55,10 +55,7 @@ DlgSettingsTheme::DlgSettingsTheme(QWidget* parent) /** * Destroys the object and frees any allocated resources */ -DlgSettingsTheme::~DlgSettingsTheme() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettingsTheme::~DlgSettingsTheme() = default; void DlgSettingsTheme::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsViewColor.cpp b/src/Gui/PreferencePages/DlgSettingsViewColor.cpp index 1e36731f87..2d42e4f48b 100644 --- a/src/Gui/PreferencePages/DlgSettingsViewColor.cpp +++ b/src/Gui/PreferencePages/DlgSettingsViewColor.cpp @@ -61,10 +61,7 @@ DlgSettingsViewColor::DlgSettingsViewColor(QWidget* parent) /** * Destroys the object and frees any allocated resources */ -DlgSettingsViewColor::~DlgSettingsViewColor() -{ - // no need to delete child widgets, Qt does it all for us -} +DlgSettingsViewColor::~DlgSettingsViewColor() = default; void DlgSettingsViewColor::saveSettings() { diff --git a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp index 89fa6bb717..de6b97c4f0 100644 --- a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp @@ -163,9 +163,7 @@ wbListItem::wbListItem(const QString& wbName, bool enabled, bool startupWb, bool layout->setContentsMargins(10, 0, 0, 0); } -wbListItem::~wbListItem() -{ -} +wbListItem::~wbListItem() = default; bool wbListItem::isEnabled() { @@ -245,10 +243,7 @@ DlgSettingsWorkbenchesImp::DlgSettingsWorkbenchesImp( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -DlgSettingsWorkbenchesImp::~DlgSettingsWorkbenchesImp() -{ -} - +DlgSettingsWorkbenchesImp::~DlgSettingsWorkbenchesImp() = default; void DlgSettingsWorkbenchesImp::saveSettings() { diff --git a/src/Gui/ProgressDialog.cpp b/src/Gui/ProgressDialog.cpp index 7ad667e1d4..3f596d62ab 100644 --- a/src/Gui/ProgressDialog.cpp +++ b/src/Gui/ProgressDialog.cpp @@ -303,9 +303,7 @@ ProgressDialog::ProgressDialog (SequencerDialog* s, QWidget * parent) connect(this, &QProgressDialog::canceled, this, &ProgressDialog::onCancel); } -ProgressDialog::~ProgressDialog () -{ -} +ProgressDialog::~ProgressDialog() = default; void ProgressDialog::onCancel() { diff --git a/src/Gui/ProjectView.cpp b/src/Gui/ProjectView.cpp index 0e4dbfdc52..c13d6544a9 100644 --- a/src/Gui/ProjectView.cpp +++ b/src/Gui/ProjectView.cpp @@ -38,8 +38,6 @@ ProjectWidget::ProjectWidget(QWidget* parent) setModel(fileModel); } -ProjectWidget::~ProjectWidget() -{ -} +ProjectWidget::~ProjectWidget() = default; #include "moc_ProjectView.cpp" diff --git a/src/Gui/PropertyPage.cpp b/src/Gui/PropertyPage.cpp index 704c08cc4a..26123473f2 100644 --- a/src/Gui/PropertyPage.cpp +++ b/src/Gui/PropertyPage.cpp @@ -144,9 +144,7 @@ PreferenceUiForm::PreferenceUiForm(const QString& fn, QWidget* parent) } } -PreferenceUiForm::~PreferenceUiForm() -{ -} +PreferenceUiForm::~PreferenceUiForm() = default; void PreferenceUiForm::changeEvent(QEvent *e) { @@ -219,9 +217,7 @@ CustomizeActionPage::CustomizeActionPage(QWidget* parent) : QWidget(parent) } /** Destruction */ -CustomizeActionPage::~CustomizeActionPage() -{ -} +CustomizeActionPage::~CustomizeActionPage() = default; bool CustomizeActionPage::event(QEvent* e) { diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index 39c927dc15..535f54fa2c 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -568,8 +568,6 @@ PropertyDockView::PropertyDockView(Gui::Document* pcDocument, QWidget *parent) resize( 200, 400 ); } -PropertyDockView::~PropertyDockView() -{ -} +PropertyDockView::~PropertyDockView() = default; #include "moc_PropertyView.cpp" diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index 35ceaef52b..588940fd67 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -1514,9 +1514,7 @@ PythonConsoleHighlighter::PythonConsoleHighlighter(QObject* parent) { } -PythonConsoleHighlighter::~PythonConsoleHighlighter() -{ -} +PythonConsoleHighlighter::~PythonConsoleHighlighter() = default; void PythonConsoleHighlighter::highlightBlock(const QString& text) { @@ -1564,9 +1562,7 @@ ConsoleHistory::ConsoleHistory() _it = _history.cend(); } -ConsoleHistory::~ConsoleHistory() -{ -} +ConsoleHistory::~ConsoleHistory() = default; void ConsoleHistory::first() { diff --git a/src/Gui/PythonConsolePy.cpp b/src/Gui/PythonConsolePy.cpp index 8048aa0711..7d81406ef1 100644 --- a/src/Gui/PythonConsolePy.cpp +++ b/src/Gui/PythonConsolePy.cpp @@ -44,9 +44,7 @@ PythonStdout::PythonStdout(PythonConsole *pc) { } -PythonStdout::~PythonStdout() -{ -} +PythonStdout::~PythonStdout() = default; Py::Object PythonStdout::getattr(const char *name) { @@ -110,9 +108,7 @@ PythonStderr::PythonStderr(PythonConsole *pc) { } -PythonStderr::~PythonStderr() -{ -} +PythonStderr::~PythonStderr() = default; Py::Object PythonStderr::getattr(const char *name) { @@ -171,13 +167,9 @@ void OutputStdout::init_type() add_noargs_method("isatty",&OutputStdout::isatty,"isatty()"); } -OutputStdout::OutputStdout() -{ -} +OutputStdout::OutputStdout() = default; -OutputStdout::~OutputStdout() -{ -} +OutputStdout::~OutputStdout() = default; Py::Object OutputStdout::getattr(const char *name) { @@ -236,13 +228,9 @@ void OutputStderr::init_type() add_noargs_method("isatty",&OutputStderr::isatty,"isatty()"); } -OutputStderr::OutputStderr() -{ -} +OutputStderr::OutputStderr() = default; -OutputStderr::~OutputStderr() -{ -} +OutputStderr::~OutputStderr() = default; Py::Object OutputStderr::getattr(const char *name) { @@ -305,9 +293,7 @@ PythonStdin::PythonStdin(PythonConsole *pc) { } -PythonStdin::~PythonStdin() -{ -} +PythonStdin::~PythonStdin() = default; Py::Object PythonStdin::repr() { diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index 762e6fe682..3b0aeab925 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -38,9 +38,7 @@ using namespace Gui; -Breakpoint::Breakpoint() -{ -} +Breakpoint::Breakpoint() = default; Breakpoint::Breakpoint(const Breakpoint& rBp) { @@ -60,10 +58,7 @@ Breakpoint& Breakpoint::operator= (const Breakpoint& rBp) return *this; } -Breakpoint::~Breakpoint() -{ - -} +Breakpoint::~Breakpoint() = default; void Breakpoint::setFilename(const QString& fn) { @@ -166,13 +161,9 @@ void PythonDebugStdout::init_type() add_varargs_method("flush",&PythonDebugStdout::flush,"flush the output"); } -PythonDebugStdout::PythonDebugStdout() -{ -} +PythonDebugStdout::PythonDebugStdout() = default; -PythonDebugStdout::~PythonDebugStdout() -{ -} +PythonDebugStdout::~PythonDebugStdout() = default; Py::Object PythonDebugStdout::repr() { @@ -218,13 +209,9 @@ void PythonDebugStderr::init_type() add_varargs_method("write",&PythonDebugStderr::write,"write to stderr"); } -PythonDebugStderr::PythonDebugStderr() -{ -} +PythonDebugStderr::PythonDebugStderr() = default; -PythonDebugStderr::~PythonDebugStderr() -{ -} +PythonDebugStderr::~PythonDebugStderr() = default; Py::Object PythonDebugStderr::repr() { @@ -267,13 +254,9 @@ void PythonDebugExcept::init_type() add_varargs_method("fc_excepthook",&PythonDebugExcept::excepthook,"Custom exception handler"); } -PythonDebugExcept::PythonDebugExcept() -{ -} +PythonDebugExcept::PythonDebugExcept() = default; -PythonDebugExcept::~PythonDebugExcept() -{ -} +PythonDebugExcept::~PythonDebugExcept() = default; Py::Object PythonDebugExcept::repr() { @@ -321,7 +304,7 @@ class PythonDebuggerPy : public Py::PythonExtension { public: explicit PythonDebuggerPy(PythonDebugger* d) : dbg(d), depth(0) { } - ~PythonDebuggerPy() override {} + ~PythonDebuggerPy() override = default; PythonDebugger* dbg; int depth; }; diff --git a/src/Gui/QListWidgetCustom.cpp b/src/Gui/QListWidgetCustom.cpp index ced5555e1c..13cfbc8bb1 100644 --- a/src/Gui/QListWidgetCustom.cpp +++ b/src/Gui/QListWidgetCustom.cpp @@ -35,9 +35,7 @@ QListWidgetCustom::QListWidgetCustom(QWidget * parent) { } -QListWidgetCustom::~QListWidgetCustom() -{ -} +QListWidgetCustom::~QListWidgetCustom() = default; /* Overridden dragMoveEvent prevents dragging items that originated * from the same list for "disabled workbenches". Dragging from outside diff --git a/src/Gui/QSint/actionpanel/actionlabel.h b/src/Gui/QSint/actionpanel/actionlabel.h index 988906de7f..da9a5582e5 100644 --- a/src/Gui/QSint/actionpanel/actionlabel.h +++ b/src/Gui/QSint/actionpanel/actionlabel.h @@ -79,7 +79,7 @@ public: */ explicit ActionLabel(QAction *action, QWidget *parent = nullptr); - ~ActionLabel() override {} + ~ActionLabel() override = default; QSize sizeHint() const override; QSize minimumSizeHint() const override; diff --git a/src/Gui/QuantitySpinBox.cpp b/src/Gui/QuantitySpinBox.cpp index dbc666e7b9..91bc452d6a 100644 --- a/src/Gui/QuantitySpinBox.cpp +++ b/src/Gui/QuantitySpinBox.cpp @@ -72,9 +72,7 @@ public: q_ptr(q) { } - ~QuantitySpinBoxPrivate() - { - } + ~QuantitySpinBoxPrivate() = default; QString stripped(const QString &t, int *pos) const { @@ -294,9 +292,7 @@ QuantitySpinBox::QuantitySpinBox(QWidget *parent) #endif } -QuantitySpinBox::~QuantitySpinBox() -{ -} +QuantitySpinBox::~QuantitySpinBox() = default; void QuantitySpinBox::bind(const App::ObjectIdentifier &_path) { diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index e5d349b717..4556178851 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -95,10 +95,7 @@ ReportView::ReportView( QWidget* parent ) /** * Destroys the object and frees any allocated resources */ -ReportView::~ReportView() -{ - // no need to delete child widgets, Qt does it all for us -} +ReportView::~ReportView() = default; void ReportView::changeEvent(QEvent *e) { @@ -134,9 +131,7 @@ ReportHighlighter::ReportHighlighter(QTextEdit* edit) errCol = Qt::red; } -ReportHighlighter::~ReportHighlighter() -{ -} +ReportHighlighter::~ReportHighlighter() = default; void ReportHighlighter::highlightBlock (const QString & text) { @@ -288,8 +283,7 @@ public: CustomReportEvent(ReportHighlighter::Paragraph p, const QString& s) : QEvent(QEvent::Type(QEvent::User)) { par = p; msg = s;} - ~CustomReportEvent() override - { } + ~CustomReportEvent() override = default; const QString& message() const { return msg; } ReportHighlighter::Paragraph messageType() const diff --git a/src/Gui/RevitNavigationStyle.cpp b/src/Gui/RevitNavigationStyle.cpp index 62aeb2db8b..b1c96ad714 100644 --- a/src/Gui/RevitNavigationStyle.cpp +++ b/src/Gui/RevitNavigationStyle.cpp @@ -42,9 +42,7 @@ RevitNavigationStyle::RevitNavigationStyle() : lockButton1(false) { } -RevitNavigationStyle::~RevitNavigationStyle() -{ -} +RevitNavigationStyle::~RevitNavigationStyle() = default; const char* RevitNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/SceneInspector.cpp b/src/Gui/SceneInspector.cpp index f7924b218c..4bd1e51838 100644 --- a/src/Gui/SceneInspector.cpp +++ b/src/Gui/SceneInspector.cpp @@ -45,9 +45,7 @@ SceneModel::SceneModel(QObject* parent) { } -SceneModel::~SceneModel() -{ -} +SceneModel::~SceneModel() = default; int SceneModel::columnCount (const QModelIndex & parent) const { diff --git a/src/Gui/Selection.cpp b/src/Gui/Selection.cpp index 5d22b11fd0..206588d213 100644 --- a/src/Gui/Selection.cpp +++ b/src/Gui/Selection.cpp @@ -1625,9 +1625,7 @@ SelectionSingleton::SelectionSingleton() * A destructor. * A more elaborate description of the destructor. */ -SelectionSingleton::~SelectionSingleton() -{ -} +SelectionSingleton::~SelectionSingleton() = default; SelectionSingleton* SelectionSingleton::_pcSingleton = nullptr; diff --git a/src/Gui/Selection.h b/src/Gui/Selection.h index 1839435e3d..56e3e9c503 100644 --- a/src/Gui/Selection.h +++ b/src/Gui/Selection.h @@ -276,7 +276,7 @@ private: class GuiExport SelectionGate { public: - virtual ~SelectionGate(){} + virtual ~SelectionGate() = default; virtual bool allow(App::Document*,App::DocumentObject*, const char*)=0; /** diff --git a/src/Gui/SelectionFilter.cpp b/src/Gui/SelectionFilter.cpp index aa5ef36ea6..e08d3bba74 100644 --- a/src/Gui/SelectionFilter.cpp +++ b/src/Gui/SelectionFilter.cpp @@ -81,9 +81,7 @@ SelectionGatePython::SelectionGatePython(const Py::Object& obj) { } -SelectionGatePython::~SelectionGatePython() -{ -} +SelectionGatePython::~SelectionGatePython() = default; bool SelectionGatePython::allow(App::Document* doc, App::DocumentObject* obj, const char* sub) { @@ -158,9 +156,7 @@ void SelectionFilter::setFilter(const char* filter) } } -SelectionFilter::~SelectionFilter() -{ -} +SelectionFilter::~SelectionFilter() = default; bool SelectionFilter::match() { diff --git a/src/Gui/SelectionFilterPy.cpp b/src/Gui/SelectionFilterPy.cpp index 230cc606a0..d5d8d630b5 100644 --- a/src/Gui/SelectionFilterPy.cpp +++ b/src/Gui/SelectionFilterPy.cpp @@ -42,9 +42,7 @@ SelectionFilterPy::SelectionFilterPy(Py::PythonClassInstance* self, Py::Tuple& a } } -SelectionFilterPy::~SelectionFilterPy() -{ -} +SelectionFilterPy::~SelectionFilterPy() = default; Py::Object SelectionFilterPy::repr() { diff --git a/src/Gui/SelectionObject.cpp b/src/Gui/SelectionObject.cpp index 78041f92dc..f705397b18 100644 --- a/src/Gui/SelectionObject.cpp +++ b/src/Gui/SelectionObject.cpp @@ -40,9 +40,7 @@ using namespace Gui; TYPESYSTEM_SOURCE_ABSTRACT(Gui::SelectionObject, Base::BaseClass) -SelectionObject::SelectionObject() -{ -} +SelectionObject::SelectionObject() = default; SelectionObject::SelectionObject(const Gui::SelectionChanges& msg) { @@ -62,9 +60,7 @@ SelectionObject::SelectionObject(App::DocumentObject* obj) TypeName = obj->getTypeId().getName(); } -SelectionObject::~SelectionObject() -{ -} +SelectionObject::~SelectionObject() = default; const App::DocumentObject * SelectionObject::getObject() const { diff --git a/src/Gui/SelectionObserverPython.cpp b/src/Gui/SelectionObserverPython.cpp index d46d36863d..e1f670df28 100644 --- a/src/Gui/SelectionObserverPython.cpp +++ b/src/Gui/SelectionObserverPython.cpp @@ -40,9 +40,7 @@ SelectionObserverPython::SelectionObserverPython(const Py::Object& obj, ResolveM FC_PY_SEL_OBSERVER } -SelectionObserverPython::~SelectionObserverPython() -{ -} +SelectionObserverPython::~SelectionObserverPython() = default; void SelectionObserverPython::addObserver(const Py::Object& obj, ResolveMode resolve) { diff --git a/src/Gui/SelectionView.cpp b/src/Gui/SelectionView.cpp index 42fa833843..7cedfe0314 100644 --- a/src/Gui/SelectionView.cpp +++ b/src/Gui/SelectionView.cpp @@ -111,9 +111,7 @@ SelectionView::SelectionView(Gui::Document* pcDocument, QWidget *parent) connect(enablePickList, &QCheckBox::stateChanged, this, &SelectionView::onEnablePickList); } -SelectionView::~SelectionView() -{ -} +SelectionView::~SelectionView() = default; void SelectionView::leaveEvent(QEvent *) { diff --git a/src/Gui/SoAxisCrossKit.cpp b/src/Gui/SoAxisCrossKit.cpp index 930363f8a2..4c637e40af 100644 --- a/src/Gui/SoAxisCrossKit.cpp +++ b/src/Gui/SoAxisCrossKit.cpp @@ -77,9 +77,7 @@ SoShapeScale::SoShapeScale() } // Destructor. -SoShapeScale::~SoShapeScale() -{ -} +SoShapeScale::~SoShapeScale() = default; void SoShapeScale::initClass() @@ -146,9 +144,7 @@ SoAxisCrossKit::SoAxisCrossKit() createAxes(); } -SoAxisCrossKit::~SoAxisCrossKit() -{ -} +SoAxisCrossKit::~SoAxisCrossKit() = default; // This kit is made up entirely of SoShapeKits. // Since SoShapeKits do not affect state, neither does this. diff --git a/src/Gui/SoDatumLabel.h b/src/Gui/SoDatumLabel.h index 183076ec0d..5ae2621cda 100644 --- a/src/Gui/SoDatumLabel.h +++ b/src/Gui/SoDatumLabel.h @@ -79,7 +79,7 @@ public: bool useAntialiasing; protected: - ~SoDatumLabel() override {} + ~SoDatumLabel() override = default; void GLRender(SoGLRenderAction *action) override; void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er) override; void generatePrimitives(SoAction * action) override; diff --git a/src/Gui/SoFCBackgroundGradient.cpp b/src/Gui/SoFCBackgroundGradient.cpp index 4011d1bfad..653b8bbc24 100644 --- a/src/Gui/SoFCBackgroundGradient.cpp +++ b/src/Gui/SoFCBackgroundGradient.cpp @@ -72,9 +72,7 @@ SoFCBackgroundGradient::SoFCBackgroundGradient() /*! Destructor. */ -SoFCBackgroundGradient::~SoFCBackgroundGradient() -{ -} +SoFCBackgroundGradient::~SoFCBackgroundGradient() = default; // doc from parent void SoFCBackgroundGradient::initClass() diff --git a/src/Gui/SoFCBoundingBox.cpp b/src/Gui/SoFCBoundingBox.cpp index 65624d34bc..3f4c38cb83 100644 --- a/src/Gui/SoFCBoundingBox.cpp +++ b/src/Gui/SoFCBoundingBox.cpp @@ -251,9 +251,7 @@ SoSkipBoundingGroup::SoSkipBoundingGroup() /*! Destructor. */ -SoSkipBoundingGroup::~SoSkipBoundingGroup() -{ -} +SoSkipBoundingGroup::~SoSkipBoundingGroup() = default; void SoSkipBoundingGroup::initClass() diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 9214b9dc73..638e6f9b61 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -54,10 +54,7 @@ SoFCColorBarBase::SoFCColorBarBase() : _boxWidth(-1.0f), _windowSize(0,0) /*! Destructor. */ -SoFCColorBarBase::~SoFCColorBarBase() -{ - //delete THIS; -} +SoFCColorBarBase::~SoFCColorBarBase() = default; // doc from parent void SoFCColorBarBase::initClass() @@ -159,7 +156,7 @@ class SoFCColorBarProxyObject : public QObject public: explicit SoFCColorBarProxyObject(SoFCColorBar* b) : QObject(nullptr), bar(b) {} - ~SoFCColorBarProxyObject() override {} + ~SoFCColorBarProxyObject() override = default; void customEvent(QEvent *) override { bar->customize(bar->getActiveBar()); @@ -198,10 +195,7 @@ SoFCColorBar::SoFCColorBar() /*! Destructor. */ -SoFCColorBar::~SoFCColorBar() -{ - //delete THIS; -} +SoFCColorBar::~SoFCColorBar() = default; // doc from parent void SoFCColorBar::initClass() diff --git a/src/Gui/SoFCInteractiveElement.cpp b/src/Gui/SoFCInteractiveElement.cpp index 364d1b0de8..fc9deb97af 100644 --- a/src/Gui/SoFCInteractiveElement.cpp +++ b/src/Gui/SoFCInteractiveElement.cpp @@ -43,9 +43,7 @@ void SoFCInteractiveElement::init(SoState * /*state*/) this->interactiveMode = false; } -SoFCInteractiveElement::~SoFCInteractiveElement() -{ -} +SoFCInteractiveElement::~SoFCInteractiveElement() = default; void SoFCInteractiveElement::set(SoState * const state, SoNode * const node, SbBool mode) { @@ -86,9 +84,7 @@ void SoGLWidgetElement::init(SoState * state) this->window = nullptr; } -SoGLWidgetElement::~SoGLWidgetElement() -{ -} +SoGLWidgetElement::~SoGLWidgetElement() = default; void SoGLWidgetElement::set(SoState * state, QtGLWidget * window) { @@ -141,9 +137,7 @@ void SoGLRenderActionElement::init(SoState * state) this->glRenderAction = nullptr; } -SoGLRenderActionElement::~SoGLRenderActionElement() -{ -} +SoGLRenderActionElement::~SoGLRenderActionElement() = default; void SoGLRenderActionElement::set(SoState * state, SoGLRenderAction * action) { @@ -194,9 +188,7 @@ SoGLWidgetNode::SoGLWidgetNode() : window(nullptr) /*! Destructor. */ -SoGLWidgetNode::~SoGLWidgetNode() -{ -} +SoGLWidgetNode::~SoGLWidgetNode() = default; // Doc from superclass. void SoGLWidgetNode::initClass() @@ -235,9 +227,7 @@ void SoGLVBOActivatedElement::init(SoState * state) this->active = false; } -SoGLVBOActivatedElement::~SoGLVBOActivatedElement() -{ -} +SoGLVBOActivatedElement::~SoGLVBOActivatedElement() = default; void SoGLVBOActivatedElement::set(SoState * state, SbBool active) { diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp index eae9667c6f..e464b29b66 100644 --- a/src/Gui/SoFCOffscreenRenderer.cpp +++ b/src/Gui/SoFCOffscreenRenderer.cpp @@ -83,9 +83,7 @@ SoFCOffscreenRenderer::SoFCOffscreenRenderer (SoGLRenderAction *action) { } -SoFCOffscreenRenderer::~SoFCOffscreenRenderer() -{ -} +SoFCOffscreenRenderer::~SoFCOffscreenRenderer() = default; void SoFCOffscreenRenderer::writeToImage (QImage& img) const { diff --git a/src/Gui/SoFCSelectionAction.cpp b/src/Gui/SoFCSelectionAction.cpp index 22b6a6eafb..141a2cbfc0 100644 --- a/src/Gui/SoFCSelectionAction.cpp +++ b/src/Gui/SoFCSelectionAction.cpp @@ -138,9 +138,7 @@ SoFCHighlightAction::SoFCHighlightAction (const SelectionChanges &SelCh) } -SoFCHighlightAction::~SoFCHighlightAction() -{ -} +SoFCHighlightAction::~SoFCHighlightAction() = default; void SoFCHighlightAction::beginTraversal(SoNode *node) @@ -224,9 +222,7 @@ SoFCSelectionAction::SoFCSelectionAction (const SelectionChanges &SelCh) } -SoFCSelectionAction::~SoFCSelectionAction() -{ -} +SoFCSelectionAction::~SoFCSelectionAction() = default; void SoFCSelectionAction::beginTraversal(SoNode *node) @@ -306,9 +302,7 @@ SoFCEnableSelectionAction::SoFCEnableSelectionAction (const SbBool& sel) } -SoFCEnableSelectionAction::~SoFCEnableSelectionAction() -{ -} +SoFCEnableSelectionAction::~SoFCEnableSelectionAction() = default; void SoFCEnableSelectionAction::beginTraversal(SoNode *node) @@ -388,9 +382,7 @@ SoFCEnableHighlightAction::SoFCEnableHighlightAction (const SbBool& sel) } -SoFCEnableHighlightAction::~SoFCEnableHighlightAction() -{ -} +SoFCEnableHighlightAction::~SoFCEnableHighlightAction() = default; void SoFCEnableHighlightAction::beginTraversal(SoNode *node) @@ -470,9 +462,7 @@ SoFCSelectionColorAction::SoFCSelectionColorAction (const SoSFColor& col) } -SoFCSelectionColorAction::~SoFCSelectionColorAction() -{ -} +SoFCSelectionColorAction::~SoFCSelectionColorAction() = default; void SoFCSelectionColorAction::beginTraversal(SoNode *node) @@ -552,9 +542,7 @@ SoFCHighlightColorAction::SoFCHighlightColorAction (const SoSFColor& col) } -SoFCHighlightColorAction::~SoFCHighlightColorAction() -{ -} +SoFCHighlightColorAction::~SoFCHighlightColorAction() = default; void SoFCHighlightColorAction::beginTraversal(SoNode *node) @@ -634,9 +622,7 @@ SoFCDocumentAction::SoFCDocumentAction (const SoSFString& docName) } -SoFCDocumentAction::~SoFCDocumentAction() -{ -} +SoFCDocumentAction::~SoFCDocumentAction() = default; void SoFCDocumentAction::beginTraversal(SoNode *node) @@ -711,9 +697,7 @@ SoFCDocumentObjectAction::SoFCDocumentObjectAction () : _handled(false) SO_ACTION_CONSTRUCTOR(SoFCDocumentObjectAction); } -SoFCDocumentObjectAction::~SoFCDocumentObjectAction() -{ -} +SoFCDocumentObjectAction::~SoFCDocumentObjectAction() = default; void SoFCDocumentObjectAction::beginTraversal(SoNode *node) { @@ -781,9 +765,7 @@ SoGLSelectAction::SoGLSelectAction (const SbViewportRegion& region, SO_ACTION_CONSTRUCTOR(SoGLSelectAction); } -SoGLSelectAction::~SoGLSelectAction() -{ -} +SoGLSelectAction::~SoGLSelectAction() = default; const SbViewportRegion& SoGLSelectAction::getViewportRegion () const { @@ -856,9 +838,7 @@ SoVisibleFaceAction::SoVisibleFaceAction () : _handled(false) SO_ACTION_CONSTRUCTOR(SoVisibleFaceAction); } -SoVisibleFaceAction::~SoVisibleFaceAction() -{ -} +SoVisibleFaceAction::~SoVisibleFaceAction() = default; void SoVisibleFaceAction::beginTraversal(SoNode *node) { @@ -926,9 +906,7 @@ SoUpdateVBOAction::SoUpdateVBOAction () SO_ACTION_CONSTRUCTOR(SoUpdateVBOAction); } -SoUpdateVBOAction::~SoUpdateVBOAction() -{ -} +SoUpdateVBOAction::~SoUpdateVBOAction() = default; void SoUpdateVBOAction::finish() { diff --git a/src/Gui/SoFCSelectionContext.cpp b/src/Gui/SoFCSelectionContext.cpp index bc474d7df8..2e5e27c6f8 100644 --- a/src/Gui/SoFCSelectionContext.cpp +++ b/src/Gui/SoFCSelectionContext.cpp @@ -243,8 +243,7 @@ SoFCSelectionCounter::SoFCSelectionCounter() {} -SoFCSelectionCounter::~SoFCSelectionCounter() -{} +SoFCSelectionCounter::~SoFCSelectionCounter() = default; bool SoFCSelectionCounter::checkRenderCache(SoState *state) { diff --git a/src/Gui/SoFCSelectionContext.h b/src/Gui/SoFCSelectionContext.h index 68ee2d2720..5c22d8bc3b 100644 --- a/src/Gui/SoFCSelectionContext.h +++ b/src/Gui/SoFCSelectionContext.h @@ -40,7 +40,7 @@ struct SoFCSelectionContextBase; using SoFCSelectionContextBasePtr = std::shared_ptr; struct GuiExport SoFCSelectionContextBase { - virtual ~SoFCSelectionContextBase() {} + virtual ~SoFCSelectionContextBase() = default; using MergeFunc = int (int status, SoFCSelectionContextBasePtr &output, SoFCSelectionContextBasePtr input, diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 8223a94385..fb7261e462 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -799,9 +799,7 @@ SoHighlightElementAction::SoHighlightElementAction () : _highlight(false), _det( SO_ACTION_CONSTRUCTOR(SoHighlightElementAction); } -SoHighlightElementAction::~SoHighlightElementAction() -{ -} +SoHighlightElementAction::~SoHighlightElementAction() = default; void SoHighlightElementAction::beginTraversal(SoNode *node) { @@ -870,9 +868,7 @@ SoSelectionElementAction::SoSelectionElementAction (Type t, bool secondary) SO_ACTION_CONSTRUCTOR(SoSelectionElementAction); } -SoSelectionElementAction::~SoSelectionElementAction() -{ -} +SoSelectionElementAction::~SoSelectionElementAction() = default; void SoSelectionElementAction::beginTraversal(SoNode *node) { @@ -942,9 +938,7 @@ SoVRMLAction::SoVRMLAction() : overrideMode(true) SO_ACTION_CONSTRUCTOR(SoVRMLAction); } -SoVRMLAction::~SoVRMLAction() -{ -} +SoVRMLAction::~SoVRMLAction() = default; void SoVRMLAction::setOverrideMode(SbBool on) { @@ -1082,9 +1076,7 @@ SoFCSelectionRoot::SoFCSelectionRoot(bool trackCacheMode) SO_NODE_SET_SF_ENUM_TYPE(selectionStyle, SelectStyles); } -SoFCSelectionRoot::~SoFCSelectionRoot() -{ -} +SoFCSelectionRoot::~SoFCSelectionRoot() = default; void SoFCSelectionRoot::initClass() { diff --git a/src/Gui/SoFCVectorizeSVGAction.cpp b/src/Gui/SoFCVectorizeSVGAction.cpp index f3ca2a172b..9054177e73 100644 --- a/src/Gui/SoFCVectorizeSVGAction.cpp +++ b/src/Gui/SoFCVectorizeSVGAction.cpp @@ -137,9 +137,7 @@ public: // ---------------------------------------------------------------- -SoSVGVectorOutput::SoSVGVectorOutput() -{ -} +SoSVGVectorOutput::SoSVGVectorOutput() = default; SoSVGVectorOutput::~SoSVGVectorOutput() { diff --git a/src/Gui/SoFCVectorizeU3DAction.cpp b/src/Gui/SoFCVectorizeU3DAction.cpp index 0e9f59afc0..0ae486ccb6 100644 --- a/src/Gui/SoFCVectorizeU3DAction.cpp +++ b/src/Gui/SoFCVectorizeU3DAction.cpp @@ -138,9 +138,7 @@ public: // ---------------------------------------------------------------- -SoU3DVectorOutput::SoU3DVectorOutput() -{ -} +SoU3DVectorOutput::SoU3DVectorOutput() = default; SoU3DVectorOutput::~SoU3DVectorOutput() { diff --git a/src/Gui/SoMouseWheelEvent.h b/src/Gui/SoMouseWheelEvent.h index 403f7be256..ddaefb56a2 100644 --- a/src/Gui/SoMouseWheelEvent.h +++ b/src/Gui/SoMouseWheelEvent.h @@ -45,7 +45,7 @@ public: //methods /// smaller values come from high-resolution devices like touchpads int getDelta() const {return delta;} void setDelta(int delta) {this->delta = delta;} - ~SoMouseWheelEvent() override {} + ~SoMouseWheelEvent() override = default; private: //data int delta; diff --git a/src/Gui/SoQtOffscreenRendererPy.cpp b/src/Gui/SoQtOffscreenRendererPy.cpp index faa23fbb7e..aebe39802e 100644 --- a/src/Gui/SoQtOffscreenRendererPy.cpp +++ b/src/Gui/SoQtOffscreenRendererPy.cpp @@ -33,9 +33,7 @@ SoQtOffscreenRendererPy::SoQtOffscreenRendererPy(Py::PythonClassInstance* self, this->setViewportRegion(args); } -SoQtOffscreenRendererPy::~SoQtOffscreenRendererPy() -{ -} +SoQtOffscreenRendererPy::~SoQtOffscreenRendererPy() = default; Py::Object SoQtOffscreenRendererPy::repr() { diff --git a/src/Gui/SoTextLabel.cpp b/src/Gui/SoTextLabel.cpp index 5448e3ba2c..9aaf958a81 100644 --- a/src/Gui/SoTextLabel.cpp +++ b/src/Gui/SoTextLabel.cpp @@ -485,6 +485,4 @@ TranslateManip::TranslateManip() setDragger(myDrag); } -TranslateManip::~TranslateManip() -{ -} +TranslateManip::~TranslateManip() = default; diff --git a/src/Gui/SoTextLabel.h b/src/Gui/SoTextLabel.h index 3764a4c244..6581455d6a 100644 --- a/src/Gui/SoTextLabel.h +++ b/src/Gui/SoTextLabel.h @@ -55,7 +55,7 @@ public: SoSFFloat frameSize; protected: - ~SoTextLabel() override {} + ~SoTextLabel() override = default; void GLRender(SoGLRenderAction *action) override; }; @@ -91,7 +91,7 @@ public: SoSFInt32 size; protected: - ~SoStringLabel() override {} + ~SoStringLabel() override = default; void GLRender(SoGLRenderAction *action) override; }; @@ -118,7 +118,7 @@ public: //SoSFImage image; protected: - ~SoFrameLabel() override {} + ~SoFrameLabel() override = default; void notify(SoNotList * list) override; void GLRender(SoGLRenderAction *action) override; diff --git a/src/Gui/SoTouchEvents.h b/src/Gui/SoTouchEvents.h index 809e167628..c7d16c5e94 100644 --- a/src/Gui/SoTouchEvents.h +++ b/src/Gui/SoTouchEvents.h @@ -40,7 +40,7 @@ public: SO_EVENT_INIT_CLASS(SoGestureEvent, SoEvent); } SoGestureEvent() : state(SbGSNoGesture) {} - ~SoGestureEvent() override{} + ~SoGestureEvent() override = default; SbBool isSoGestureEvent(const SoEvent* ev) const; enum SbGestureState { @@ -59,9 +59,9 @@ public: static void initClass(){//needs to be called before the class can be used. Initializes type IDs of the class. SO_EVENT_INIT_CLASS(SoGesturePanEvent, SoGestureEvent); } - SoGesturePanEvent() {} + SoGesturePanEvent() = default; SoGesturePanEvent(QPanGesture *qpan, QWidget *widget); - ~SoGesturePanEvent() override{} + ~SoGesturePanEvent() override = default; SbBool isSoGesturePanEvent(const SoEvent* ev) const; SbVec2f deltaOffset; @@ -79,7 +79,7 @@ public: { } SoGesturePinchEvent(QPinchGesture* qpinch, QWidget* widget); - ~SoGesturePinchEvent() override{} + ~SoGesturePinchEvent() override = default; SbBool isSoGesturePinchEvent(const SoEvent* ev) const; SbVec2f startCenter;//in GL pixel coordinates (from bottom left corner of view area) @@ -104,7 +104,7 @@ public: { } SoGestureSwipeEvent(QSwipeGesture* qwsipe, QWidget *widget); - ~SoGestureSwipeEvent() override{} + ~SoGestureSwipeEvent() override = default; SbBool isSoGestureSwipeEvent(const SoEvent* ev) const; double angle; @@ -117,7 +117,7 @@ class GesturesDevice : public Quarter::InputDevice { public: explicit GesturesDevice(QWidget* widget);//it needs to know the widget to do coordinate translation - ~GesturesDevice() override {} + ~GesturesDevice() override = default; const SoEvent* translateEvent(QEvent* event) override; protected: QWidget* widget; diff --git a/src/Gui/SpinBox.cpp b/src/Gui/SpinBox.cpp index d5bf90dc24..abd3c7076a 100644 --- a/src/Gui/SpinBox.cpp +++ b/src/Gui/SpinBox.cpp @@ -57,9 +57,7 @@ ExpressionSpinBox::ExpressionSpinBox(QAbstractSpinBox* sb) }); } -ExpressionSpinBox::~ExpressionSpinBox() -{ -} +ExpressionSpinBox::~ExpressionSpinBox() = default; void ExpressionSpinBox::bind(const App::ObjectIdentifier &_path) { @@ -239,10 +237,7 @@ UnsignedValidator::UnsignedValidator( uint minimum, uint maximum, QObject * pare t = maximum; } -UnsignedValidator::~UnsignedValidator() -{ - -} +UnsignedValidator::~UnsignedValidator() = default; QValidator::State UnsignedValidator::validate( QString & input, int & ) const { @@ -458,10 +453,7 @@ IntSpinBox::IntSpinBox(QWidget* parent) { } -IntSpinBox::~IntSpinBox() -{ - -} +IntSpinBox::~IntSpinBox() = default; bool IntSpinBox::apply(const std::string& propName) { @@ -505,10 +497,7 @@ DoubleSpinBox::DoubleSpinBox(QWidget* parent) { } -DoubleSpinBox::~DoubleSpinBox() -{ - -} +DoubleSpinBox::~DoubleSpinBox() = default; bool DoubleSpinBox::apply(const std::string& propName) { diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 473d451e11..5878bcb3d6 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -254,9 +254,7 @@ void SplashScreen::drawContents ( QPainter * painter ) AboutDialogFactory* AboutDialogFactory::factory = nullptr; -AboutDialogFactory::~AboutDialogFactory() -{ -} +AboutDialogFactory::~AboutDialogFactory() = default; QDialog *AboutDialogFactory::create(QWidget *parent) const { @@ -901,9 +899,7 @@ LicenseView::LicenseView(QWidget* parent) setCentralWidget(browser); } -LicenseView::~LicenseView() -{ -} +LicenseView::~LicenseView() = default; void LicenseView::setSource(const QUrl& url) { diff --git a/src/Gui/Splashscreen.h b/src/Gui/Splashscreen.h index bc68ccccb4..527d837987 100644 --- a/src/Gui/Splashscreen.h +++ b/src/Gui/Splashscreen.h @@ -57,7 +57,7 @@ class Ui_AboutApplication; class GuiExport AboutDialogFactory { public: - AboutDialogFactory() {} + AboutDialogFactory() = default; virtual ~AboutDialogFactory(); virtual QDialog *create(QWidget *parent) const; diff --git a/src/Gui/SplitView3DInventor.cpp b/src/Gui/SplitView3DInventor.cpp index 784b76c7b5..7f661622ae 100644 --- a/src/Gui/SplitView3DInventor.cpp +++ b/src/Gui/SplitView3DInventor.cpp @@ -291,9 +291,7 @@ AbstractSplitViewPy::AbstractSplitViewPy(AbstractSplitView *vi) { } -AbstractSplitViewPy::~AbstractSplitViewPy() -{ -} +AbstractSplitViewPy::~AbstractSplitViewPy() = default; Py::Object AbstractSplitViewPy::cast_to_base(const Py::Tuple&) { @@ -641,8 +639,6 @@ SplitView3DInventor::SplitView3DInventor(int views, Gui::Document* pcDocument, Q setupSettings(); } -SplitView3DInventor::~SplitView3DInventor() -{ -} +SplitView3DInventor::~SplitView3DInventor() = default; #include "moc_SplitView3DInventor.cpp" diff --git a/src/Gui/TaskDlgRelocation.cpp b/src/Gui/TaskDlgRelocation.cpp index 6a2b6d6845..01d90432c7 100644 --- a/src/Gui/TaskDlgRelocation.cpp +++ b/src/Gui/TaskDlgRelocation.cpp @@ -93,10 +93,7 @@ TaskDlgRelocation::TaskDlgRelocation() { } -TaskDlgRelocation::~TaskDlgRelocation() -{ - -} +TaskDlgRelocation::~TaskDlgRelocation() = default; //==== calls from the TaskView =============================================================== diff --git a/src/Gui/TaskElementColors.cpp b/src/Gui/TaskElementColors.cpp index a0a12969bc..50dceda690 100644 --- a/src/Gui/TaskElementColors.cpp +++ b/src/Gui/TaskElementColors.cpp @@ -549,9 +549,7 @@ TaskElementColors::TaskElementColors(ViewProviderDocumentObject* vp, bool noHide Content.push_back(taskbox); } -TaskElementColors::~TaskElementColors() -{ -} +TaskElementColors::~TaskElementColors() = default; void TaskElementColors::open() { diff --git a/src/Gui/TaskView/TaskDialogPython.cpp b/src/Gui/TaskView/TaskDialogPython.cpp index 6e9e800216..ca3aeba901 100644 --- a/src/Gui/TaskView/TaskDialogPython.cpp +++ b/src/Gui/TaskView/TaskDialogPython.cpp @@ -98,13 +98,9 @@ void ControlPy::init_type() "showModelView()"); } -ControlPy::ControlPy() -{ -} +ControlPy::ControlPy() = default; -ControlPy::~ControlPy() -{ -} +ControlPy::~ControlPy() = default; Py::Object ControlPy::repr() { @@ -363,9 +359,7 @@ TaskDialogPy::TaskDialogPy(TaskDialog* dlg) { } -TaskDialogPy::~TaskDialogPy() -{ -} +TaskDialogPy::~TaskDialogPy() = default; Py::Object TaskDialogPy::repr() { diff --git a/src/Gui/TaskView/TaskEditControl.cpp b/src/Gui/TaskView/TaskEditControl.cpp index 5928d5db30..c6c720ce7a 100644 --- a/src/Gui/TaskView/TaskEditControl.cpp +++ b/src/Gui/TaskView/TaskEditControl.cpp @@ -41,9 +41,7 @@ TaskEditControl::TaskEditControl(QWidget *parent) hboxLayout->addWidget(buttonBox); } -TaskEditControl::~TaskEditControl() -{ -} +TaskEditControl::~TaskEditControl() = default; QDialogButtonBox* TaskEditControl::standardButtons() const { diff --git a/src/Gui/TaskView/TaskOrientation.cpp b/src/Gui/TaskView/TaskOrientation.cpp index df9be47826..d9dd82128f 100644 --- a/src/Gui/TaskView/TaskOrientation.cpp +++ b/src/Gui/TaskView/TaskOrientation.cpp @@ -54,9 +54,7 @@ TaskOrientation::TaskOrientation(App::GeoFeature* obj, QWidget* parent) this, &TaskOrientation::onPreview); } -TaskOrientation::~TaskOrientation() -{ -} +TaskOrientation::~TaskOrientation() = default; void TaskOrientation::open() { diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 17b5422cba..bb14149e8e 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -62,9 +62,7 @@ TaskWidget::TaskWidget( QWidget *parent) } -TaskWidget::~TaskWidget() -{ -} +TaskWidget::~TaskWidget() = default; //************************************************************************** //************************************************************************** @@ -86,9 +84,7 @@ TaskGroup::TaskGroup(const QPixmap & icon, const QString & headerText, QWidget * { } -TaskGroup::~TaskGroup() -{ -} +TaskGroup::~TaskGroup() = default; void TaskGroup::actionEvent (QActionEvent* e) { @@ -157,9 +153,7 @@ QSize TaskBox::minimumSizeHint() const return {qMax(s1.width(), s2.width()), qMax(s1.height(), s2.height())}; } -TaskBox::~TaskBox() -{ -} +TaskBox::~TaskBox() = default; void TaskBox::showEvent(QShowEvent*) { @@ -247,9 +241,7 @@ TaskPanel::TaskPanel(QWidget *parent) { } -TaskPanel::~TaskPanel() -{ -} +TaskPanel::~TaskPanel() = default; QSize TaskPanel::minimumSizeHint() const { diff --git a/src/Gui/TaskView/TaskWatcher.cpp b/src/Gui/TaskView/TaskWatcher.cpp index e0754148f7..a9e6e27ecf 100644 --- a/src/Gui/TaskView/TaskWatcher.cpp +++ b/src/Gui/TaskView/TaskWatcher.cpp @@ -144,9 +144,7 @@ TaskWatcherCommandsEmptySelection::TaskWatcherCommandsEmptySelection(const char* { } -TaskWatcherCommandsEmptySelection::~TaskWatcherCommandsEmptySelection() -{ -} +TaskWatcherCommandsEmptySelection::~TaskWatcherCommandsEmptySelection() = default; //==== implementer =========================================================================== diff --git a/src/Gui/TextEdit.cpp b/src/Gui/TextEdit.cpp index d6c7956a6d..21feb89c9e 100644 --- a/src/Gui/TextEdit.cpp +++ b/src/Gui/TextEdit.cpp @@ -70,9 +70,7 @@ TextEdit::TextEdit(QWidget* parent) } /** Destroys the object and frees any allocated resources */ -TextEdit::~TextEdit() -{ -} +TextEdit::~TextEdit() = default; /** * Set the approproriate item of the completion box or hide it, if needed. @@ -511,9 +509,7 @@ LineMarker::LineMarker(TextEditor* editor) { } -LineMarker::~LineMarker() -{ -} +LineMarker::~LineMarker() = default; QSize LineMarker::sizeHint() const { @@ -540,9 +536,7 @@ CompletionList::CompletionList(QPlainTextEdit* parent) this, &CompletionList::completionItem); } -CompletionList::~CompletionList() -{ -} +CompletionList::~CompletionList() = default; void CompletionList::findCurrentWord(const QString& wordPrefix) { diff --git a/src/Gui/TextureMapping.cpp b/src/Gui/TextureMapping.cpp index 7335eb8bda..866ea980b5 100644 --- a/src/Gui/TextureMapping.cpp +++ b/src/Gui/TextureMapping.cpp @@ -188,10 +188,7 @@ TaskTextureMapping::TaskTextureMapping() Content.push_back(taskbox); } -TaskTextureMapping::~TaskTextureMapping() -{ - // automatically deleted in the sub-class -} +TaskTextureMapping::~TaskTextureMapping() = default; bool TaskTextureMapping::accept() { diff --git a/src/Gui/Thumbnail.cpp b/src/Gui/Thumbnail.cpp index 620d801e8a..016c6e57e3 100644 --- a/src/Gui/Thumbnail.cpp +++ b/src/Gui/Thumbnail.cpp @@ -46,9 +46,7 @@ Thumbnail::Thumbnail(int s) : viewer(nullptr), size(s) { } -Thumbnail::~Thumbnail() -{ -} +Thumbnail::~Thumbnail() = default; void Thumbnail::setViewer(View3DInventorViewer* v) { diff --git a/src/Gui/TinkerCADNavigationStyle.cpp b/src/Gui/TinkerCADNavigationStyle.cpp index cf6d8a23b7..71d09932c4 100644 --- a/src/Gui/TinkerCADNavigationStyle.cpp +++ b/src/Gui/TinkerCADNavigationStyle.cpp @@ -38,13 +38,9 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::TinkerCADNavigationStyle, Gui::UserNavigationStyle) -TinkerCADNavigationStyle::TinkerCADNavigationStyle() -{ -} +TinkerCADNavigationStyle::TinkerCADNavigationStyle() = default; -TinkerCADNavigationStyle::~TinkerCADNavigationStyle() -{ -} +TinkerCADNavigationStyle::~TinkerCADNavigationStyle() = default; const char* TinkerCADNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/ToolBarManager.cpp b/src/Gui/ToolBarManager.cpp index 210ca41f29..dbbdca3f97 100644 --- a/src/Gui/ToolBarManager.cpp +++ b/src/Gui/ToolBarManager.cpp @@ -169,13 +169,9 @@ void ToolBarManager::destruct() _instance = nullptr; } -ToolBarManager::ToolBarManager() -{ -} +ToolBarManager::ToolBarManager() = default; -ToolBarManager::~ToolBarManager() -{ -} +ToolBarManager::~ToolBarManager() = default; namespace { QPointer createActionWidget() diff --git a/src/Gui/ToolBoxManager.cpp b/src/Gui/ToolBoxManager.cpp index e59204bb97..1c7087eb5a 100644 --- a/src/Gui/ToolBoxManager.cpp +++ b/src/Gui/ToolBoxManager.cpp @@ -57,9 +57,7 @@ ToolBoxManager::ToolBoxManager() : _toolBox(nullptr) { } -ToolBoxManager::~ToolBoxManager() -{ -} +ToolBoxManager::~ToolBoxManager() = default; void ToolBoxManager::setToolBox( DockWnd::ToolBox* tb ) { diff --git a/src/Gui/TouchpadNavigationStyle.cpp b/src/Gui/TouchpadNavigationStyle.cpp index 71d81e688d..172a0f7ede 100644 --- a/src/Gui/TouchpadNavigationStyle.cpp +++ b/src/Gui/TouchpadNavigationStyle.cpp @@ -37,13 +37,9 @@ using namespace Gui; TYPESYSTEM_SOURCE(Gui::TouchpadNavigationStyle, Gui::UserNavigationStyle) -TouchpadNavigationStyle::TouchpadNavigationStyle() -{ -} +TouchpadNavigationStyle::TouchpadNavigationStyle() = default; -TouchpadNavigationStyle::~TouchpadNavigationStyle() -{ -} +TouchpadNavigationStyle::~TouchpadNavigationStyle() = default; const char* TouchpadNavigationStyle::mouseButtons(ViewerMode mode) { diff --git a/src/Gui/TransactionObject.cpp b/src/Gui/TransactionObject.cpp index e00f8f89d5..f3706824fa 100644 --- a/src/Gui/TransactionObject.cpp +++ b/src/Gui/TransactionObject.cpp @@ -33,13 +33,9 @@ using namespace Gui; TYPESYSTEM_SOURCE_ABSTRACT(Gui::TransactionViewProvider, App::TransactionObject) -TransactionViewProvider::TransactionViewProvider() -{ -} +TransactionViewProvider::TransactionViewProvider() = default; -TransactionViewProvider::~TransactionViewProvider() -{ -} +TransactionViewProvider::~TransactionViewProvider() = default; void TransactionViewProvider::applyNew(App::Document& Doc, App::TransactionalObject* pcObj) { diff --git a/src/Gui/Transform.cpp b/src/Gui/Transform.cpp index f103195ff8..be98701d83 100644 --- a/src/Gui/Transform.cpp +++ b/src/Gui/Transform.cpp @@ -59,13 +59,9 @@ public: // ---------------------------------------------------------------------------- -TransformStrategy::TransformStrategy() -{ -} +TransformStrategy::TransformStrategy() = default; -TransformStrategy::~TransformStrategy() -{ -} +TransformStrategy::~TransformStrategy() = default; Base::Vector3d TransformStrategy::getRotationCenter() const { @@ -205,9 +201,7 @@ DefaultTransformStrategy::DefaultTransformStrategy(QWidget* w) : widget(w) onSelectionChanged(mod); } -DefaultTransformStrategy::~DefaultTransformStrategy() -{ -} +DefaultTransformStrategy::~DefaultTransformStrategy() = default; std::set DefaultTransformStrategy::transformObjects() const { @@ -439,10 +433,7 @@ TaskTransform::TaskTransform() Content.push_back(taskbox); } -TaskTransform::~TaskTransform() -{ - // automatically deleted in the sub-class -} +TaskTransform::~TaskTransform() = default; void TaskTransform::setTransformStrategy(TransformStrategy* ts) { diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 274e3015aa..0a63be3bf3 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -3095,9 +3095,7 @@ TreePanel::TreePanel(const char* name, QWidget* parent) this, &TreePanel::itemSearch); } -TreePanel::~TreePanel() -{ -} +TreePanel::~TreePanel() = default; void TreePanel::accept() { @@ -3170,9 +3168,7 @@ TreeDockWidget::TreeDockWidget(Gui::Document* pcDocument, QWidget* parent) pLayout->addWidget(panel, 0, 0); } -TreeDockWidget::~TreeDockWidget() -{ -} +TreeDockWidget::~TreeDockWidget() = default; void TreeWidget::selectLinkedObject(App::DocumentObject* linked) { if (!isSelectionAttached() || isSelectionBlocked()) diff --git a/src/Gui/TreeParams.cpp b/src/Gui/TreeParams.cpp index cf462b0bfc..784f0905ce 100644 --- a/src/Gui/TreeParams.cpp +++ b/src/Gui/TreeParams.cpp @@ -159,8 +159,7 @@ public: } // Auto generated code (Tools/params_utils.py:217) - ~TreeParamsP() override { - } + ~TreeParamsP() override = default; // Auto generated code (Tools/params_utils.py:222) void OnChange(Base::Subject &, const char* sReason) override { diff --git a/src/Gui/TreeView.cpp b/src/Gui/TreeView.cpp index dd3261b6e1..39a056a05e 100644 --- a/src/Gui/TreeView.cpp +++ b/src/Gui/TreeView.cpp @@ -50,9 +50,7 @@ TreeView::TreeView(QWidget* parent) this->setMouseTracking(true); // needed for itemEntered() to work } -TreeView::~TreeView() -{ -} +TreeView::~TreeView() = default; void TreeView::mouseDoubleClickEvent (QMouseEvent * event) { diff --git a/src/Gui/UiLoader.cpp b/src/Gui/UiLoader.cpp index bb5dc13433..126661bd24 100644 --- a/src/Gui/UiLoader.cpp +++ b/src/Gui/UiLoader.cpp @@ -505,9 +505,7 @@ std::unique_ptr UiLoader::newInstance(QObject *parent) return rv; } -UiLoader::~UiLoader() -{ -} +UiLoader::~UiLoader() = default; QWidget* UiLoader::createWidget(const QString & className, QWidget * parent, const QString& name) @@ -559,9 +557,7 @@ UiLoaderPy::UiLoaderPy() { } -UiLoaderPy::~UiLoaderPy() -{ -} +UiLoaderPy::~UiLoaderPy() = default; Py::Object UiLoaderPy::repr() { diff --git a/src/Gui/UiLoader.h b/src/Gui/UiLoader.h index 514fa58ef2..85428503bb 100644 --- a/src/Gui/UiLoader.h +++ b/src/Gui/UiLoader.h @@ -91,7 +91,7 @@ class PySideUicModule : public Py::ExtensionModule public: PySideUicModule(); - ~PySideUicModule() override {} + ~PySideUicModule() override = default; private: Py::Object loadUiType(const Py::Tuple& args); diff --git a/src/Gui/Utilities.h b/src/Gui/Utilities.h index 7fd19fe8a9..b9e8019464 100644 --- a/src/Gui/Utilities.h +++ b/src/Gui/Utilities.h @@ -115,7 +115,7 @@ class GuiExport ViewVolumeProjection : public Base::ViewProjMethod { public: explicit ViewVolumeProjection (const SbViewVolume &vv); - ~ViewVolumeProjection() override{} + ~ViewVolumeProjection() override = default; Base::Vector3f operator()(const Base::Vector3f &rclPt) const override; Base::Vector3d operator()(const Base::Vector3d &rclPt) const override; diff --git a/src/Gui/VectorListEditor.cpp b/src/Gui/VectorListEditor.cpp index fe75cbf329..40d584ab51 100644 --- a/src/Gui/VectorListEditor.cpp +++ b/src/Gui/VectorListEditor.cpp @@ -240,9 +240,7 @@ VectorListEditor::VectorListEditor(int decimals, QWidget* parent) connect(ui->tableWidget, &QTableView::clicked, this, &VectorListEditor::clickedRow); } -VectorListEditor::~VectorListEditor() -{ -} +VectorListEditor::~VectorListEditor() = default; void VectorListEditor::setValues(const QList& v) { diff --git a/src/Gui/View3DInventor.h b/src/Gui/View3DInventor.h index 209a7f9c7d..b11c3420b0 100644 --- a/src/Gui/View3DInventor.h +++ b/src/Gui/View3DInventor.h @@ -50,8 +50,7 @@ class GuiExport GLOverlayWidget : public QWidget public: explicit GLOverlayWidget(QWidget* parent=nullptr) : QWidget(parent) {} - ~GLOverlayWidget() override - {} + ~GLOverlayWidget() override = default; virtual void setImage(const QImage& img) { image = img; } void paintEvent(QPaintEvent*) override; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 5746ec3e7a..3b998ab449 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -202,8 +202,8 @@ while the progress bar is running. class Gui::ViewerEventFilter : public QObject { public: - ViewerEventFilter() {} - ~ViewerEventFilter() override {} + ViewerEventFilter() = default; + ~ViewerEventFilter() override = default; bool eventFilter(QObject* obj, QEvent* event) override { // Bug #0000607: Some mice also support horizontal scrolling which however might @@ -245,8 +245,8 @@ public: class SpaceNavigatorDevice : public Quarter::InputDevice { public: - SpaceNavigatorDevice() {} - ~SpaceNavigatorDevice() override {} + SpaceNavigatorDevice() = default; + ~SpaceNavigatorDevice() override = default; const SoEvent* translateEvent(QEvent* event) override { if (event->type() == Spaceball::MotionEvent::MotionEventType) { @@ -2787,9 +2787,7 @@ namespace Gui { startPos = camera->position.getValue(); startRot = camera->orientation.getValue(); } - ~CameraAnimation() override - { - } + ~CameraAnimation() override = default; protected: void updateCurrentValue(const QVariant & value) override { diff --git a/src/Gui/ViewParams.cpp b/src/Gui/ViewParams.cpp index 248d02c5f7..062b97f991 100644 --- a/src/Gui/ViewParams.cpp +++ b/src/Gui/ViewParams.cpp @@ -37,8 +37,7 @@ ViewParams::ViewParams() { FC_VIEW_PARAMS } -ViewParams::~ViewParams() { -} +ViewParams::~ViewParams() = default; void ViewParams::OnChange(Base::Subject &, const char* sReason) { if(!sReason) diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index 48f780903b..6e882e7e19 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -94,7 +94,7 @@ public: // Too bad, VC2013 does not support constructor inheritance //using boost::intrusive_ptr::intrusive_ptr; using inherited = boost::intrusive_ptr; - CoinPtr() {} + CoinPtr() = default; CoinPtr(T *p, bool add_ref=true):inherited(p,add_ref){} template CoinPtr(CoinPtr const &r):inherited(r){} diff --git a/src/Gui/ViewProviderBuilder.cpp b/src/Gui/ViewProviderBuilder.cpp index a1b006347c..478dace621 100644 --- a/src/Gui/ViewProviderBuilder.cpp +++ b/src/Gui/ViewProviderBuilder.cpp @@ -37,13 +37,9 @@ using namespace Gui; std::map ViewProviderBuilder::_prop_to_view; -ViewProviderBuilder::ViewProviderBuilder() -{ -} +ViewProviderBuilder::ViewProviderBuilder() = default; -ViewProviderBuilder::~ViewProviderBuilder() -{ -} +ViewProviderBuilder::~ViewProviderBuilder() = default; void ViewProviderBuilder::add(const Base::Type& prop, const Base::Type& view) { @@ -94,13 +90,9 @@ Gui::SoFCSelection* ViewProviderBuilder::createSelection() // -------------------------------------- -ViewProviderColorBuilder::ViewProviderColorBuilder() -{ -} +ViewProviderColorBuilder::ViewProviderColorBuilder() = default; -ViewProviderColorBuilder::~ViewProviderColorBuilder() -{ -} +ViewProviderColorBuilder::~ViewProviderColorBuilder() = default; void ViewProviderColorBuilder::buildNodes(const App::Property* prop, std::vector& node) const { diff --git a/src/Gui/ViewProviderDocumentObjectGroup.cpp b/src/Gui/ViewProviderDocumentObjectGroup.cpp index 08c0e81b6d..84f9b02dee 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.cpp +++ b/src/Gui/ViewProviderDocumentObjectGroup.cpp @@ -46,9 +46,7 @@ ViewProviderDocumentObjectGroup::ViewProviderDocumentObjectGroup() sPixmap = "folder"; } -ViewProviderDocumentObjectGroup::~ViewProviderDocumentObjectGroup() -{ -} +ViewProviderDocumentObjectGroup::~ViewProviderDocumentObjectGroup() = default; std::vector ViewProviderDocumentObjectGroup::getDisplayModes() const { diff --git a/src/Gui/ViewProviderDragger.cpp b/src/Gui/ViewProviderDragger.cpp index 3c40e1901f..ef612751b3 100644 --- a/src/Gui/ViewProviderDragger.cpp +++ b/src/Gui/ViewProviderDragger.cpp @@ -49,13 +49,9 @@ using namespace Gui; PROPERTY_SOURCE(Gui::ViewProviderDragger, Gui::ViewProviderDocumentObject) -ViewProviderDragger::ViewProviderDragger() -{ -} +ViewProviderDragger::ViewProviderDragger() = default; -ViewProviderDragger::~ViewProviderDragger() -{ -} +ViewProviderDragger::~ViewProviderDragger() = default; void ViewProviderDragger::updateData(const App::Property* prop) { diff --git a/src/Gui/ViewProviderExtension.cpp b/src/Gui/ViewProviderExtension.cpp index e9fb56c0ca..c7ac21bfc3 100644 --- a/src/Gui/ViewProviderExtension.cpp +++ b/src/Gui/ViewProviderExtension.cpp @@ -42,10 +42,7 @@ ViewProviderExtension::ViewProviderExtension() initExtensionType(Gui::ViewProviderExtension::getExtensionClassTypeId()); } -ViewProviderExtension::~ViewProviderExtension() -{ - -} +ViewProviderExtension::~ViewProviderExtension() = default; const ViewProviderDocumentObject* ViewProviderExtension::getExtendedViewProvider() const{ diff --git a/src/Gui/ViewProviderExtern.cpp b/src/Gui/ViewProviderExtern.cpp index f62c8e868b..7e235453be 100644 --- a/src/Gui/ViewProviderExtern.cpp +++ b/src/Gui/ViewProviderExtern.cpp @@ -44,15 +44,9 @@ using namespace Gui; PROPERTY_SOURCE(Gui::ViewProviderExtern, Gui::ViewProvider) -ViewProviderExtern::ViewProviderExtern() -{ +ViewProviderExtern::ViewProviderExtern() = default; -} - -ViewProviderExtern::~ViewProviderExtern() -{ - -} +ViewProviderExtern::~ViewProviderExtern() = default; void ViewProviderExtern::setModeByString(const char* name, const char* ivFragment) { diff --git a/src/Gui/ViewProviderFeature.cpp b/src/Gui/ViewProviderFeature.cpp index d63bf0e0a9..dd8b705b8c 100644 --- a/src/Gui/ViewProviderFeature.cpp +++ b/src/Gui/ViewProviderFeature.cpp @@ -38,9 +38,7 @@ ViewProviderFeature::ViewProviderFeature() ADD_PROPERTY(ColourList,(c)); } -ViewProviderFeature::~ViewProviderFeature() -{ -} +ViewProviderFeature::~ViewProviderFeature() = default; void ViewProviderFeature::attach(App::DocumentObject *pcObj) { diff --git a/src/Gui/ViewProviderGeoFeatureGroup.cpp b/src/Gui/ViewProviderGeoFeatureGroup.cpp index d95645b01e..ca0fd9825c 100644 --- a/src/Gui/ViewProviderGeoFeatureGroup.cpp +++ b/src/Gui/ViewProviderGeoFeatureGroup.cpp @@ -36,9 +36,7 @@ ViewProviderGeoFeatureGroup::ViewProviderGeoFeatureGroup() ViewProviderGeoFeatureGroupExtension::initExtension(this); } -ViewProviderGeoFeatureGroup::~ViewProviderGeoFeatureGroup() -{ -} +ViewProviderGeoFeatureGroup::~ViewProviderGeoFeatureGroup() = default; // Python feature ----------------------------------------------------------------------- diff --git a/src/Gui/ViewProviderGroupExtension.cpp b/src/Gui/ViewProviderGroupExtension.cpp index 8d4929ce4d..55178bf0f1 100644 --- a/src/Gui/ViewProviderGroupExtension.cpp +++ b/src/Gui/ViewProviderGroupExtension.cpp @@ -48,9 +48,7 @@ ViewProviderGroupExtension::ViewProviderGroupExtension() : guard(false) initExtensionType(ViewProviderGroupExtension::getExtensionClassTypeId()); } -ViewProviderGroupExtension::~ViewProviderGroupExtension() -{ -} +ViewProviderGroupExtension::~ViewProviderGroupExtension() = default; bool ViewProviderGroupExtension::extensionCanDragObjects() const { return true; diff --git a/src/Gui/ViewProviderLine.cpp b/src/Gui/ViewProviderLine.cpp index 89fa0aa4aa..37c3482074 100644 --- a/src/Gui/ViewProviderLine.cpp +++ b/src/Gui/ViewProviderLine.cpp @@ -46,8 +46,7 @@ ViewProviderLine::ViewProviderLine() sPixmap = "Std_Axis"; } -ViewProviderLine::~ViewProviderLine() -{ } +ViewProviderLine::~ViewProviderLine() = default; void ViewProviderLine::attach ( App::DocumentObject *obj ) { ViewProviderOriginFeature::attach ( obj ); diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index 308ae5d243..234f67245f 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -209,8 +209,7 @@ public: transformSensor.setData(this); } - ~LinkInfo() { - } + ~LinkInfo() = default; bool checkName(const char *name) const { return isLinked() && strcmp(name,getLinkedName())==0; diff --git a/src/Gui/ViewProviderLink.h b/src/Gui/ViewProviderLink.h index a3277f708c..5ff3edb5ba 100644 --- a/src/Gui/ViewProviderLink.h +++ b/src/Gui/ViewProviderLink.h @@ -66,7 +66,7 @@ public: virtual void onLinkedIconChange(LinkInfoPtr) {} virtual void onLinkedUpdateData(LinkInfoPtr,const App::Property *) {} protected: - virtual ~LinkOwner() {} + virtual ~LinkOwner() = default; }; class GuiExport LinkView : public Base::BaseClass, public LinkOwner { diff --git a/src/Gui/ViewProviderMaterialObject.cpp b/src/Gui/ViewProviderMaterialObject.cpp index 51415a8ac9..a4a3b7bcda 100644 --- a/src/Gui/ViewProviderMaterialObject.cpp +++ b/src/Gui/ViewProviderMaterialObject.cpp @@ -41,14 +41,9 @@ PROPERTY_SOURCE(Gui::ViewProviderMaterialObject, Gui::ViewProviderDocumentObject /** * Creates the view provider for an object group. */ -ViewProviderMaterialObject::ViewProviderMaterialObject() -{ +ViewProviderMaterialObject::ViewProviderMaterialObject() = default; -} - -ViewProviderMaterialObject::~ViewProviderMaterialObject() -{ -} +ViewProviderMaterialObject::~ViewProviderMaterialObject() = default; bool ViewProviderMaterialObject::doubleClicked() { diff --git a/src/Gui/ViewProviderOriginGroup.cpp b/src/Gui/ViewProviderOriginGroup.cpp index 6b680ae227..3bc77727fb 100644 --- a/src/Gui/ViewProviderOriginGroup.cpp +++ b/src/Gui/ViewProviderOriginGroup.cpp @@ -35,6 +35,4 @@ ViewProviderOriginGroup::ViewProviderOriginGroup () initExtension(this); } -ViewProviderOriginGroup::~ViewProviderOriginGroup () -{ -} +ViewProviderOriginGroup::~ViewProviderOriginGroup () = default; diff --git a/src/Gui/ViewProviderPart.cpp b/src/Gui/ViewProviderPart.cpp index b4c8bd6b77..21f8f3d310 100644 --- a/src/Gui/ViewProviderPart.cpp +++ b/src/Gui/ViewProviderPart.cpp @@ -55,8 +55,7 @@ ViewProviderPart::ViewProviderPart() aPixmap = "Geoassembly.svg"; } -ViewProviderPart::~ViewProviderPart() -{ } +ViewProviderPart::~ViewProviderPart() = default; /** * TODO diff --git a/src/Gui/ViewProviderPlacement.cpp b/src/Gui/ViewProviderPlacement.cpp index 4b404570f9..d1f4f6c4f8 100644 --- a/src/Gui/ViewProviderPlacement.cpp +++ b/src/Gui/ViewProviderPlacement.cpp @@ -54,9 +54,7 @@ ViewProviderPlacement::ViewProviderPlacement() OnTopWhenSelected.setValue(1); } -ViewProviderPlacement::~ViewProviderPlacement() -{ -} +ViewProviderPlacement::~ViewProviderPlacement() = default; void ViewProviderPlacement::onChanged(const App::Property* prop) { diff --git a/src/Gui/ViewProviderPlane.cpp b/src/Gui/ViewProviderPlane.cpp index a16d68833f..f983de74a8 100644 --- a/src/Gui/ViewProviderPlane.cpp +++ b/src/Gui/ViewProviderPlane.cpp @@ -50,8 +50,7 @@ ViewProviderPlane::ViewProviderPlane() sPixmap = "Std_Plane"; } -ViewProviderPlane::~ViewProviderPlane() -{ } +ViewProviderPlane::~ViewProviderPlane() = default; void ViewProviderPlane::attach ( App::DocumentObject *obj ) { ViewProviderOriginFeature::attach ( obj ); diff --git a/src/Gui/ViewProviderTextDocument.h b/src/Gui/ViewProviderTextDocument.h index 61505dbed6..c56b4a886d 100644 --- a/src/Gui/ViewProviderTextDocument.h +++ b/src/Gui/ViewProviderTextDocument.h @@ -35,7 +35,7 @@ class GuiExport ViewProviderTextDocument : public ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderTextDocument); public: ViewProviderTextDocument(); - ~ViewProviderTextDocument() override {} + ~ViewProviderTextDocument() override = default; App::PropertyBool ReadOnly; App::PropertyFloat FontSize; diff --git a/src/Gui/WhatsThis.cpp b/src/Gui/WhatsThis.cpp index 0db2264abd..ddbaf01991 100644 --- a/src/Gui/WhatsThis.cpp +++ b/src/Gui/WhatsThis.cpp @@ -50,9 +50,7 @@ StdCmdDescription::StdCmdDescription() sAccel = "F1"; } -StdCmdDescription::~StdCmdDescription() -{ -} +StdCmdDescription::~StdCmdDescription() = default; Action * StdCmdDescription::createAction() { diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 419aed81aa..8b9821e067 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -210,9 +210,7 @@ PrefPageUiProducer::PrefPageUiProducer (const char* filename, const char* group) Gui::Dialog::DlgPreferencesImp::addPage(filename, group); } -PrefPageUiProducer::~PrefPageUiProducer() -{ -} +PrefPageUiProducer::~PrefPageUiProducer() = default; void* PrefPageUiProducer::Produce () const { @@ -382,9 +380,7 @@ ContainerDialog::ContainerDialog( QWidget* templChild ) } /** Destroys the object and frees any allocated resources */ -ContainerDialog::~ContainerDialog() -{ -} +ContainerDialog::~ContainerDialog() = default; // ---------------------------------------------------- diff --git a/src/Gui/WidgetFactory.h b/src/Gui/WidgetFactory.h index 4f840d836f..3a6e5fe76d 100644 --- a/src/Gui/WidgetFactory.h +++ b/src/Gui/WidgetFactory.h @@ -61,8 +61,8 @@ public: private: static WidgetFactoryInst* _pcSingleton; - WidgetFactoryInst(){} - ~WidgetFactoryInst() override{} + WidgetFactoryInst() = default; + ~WidgetFactoryInst() override = default; }; inline WidgetFactoryInst& WidgetFactory() @@ -90,7 +90,7 @@ public: WidgetFactoryInst::instance().AddProducer(cname, this); } - ~WidgetProducer () override{} + ~WidgetProducer () override = default; /** * Creates an instance of the specified widget. @@ -129,7 +129,7 @@ public: } } - ~PrefPageProducer () override{} + ~PrefPageProducer () override = default; /** * Creates an instance of the specified widget. @@ -212,7 +212,7 @@ public: } } - ~CustomPageProducer () override{} + ~CustomPageProducer () override = default; /** * Creates an instance of the specified widget. diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 1b5b0e2574..b5caafe9e9 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -74,9 +74,7 @@ CommandIconView::CommandIconView ( QWidget * parent ) /** * Destroys the icon view and deletes all items. */ -CommandIconView::~CommandIconView () -{ -} +CommandIconView::~CommandIconView () = default; /** * Stores the name of the selected commands for drag and drop. @@ -207,9 +205,7 @@ ActionSelector::ActionSelector(QWidget* parent) setButtonsEnabled(); } -ActionSelector::~ActionSelector() -{ -} +ActionSelector::~ActionSelector() = default; void ActionSelector::setSelectedLabel(const QString& label) { @@ -566,10 +562,7 @@ CheckListDialog::CheckListDialog( QWidget* parent, Qt::WindowFlags fl ) /** * Destroys the object and frees any allocated resources */ -CheckListDialog::~CheckListDialog() -{ - // no need to delete child widgets, Qt does it all for us -} +CheckListDialog::~CheckListDialog() = default; /** * Sets the items to the dialog's list view. By default all items are checkable.. @@ -885,9 +878,7 @@ UrlLabel::UrlLabel(QWidget* parent, Qt::WindowFlags f) setStyleSheet(QStringLiteral("Gui--UrlLabel {color: #0000FF;text-decoration: underline;}")); } -UrlLabel::~UrlLabel() -{ -} +UrlLabel::~UrlLabel() = default; void Gui::UrlLabel::setLaunchExternal(bool l) { @@ -1098,9 +1089,7 @@ LabelButton::LabelButton (QWidget * parent) connect(button, &QPushButton::clicked, this, &LabelButton::buttonClicked); } -LabelButton::~LabelButton() -{ -} +LabelButton::~LabelButton() = default; void LabelButton::resizeEvent(QResizeEvent* e) { @@ -1154,9 +1143,7 @@ ToolTip::ToolTip() : installed(false), hidden(true) { } -ToolTip::~ToolTip() -{ -} +ToolTip::~ToolTip() = default; void ToolTip::installEventFilter() { @@ -1241,9 +1228,7 @@ StatusWidget::StatusWidget(QWidget* parent) gridLayout->addWidget(label, 0, 0, 1, 1); } -StatusWidget::~StatusWidget() -{ -} +StatusWidget::~StatusWidget() = default; void StatusWidget::setStatusText(const QString& s) { @@ -1466,9 +1451,7 @@ LabelEditor::LabelEditor (QWidget * parent) setFocusProxy(lineEdit); } -LabelEditor::~LabelEditor() -{ -} +LabelEditor::~LabelEditor() = default; void LabelEditor::resizeEvent(QResizeEvent* e) { diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index 35526d27c4..03c96967b4 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -205,13 +205,9 @@ using namespace Gui; /// @namespace Gui @class Workbench TYPESYSTEM_SOURCE_ABSTRACT(Gui::Workbench, Base::BaseClass) -Workbench::Workbench() -{ -} +Workbench::Workbench() = default; -Workbench::~Workbench() -{ -} +Workbench::~Workbench() = default; std::string Workbench::name() const { @@ -568,9 +564,7 @@ StdWorkbench::StdWorkbench() { } -StdWorkbench::~StdWorkbench() -{ -} +StdWorkbench::~StdWorkbench() = default; void StdWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const { @@ -865,9 +859,7 @@ BlankWorkbench::BlankWorkbench() { } -BlankWorkbench::~BlankWorkbench() -{ -} +BlankWorkbench::~BlankWorkbench() = default; void BlankWorkbench::activated() { @@ -918,9 +910,7 @@ NoneWorkbench::NoneWorkbench() { } -NoneWorkbench::~NoneWorkbench() -{ -} +NoneWorkbench::~NoneWorkbench() = default; void NoneWorkbench::setupContextMenu(const char* recipient,MenuItem* item) const { @@ -988,9 +978,7 @@ TestWorkbench::TestWorkbench() { } -TestWorkbench::~TestWorkbench() -{ -} +TestWorkbench::~TestWorkbench() = default; MenuItem* TestWorkbench::setupMenuBar() const { @@ -1222,9 +1210,7 @@ PythonBlankWorkbench::PythonBlankWorkbench() _commandBar = new ToolBarItem; } -PythonBlankWorkbench::~PythonBlankWorkbench() -{ -} +PythonBlankWorkbench::~PythonBlankWorkbench() = default; // ----------------------------------------------------------------------- @@ -1239,9 +1225,7 @@ PythonWorkbench::PythonWorkbench() _commandBar = new ToolBarItem; } -PythonWorkbench::~PythonWorkbench() -{ -} +PythonWorkbench::~PythonWorkbench() = default; MenuItem* PythonWorkbench::setupMenuBar() const { diff --git a/src/Gui/WorkbenchFactory.h b/src/Gui/WorkbenchFactory.h index 979292cdb5..b7ef2cdbdb 100644 --- a/src/Gui/WorkbenchFactory.h +++ b/src/Gui/WorkbenchFactory.h @@ -56,8 +56,8 @@ public: private: static WorkbenchFactoryInst* _pcSingleton; - WorkbenchFactoryInst(){} - ~WorkbenchFactoryInst() override{} + WorkbenchFactoryInst() = default; + ~WorkbenchFactoryInst() override = default; }; inline GuiExport WorkbenchFactoryInst& WorkbenchFactory() @@ -76,11 +76,9 @@ template class WorkbenchProducer: public Base::AbstractProducer { public: - WorkbenchProducer () - { - } + WorkbenchProducer() = default; - ~WorkbenchProducer () override{} + ~WorkbenchProducer () override = default; void* Produce () const override { diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 6d588eacbe..4e00b1dbda 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -742,9 +742,7 @@ QString PropertyItem::expressionAsString() const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyStringItem) -PropertyStringItem::PropertyStringItem() -{ -} +PropertyStringItem::PropertyStringItem() = default; QVariant PropertyStringItem::value(const App::Property* prop) const { @@ -796,9 +794,7 @@ QVariant PropertyStringItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFontItem) -PropertyFontItem::PropertyFontItem() -{ -} +PropertyFontItem::PropertyFontItem() = default; QVariant PropertyFontItem::value(const App::Property* prop) const { @@ -861,9 +857,7 @@ QWidget* PropertySeparatorItem::createEditor(QWidget* parent, const QObject* rec PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyIntegerItem) -PropertyIntegerItem::PropertyIntegerItem() -{ -} +PropertyIntegerItem::PropertyIntegerItem() = default; QVariant PropertyIntegerItem::value(const App::Property* prop) const { @@ -928,9 +922,7 @@ QVariant PropertyIntegerItem::toString(const QVariant& v) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyIntegerConstraintItem) -PropertyIntegerConstraintItem::PropertyIntegerConstraintItem() -{ -} +PropertyIntegerConstraintItem::PropertyIntegerConstraintItem() = default; QVariant PropertyIntegerConstraintItem::value(const App::Property* prop) const { @@ -1011,9 +1003,7 @@ QVariant PropertyIntegerConstraintItem::toString(const QVariant& v) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFloatItem) -PropertyFloatItem::PropertyFloatItem() -{ -} +PropertyFloatItem::PropertyFloatItem() = default; QVariant PropertyFloatItem::toString(const QVariant& prop) const { @@ -1080,9 +1070,7 @@ QVariant PropertyFloatItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyUnitItem) -PropertyUnitItem::PropertyUnitItem() -{ -} +PropertyUnitItem::PropertyUnitItem() = default; QVariant PropertyUnitItem::toString(const QVariant& prop) const { @@ -1155,10 +1143,7 @@ QVariant PropertyUnitItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyUnitConstraintItem) -PropertyUnitConstraintItem::PropertyUnitConstraintItem() -{ - -} +PropertyUnitConstraintItem::PropertyUnitConstraintItem() = default; void PropertyUnitConstraintItem::setEditorData(QWidget *editor, const QVariant& data) const { @@ -1191,9 +1176,7 @@ void PropertyUnitConstraintItem::setEditorData(QWidget *editor, const QVariant& PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFloatConstraintItem) -PropertyFloatConstraintItem::PropertyFloatConstraintItem() -{ -} +PropertyFloatConstraintItem::PropertyFloatConstraintItem() = default; QVariant PropertyFloatConstraintItem::toString(const QVariant& prop) const { @@ -1281,9 +1264,7 @@ PropertyPrecisionItem::PropertyPrecisionItem() PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyAngleItem) -PropertyAngleItem::PropertyAngleItem() -{ -} +PropertyAngleItem::PropertyAngleItem() = default; void PropertyAngleItem::setEditorData(QWidget *editor, const QVariant& data) const { @@ -1299,9 +1280,7 @@ QVariant PropertyAngleItem::toString(const QVariant& prop) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyBoolItem) -PropertyBoolItem::PropertyBoolItem() -{ -} +PropertyBoolItem::PropertyBoolItem() = default; QVariant PropertyBoolItem::value(const App::Property* prop) const { @@ -1530,9 +1509,7 @@ PropertyEditorWidget::PropertyEditorWidget (QWidget * parent) // setFocusProxy(lineEdit); } -PropertyEditorWidget::~PropertyEditorWidget() -{ -} +PropertyEditorWidget::~PropertyEditorWidget() = default; void PropertyEditorWidget::resizeEvent(QResizeEvent* e) { @@ -1603,9 +1580,7 @@ void VectorListWidget::showValue(const QVariant& d) PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyVectorListItem) -PropertyVectorListItem::PropertyVectorListItem() -{ -} +PropertyVectorListItem::PropertyVectorListItem() = default; QVariant PropertyVectorListItem::toString(const QVariant& prop) const { @@ -2275,9 +2250,7 @@ PropertyRotationItem::PropertyRotationItem() this->appendChild(m_d); } -PropertyRotationItem::~PropertyRotationItem() -{ -} +PropertyRotationItem::~PropertyRotationItem() = default; Base::Quantity PropertyRotationItem::getAngle() const { @@ -2460,9 +2433,7 @@ PlacementEditor::PlacementEditor(const QString& name, QWidget * parent) propertyname.replace(QLatin1String(" "), QLatin1String("")); } -PlacementEditor::~PlacementEditor() -{ -} +PlacementEditor::~PlacementEditor() = default; void PlacementEditor::browse() { @@ -2546,9 +2517,7 @@ PropertyPlacementItem::PropertyPlacementItem() this->appendChild(m_p); } -PropertyPlacementItem::~PropertyPlacementItem() -{ -} +PropertyPlacementItem::~PropertyPlacementItem() = default; Base::Quantity PropertyPlacementItem::getAngle() const { @@ -3002,9 +2971,7 @@ QVariant PropertyEnumItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyStringListItem) -PropertyStringListItem::PropertyStringListItem() -{ -} +PropertyStringListItem::PropertyStringListItem() = default; QWidget* PropertyStringListItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const { @@ -3081,9 +3048,7 @@ void PropertyStringListItem::setValue(const QVariant& value) PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFloatListItem) -PropertyFloatListItem::PropertyFloatListItem() -{ -} +PropertyFloatListItem::PropertyFloatListItem() = default; QWidget* PropertyFloatListItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const { @@ -3155,9 +3120,7 @@ void PropertyFloatListItem::setValue(const QVariant& value) PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyIntegerListItem) -PropertyIntegerListItem::PropertyIntegerListItem() -{ -} +PropertyIntegerListItem::PropertyIntegerListItem() = default; QWidget* PropertyIntegerListItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const { @@ -3230,9 +3193,7 @@ void PropertyIntegerListItem::setValue(const QVariant& value) PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyColorItem) -PropertyColorItem::PropertyColorItem() -{ -} +PropertyColorItem::PropertyColorItem() = default; QVariant PropertyColorItem::decoration(const QVariant& value) const { @@ -3349,9 +3310,7 @@ PropertyMaterialItem::PropertyMaterialItem() this->appendChild(transparency); } -PropertyMaterialItem::~PropertyMaterialItem() -{ -} +PropertyMaterialItem::~PropertyMaterialItem() = default; void PropertyMaterialItem::propertyBound() { @@ -3662,9 +3621,7 @@ PropertyMaterialListItem::PropertyMaterialListItem() this->appendChild(transparency); } -PropertyMaterialListItem::~PropertyMaterialListItem() -{ -} +PropertyMaterialListItem::~PropertyMaterialListItem() = default; void PropertyMaterialListItem::propertyBound() { @@ -4093,9 +4050,7 @@ QVariant PropertyMaterialListItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFileItem) -PropertyFileItem::PropertyFileItem() -{ -} +PropertyFileItem::PropertyFileItem() = default; QVariant PropertyFileItem::value(const App::Property* prop) const { @@ -4152,9 +4107,7 @@ QVariant PropertyFileItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyPathItem) -PropertyPathItem::PropertyPathItem() -{ -} +PropertyPathItem::PropertyPathItem() = default; QVariant PropertyPathItem::value(const App::Property* prop) const { @@ -4204,9 +4157,7 @@ QVariant PropertyPathItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyTransientFileItem) -PropertyTransientFileItem::PropertyTransientFileItem() -{ -} +PropertyTransientFileItem::PropertyTransientFileItem() = default; QVariant PropertyTransientFileItem::value(const App::Property* prop) const { @@ -4267,9 +4218,7 @@ LinkSelection::LinkSelection(const App::SubObjectT &link) : link(link) { } -LinkSelection::~LinkSelection() -{ -} +LinkSelection::~LinkSelection() = default; void LinkSelection::select() { @@ -4320,9 +4269,7 @@ LinkLabel::LinkLabel (QWidget * parent, const App::Property *prop) this, &LinkLabel::onEditClicked); } -LinkLabel::~LinkLabel() -{ -} +LinkLabel::~LinkLabel() = default; void LinkLabel::updatePropertyLink() { @@ -4405,9 +4352,7 @@ void LinkLabel::resizeEvent(QResizeEvent* e) PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyLinkItem) -PropertyLinkItem::PropertyLinkItem() -{ -} +PropertyLinkItem::PropertyLinkItem() = default; QVariant PropertyLinkItem::toString(const QVariant& prop) const { @@ -4488,18 +4433,11 @@ QVariant PropertyLinkItem::editorData(QWidget *editor) const PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyLinkListItem) -PropertyLinkListItem::PropertyLinkListItem() -{ -} +PropertyLinkListItem::PropertyLinkListItem() = default; +PropertyItemEditorFactory::PropertyItemEditorFactory() = default; -PropertyItemEditorFactory::PropertyItemEditorFactory() -{ -} - -PropertyItemEditorFactory::~PropertyItemEditorFactory() -{ -} +PropertyItemEditorFactory::~PropertyItemEditorFactory() = default; QWidget * PropertyItemEditorFactory::createEditor (int /*type*/, QWidget * /*parent*/) const { diff --git a/src/Gui/propertyeditor/PropertyItem.h b/src/Gui/propertyeditor/PropertyItem.h index 0f2da7cfbe..88bf0d32e4 100644 --- a/src/Gui/propertyeditor/PropertyItem.h +++ b/src/Gui/propertyeditor/PropertyItem.h @@ -97,8 +97,8 @@ public: private: static PropertyItemFactory* _singleton; - PropertyItemFactory(){} - ~PropertyItemFactory() override{} + PropertyItemFactory() = default; + ~PropertyItemFactory() override = default; }; template @@ -108,8 +108,7 @@ public: explicit PropertyItemProducer(const char* className) { PropertyItemFactory::instance().AddProducer(className, this); } - ~PropertyItemProducer() override { - } + ~PropertyItemProducer() override = default; void* Produce () const override { return CLASS::create(); } diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index e04070a9d7..33a2c6995b 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -49,9 +49,7 @@ PropertyItemDelegate::PropertyItemDelegate(QObject* parent) { } -PropertyItemDelegate::~PropertyItemDelegate() -{ -} +PropertyItemDelegate::~PropertyItemDelegate() = default; QSize PropertyItemDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const {