CSelectResourcePanel: Make use of in-class initializers where applicable
This commit is contained in:
parent
5a041dd474
commit
c96ed14062
|
@ -7,7 +7,7 @@
|
|||
|
||||
CSelectResourcePanel::CSelectResourcePanel(CResourceSelector *pSelector)
|
||||
: QFrame(pSelector)
|
||||
, mpUI(new Ui::CSelectResourcePanel)
|
||||
, mpUI(std::make_unique<Ui::CSelectResourcePanel>())
|
||||
, mpSelector(pSelector)
|
||||
, mModel(pSelector)
|
||||
{
|
||||
|
@ -69,10 +69,7 @@ CSelectResourcePanel::CSelectResourcePanel(CResourceSelector *pSelector)
|
|||
mpUI->SearchBar->setFocus();
|
||||
}
|
||||
|
||||
CSelectResourcePanel::~CSelectResourcePanel()
|
||||
{
|
||||
delete mpUI;
|
||||
}
|
||||
CSelectResourcePanel::~CSelectResourcePanel() = default;
|
||||
|
||||
// Slots
|
||||
void CSelectResourcePanel::FocusChanged(QWidget*, QWidget *pNew)
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "CFilteredResourceModel.h"
|
||||
#include "CResourceSelector.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui {
|
||||
class CSelectResourcePanel;
|
||||
}
|
||||
|
@ -12,7 +14,7 @@ class CSelectResourcePanel;
|
|||
class CSelectResourcePanel : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
Ui::CSelectResourcePanel *mpUI;
|
||||
std::unique_ptr<Ui::CSelectResourcePanel> mpUI;
|
||||
CResourceSelector *mpSelector;
|
||||
|
||||
CFilteredResourceModel mModel;
|
||||
|
@ -20,7 +22,7 @@ class CSelectResourcePanel : public QFrame
|
|||
|
||||
public:
|
||||
explicit CSelectResourcePanel(CResourceSelector *pSelector);
|
||||
~CSelectResourcePanel();
|
||||
~CSelectResourcePanel() override;
|
||||
|
||||
public slots:
|
||||
void FocusChanged(QWidget *pOld, QWidget *pNew);
|
||||
|
|
Loading…
Reference in New Issue