Skip to content

Commit

Permalink
Use = default for trivial contructors/destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
luis-pereira committed Dec 1, 2020
1 parent 9c436cb commit 5b09f71
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 88 deletions.
4 changes: 1 addition & 3 deletions panel/lxqtpanelpluginconfigdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ LXQtPanelPluginConfigDialog::LXQtPanelPluginConfigDialog(PluginSettings &setting
/************************************************
************************************************/
LXQtPanelPluginConfigDialog::~LXQtPanelPluginConfigDialog()
{
}
LXQtPanelPluginConfigDialog::~LXQtPanelPluginConfigDialog() = default;


/************************************************
Expand Down
4 changes: 1 addition & 3 deletions panel/pluginmoveprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ PluginMoveProcessor::PluginMoveProcessor(LXQtPanelLayout *layout, Plugin *plugin
/************************************************
************************************************/
PluginMoveProcessor::~PluginMoveProcessor()
{
}
PluginMoveProcessor::~PluginMoveProcessor() = default;


/************************************************
Expand Down
4 changes: 1 addition & 3 deletions panel/pluginsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ QString PluginSettings::group() const
return d->mGroup;
}

PluginSettings::~PluginSettings()
{
}
PluginSettings::~PluginSettings() = default;

QVariant PluginSettings::value(const QString &key, const QVariant &defaultValue) const
{
Expand Down
8 changes: 2 additions & 6 deletions plugin-colorpicker/colorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ ColorPicker::ColorPicker(const ILXQtPanelPluginStartupInfo &startupInfo) :
}


ColorPicker::~ColorPicker()
{
}
ColorPicker::~ColorPicker() = default;


void ColorPicker::realign()
Expand Down Expand Up @@ -75,9 +73,7 @@ ColorPickerWidget::ColorPickerWidget(QWidget *parent):
}


ColorPickerWidget::~ColorPickerWidget()
{
}
ColorPickerWidget::~ColorPickerWidget() = default;


void ColorPickerWidget::mouseReleaseEvent(QMouseEvent *event)
Expand Down
4 changes: 1 addition & 3 deletions plugin-desktopswitch/desktopswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ bool DesktopSwitch::isWindowHighlightable(WId window)
return !NET::typeMatchesMask(info.windowType(NET::AllTypesMask), normalFlag);
}

DesktopSwitch::~DesktopSwitch()
{
}
DesktopSwitch::~DesktopSwitch() = default;

void DesktopSwitch::setDesktop(int desktop)
{
Expand Down
3 changes: 1 addition & 2 deletions plugin-kbindicator/kbindicator-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class LXQtKbIndicatorPlugin: public QObject, public ILXQtPanelPluginLibrary
Q_PLUGIN_METADATA(IID "lxqt.org/Panel/PluginInterface/3.0")
Q_INTERFACES(ILXQtPanelPluginLibrary)
public:
~LXQtKbIndicatorPlugin() override
{}
~LXQtKbIndicatorPlugin() override = default;

ILXQtPanelPlugin *instance(const ILXQtPanelPluginStartupInfo &startupInfo) const override
{
Expand Down
3 changes: 1 addition & 2 deletions plugin-kbindicator/src/content.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ Content::Content(bool layoutEnabled):
box->addWidget(m_layout, 0, Qt::AlignCenter);
}

Content::~Content()
{}
Content::~Content() = default;

bool Content::setup()
{
Expand Down
9 changes: 3 additions & 6 deletions plugin-kbindicator/src/kbdkeeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ KbdKeeper::KbdKeeper(const KbdLayout & layout, KeeperType type):
m_layout.readKbdInfo(m_info);
}

KbdKeeper::~KbdKeeper()
{}
KbdKeeper::~KbdKeeper() = default;

bool KbdKeeper::setup()
{
Expand Down Expand Up @@ -89,8 +88,7 @@ WinKbdKeeper::WinKbdKeeper(const KbdLayout & layout):
KbdKeeper(layout, KeeperType::Window)
{}

WinKbdKeeper::~WinKbdKeeper()
{}
WinKbdKeeper::~WinKbdKeeper() = default;

void WinKbdKeeper::layoutChanged(uint group)
{
Expand Down Expand Up @@ -137,8 +135,7 @@ AppKbdKeeper::AppKbdKeeper(const KbdLayout & layout):
KbdKeeper(layout, KeeperType::Window)
{}

AppKbdKeeper::~AppKbdKeeper()
{}
AppKbdKeeper::~AppKbdKeeper() = default;

void AppKbdKeeper::layoutChanged(uint group)
{
Expand Down
3 changes: 1 addition & 2 deletions plugin-kbindicator/src/kbdstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ KbdState::KbdState(const ILXQtPanelPluginStartupInfo &startupInfo):
settingsChanged();
}

KbdState::~KbdState()
{}
KbdState::~KbdState() = default;

void KbdState::settingsChanged()
{
Expand Down
3 changes: 1 addition & 2 deletions plugin-kbindicator/src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
#include <QSettings>
#include "settings.h"

Settings::Settings()
{}
Settings::Settings() = default;

Settings &Settings::instance()
{
Expand Down
3 changes: 1 addition & 2 deletions plugin-kbindicator/src/x11/kbdlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ X11Kbd::X11Kbd():
m_priv(new pimpl::X11Kbd(this))
{}

X11Kbd::~X11Kbd()
{}
X11Kbd::~X11Kbd() = default;

bool X11Kbd::init()
{ return m_priv->init(); }
Expand Down
3 changes: 1 addition & 2 deletions plugin-mainmenu/actionview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ FilterProxyModel::FilterProxyModel(QObject* parent) :
QSortFilterProxyModel(parent) {
}

FilterProxyModel::~FilterProxyModel() {
}
FilterProxyModel::~FilterProxyModel() = default;

bool FilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const {
if (filterStr_.isEmpty())
Expand Down
4 changes: 1 addition & 3 deletions plugin-mount/actions/deviceaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ DeviceAction::DeviceAction(LXQtMountPlugin *plugin, QObject *parent)
{
}

DeviceAction::~DeviceAction()
{
}
DeviceAction::~DeviceAction() = default;

DeviceAction *DeviceAction::create(ActionId id, LXQtMountPlugin *plugin, QObject *parent)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-mount/actions/ejectaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ EjectAction::EjectAction(LXQtMountPlugin *plugin, QObject *parent)
{
}

EjectAction::~EjectAction()
{
}
EjectAction::~EjectAction() = default;

EjectAction *EjectAction::create(ActionId id, LXQtMountPlugin *plugin, QObject *parent)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-mount/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,4 @@ Button::Button(QWidget * parent) :
setAutoRaise(true);
}

Button::~Button()
{
}
Button::~Button() = default;
4 changes: 1 addition & 3 deletions plugin-mount/menudiskitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ MenuDiskItem::MenuDiskItem(Solid::Device device, Popup *popup):
updateMountStatus();
}

MenuDiskItem::~MenuDiskItem()
{
}
MenuDiskItem::~MenuDiskItem() = default;

void MenuDiskItem::setMountStatus(bool mounted)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-networkmonitor/lxqtnetworkmonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ LXQtNetworkMonitor::LXQtNetworkMonitor(ILXQtPanelPlugin *plugin, QWidget* parent
settingsChanged();
}

LXQtNetworkMonitor::~LXQtNetworkMonitor()
{
}
LXQtNetworkMonitor::~LXQtNetworkMonitor() = default;

void LXQtNetworkMonitor::resizeEvent(QResizeEvent *)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-quicklaunch/lxqtquicklaunch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ LXQtQuickLaunch::LXQtQuickLaunch(ILXQtPanelPlugin *plugin, QWidget* parent) :
}


LXQtQuickLaunch::~LXQtQuickLaunch()
{
}
LXQtQuickLaunch::~LXQtQuickLaunch() = default;


int LXQtQuickLaunch::indexOfButton(QuickLaunchButton* button) const
Expand Down
6 changes: 1 addition & 5 deletions plugin-quicklaunch/quicklaunchbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ QuickLaunchButton::QuickLaunchButton(QuickLaunchAction * act, ILXQtPanelPlugin *
this, SLOT(this_customContextMenuRequested(const QPoint&)));
}


QuickLaunchButton::~QuickLaunchButton()
{
//m_act->deleteLater();
}
QuickLaunchButton::~QuickLaunchButton() = default;


QHash<QString,QString> QuickLaunchButton::settingsMap()
Expand Down
4 changes: 1 addition & 3 deletions plugin-sensors/lxqtsensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ LXQtSensors::LXQtSensors(ILXQtPanelPlugin *plugin, QWidget* parent):
}


LXQtSensors::~LXQtSensors()
{
}
LXQtSensors::~LXQtSensors() = default;


void LXQtSensors::updateSensorReadings()
Expand Down
4 changes: 1 addition & 3 deletions plugin-statusnotifier/statusnotifieriteminterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,5 @@ StatusNotifierItemInterface::StatusNotifierItemInterface(const QString &service,
{
}

StatusNotifierItemInterface::~StatusNotifierItemInterface()
{
}
StatusNotifierItemInterface::~StatusNotifierItemInterface() = default;

9 changes: 2 additions & 7 deletions plugin-sysstat/lxqtsysstat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ LXQtSysStatTitle::LXQtSysStatTitle(QWidget *parent):

}

LXQtSysStatTitle::~LXQtSysStatTitle()
{

}
LXQtSysStatTitle::~LXQtSysStatTitle() = default;

bool LXQtSysStatTitle::event(QEvent *e)
{
Expand All @@ -125,9 +122,7 @@ LXQtSysStatContent::LXQtSysStatContent(ILXQtPanelPlugin *plugin, QWidget *parent
setObjectName(QStringLiteral("SysStat_Graph"));
}

LXQtSysStatContent::~LXQtSysStatContent()
{
}
LXQtSysStatContent::~LXQtSysStatContent() = default;


// I don't like macros very much, but writing dozen similar functions is much much worse.
Expand Down
4 changes: 1 addition & 3 deletions plugin-taskbar/lxqtgrouppopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ LXQtGroupPopup::LXQtGroupPopup(LXQtTaskGroup *group):
mCloseTimer.setInterval(400);
}

LXQtGroupPopup::~LXQtGroupPopup()
{
}
LXQtGroupPopup::~LXQtGroupPopup() = default;

void LXQtGroupPopup::dropEvent(QDropEvent *event)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-taskbar/lxqttaskbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ LXQtTaskButton::LXQtTaskButton(const WId window, LXQtTaskBar * taskbar, QWidget
/************************************************
************************************************/
LXQtTaskButton::~LXQtTaskButton()
{
}
LXQtTaskButton::~LXQtTaskButton() = default;

/************************************************
Expand Down
2 changes: 1 addition & 1 deletion plugin-tray/lxqttrayconfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ LXQtTrayConfiguration::LXQtTrayConfiguration(PluginSettings *settings, QWidget *
connect(ui->buttons, &QDialogButtonBox::clicked, this, &LXQtTrayConfiguration::dialogButtonsAction);
}

LXQtTrayConfiguration::~LXQtTrayConfiguration() {}
LXQtTrayConfiguration::~LXQtTrayConfiguration() = default;

void LXQtTrayConfiguration::loadSettings()
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-tray/xfitman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ bool XfitMan::getClientIcon(Window _wid, QIcon *icon) const
/**
* @brief destructor
*/
XfitMan::~XfitMan()
{
}
XfitMan::~XfitMan() = default;

/**
* @brief returns a windowname and sets _nameSource to the finally used Atom
Expand Down
4 changes: 1 addition & 3 deletions plugin-volume/audiodevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ AudioDevice::AudioDevice(AudioDeviceType t, AudioEngine *engine, QObject *parent
{
}

AudioDevice::~AudioDevice()
{
}
AudioDevice::~AudioDevice() = default;

void AudioDevice::setName(const QString &name)
{
Expand Down
4 changes: 1 addition & 3 deletions plugin-volume/volumebutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ VolumeButton::VolumeButton(ILXQtPanelPlugin *plugin, QWidget* parent):
connect(m_volumePopup, SIGNAL(stockIconChanged(QString)), this, SLOT(handleStockIconChanged(QString)));
}

VolumeButton::~VolumeButton()
{
}
VolumeButton::~VolumeButton() = default;

void VolumeButton::setShowOnClicked(bool state)
{
Expand Down

0 comments on commit 5b09f71

Please sign in to comment.