style: constParameter - Parameter 'widget' can be declared with const
#include<QDialog>#include<QWidget>classViewWidget:publicQWidget{public:explicitViewWidget(QWidget&wid){wid.setEnabled(false);wid.setAttribute(Qt::WA_DeleteOnClose);}};classViewDialog:publicQDialog{public:explicitViewDialog(QWidget&widget){newViewWidget(widget);// deleted on close gets set}};
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
style: constParameter - Parameter 'widget' can be declared with const