CQuickplayPropertyEditor: Make use of in-class initializers where applicable
This commit is contained in:
parent
7e44839404
commit
8ae17a9f1b
|
@ -9,9 +9,9 @@
|
||||||
class CDolphinValidator : public QValidator
|
class CDolphinValidator : public QValidator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CDolphinValidator(QObject* pParent = 0) : QValidator(pParent) {}
|
explicit CDolphinValidator(QObject* pParent = nullptr) : QValidator(pParent) {}
|
||||||
|
|
||||||
virtual QValidator::State validate(QString& Input, int& Pos) const override
|
QValidator::State validate(QString& Input, int& Pos) const override
|
||||||
{
|
{
|
||||||
return PathValid(Input) ? QValidator::Acceptable : QValidator::Invalid;
|
return PathValid(Input) ? QValidator::Acceptable : QValidator::Invalid;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public:
|
||||||
/** CQuickplayPropertyEditor functions */
|
/** CQuickplayPropertyEditor functions */
|
||||||
CQuickplayPropertyEditor::CQuickplayPropertyEditor(SQuickplayParameters& Parameters, QWidget* pParent /*= 0*/)
|
CQuickplayPropertyEditor::CQuickplayPropertyEditor(SQuickplayParameters& Parameters, QWidget* pParent /*= 0*/)
|
||||||
: QMenu(pParent)
|
: QMenu(pParent)
|
||||||
, mpUI(new Ui::CQuickplayPropertyEditor)
|
, mpUI(std::make_unique<Ui::CQuickplayPropertyEditor>())
|
||||||
, mParameters(Parameters)
|
, mParameters(Parameters)
|
||||||
{
|
{
|
||||||
mpUI->setupUi(this);
|
mpUI->setupUi(this);
|
||||||
|
@ -67,10 +67,7 @@ CQuickplayPropertyEditor::CQuickplayPropertyEditor(SQuickplayParameters& Paramet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CQuickplayPropertyEditor::~CQuickplayPropertyEditor()
|
CQuickplayPropertyEditor::~CQuickplayPropertyEditor() = default;
|
||||||
{
|
|
||||||
delete mpUI;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CQuickplayPropertyEditor::BrowseForDolphin()
|
void CQuickplayPropertyEditor::BrowseForDolphin()
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include <Core/Resource/CWorld.h>
|
#include <Core/Resource/CWorld.h>
|
||||||
#include <Core/Resource/Area/CGameArea.h>
|
#include <Core/Resource/Area/CGameArea.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CQuickplayPropertyEditor;
|
class CQuickplayPropertyEditor;
|
||||||
}
|
}
|
||||||
|
@ -19,12 +21,12 @@ class CQuickplayPropertyEditor : public QMenu
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Ui::CQuickplayPropertyEditor* mpUI;
|
std::unique_ptr<Ui::CQuickplayPropertyEditor> mpUI;
|
||||||
SQuickplayParameters& mParameters;
|
SQuickplayParameters& mParameters;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CQuickplayPropertyEditor(SQuickplayParameters& Parameters, QWidget* pParent = 0);
|
explicit CQuickplayPropertyEditor(SQuickplayParameters& Parameters, QWidget* pParent = nullptr);
|
||||||
~CQuickplayPropertyEditor();
|
~CQuickplayPropertyEditor() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void BrowseForDolphin();
|
void BrowseForDolphin();
|
||||||
|
|
Loading…
Reference in New Issue