mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 11:30:04 +00:00
Use default destructor, and add move/copy operators to settings impls
This commit is contained in:
parent
f84a86a3a3
commit
05c05fec5c
17 changed files with 90 additions and 20 deletions
|
|
@ -135,7 +135,12 @@ public:
|
||||||
|
|
||||||
SetDefaultLineData(inactive_, kInactivePalettes_.at(phenomenon));
|
SetDefaultLineData(inactive_, kInactivePalettes_.at(phenomenon));
|
||||||
}
|
}
|
||||||
~Impl() {}
|
|
||||||
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
static void SetDefaultLineData(LineSettings& lineSettings,
|
static void SetDefaultLineData(LineSettings& lineSettings,
|
||||||
const LineData& lineData);
|
const LineData& lineData);
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,11 @@ public:
|
||||||
SettingsVariable<bool> {"alert_disabled"});
|
SettingsVariable<bool> {"alert_disabled"});
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<std::string> alertSoundFile_ {"alert_sound_file"};
|
SettingsVariable<std::string> alertSoundFile_ {"alert_sound_file"};
|
||||||
SettingsVariable<std::string> alertLocationMethod_ {"alert_location_method"};
|
SettingsVariable<std::string> alertLocationMethod_ {"alert_location_method"};
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,11 @@ public:
|
||||||
{ return QUrl {QString::fromStdString(value)}.isValid(); });
|
{ return QUrl {QString::fromStdString(value)}.isValid(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<bool> antiAliasingEnabled_ {"anti_aliasing_enabled"};
|
SettingsVariable<bool> antiAliasingEnabled_ {"anti_aliasing_enabled"};
|
||||||
SettingsVariable<std::string> clockFormat_ {"clock_format"};
|
SettingsVariable<std::string> clockFormat_ {"clock_format"};
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,11 @@ public:
|
||||||
SettingsVariable<std::string> {"?"});
|
SettingsVariable<std::string> {"?"});
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
std::unordered_map<types::Hotkey, SettingsVariable<std::string>> hotkey_ {};
|
std::unordered_map<types::Hotkey, SettingsVariable<std::string>> hotkey_ {};
|
||||||
std::vector<SettingsVariableBase*> variables_ {};
|
std::vector<SettingsVariableBase*> variables_ {};
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,12 @@ public:
|
||||||
highlightColor_.SetValidator(&util::color::ValidateArgbString);
|
highlightColor_.SetValidator(&util::color::ValidateArgbString);
|
||||||
borderColor_.SetValidator(&util::color::ValidateArgbString);
|
borderColor_.SetValidator(&util::color::ValidateArgbString);
|
||||||
}
|
}
|
||||||
~Impl() {}
|
|
||||||
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<std::string> lineColor_ {"line_color"};
|
SettingsVariable<std::string> lineColor_ {"line_color"};
|
||||||
SettingsVariable<std::string> highlightColor_ {"highlight_color"};
|
SettingsVariable<std::string> highlightColor_ {"highlight_color"};
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,11 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
void SetDefaults(std::size_t i)
|
void SetDefaults(std::size_t i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,11 @@ public:
|
||||||
InitializeAlerts();
|
InitializeAlerts();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
void InitializeColorTables();
|
void InitializeColorTables();
|
||||||
void InitializeLegacyAlerts();
|
void InitializeLegacyAlerts();
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,11 @@ public:
|
||||||
// NOLINTEND(cppcoreguidelines-avoid-magic-numbers)
|
// NOLINTEND(cppcoreguidelines-avoid-magic-numbers)
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<bool> showSmoothedRangeFolding_ {
|
SettingsVariable<bool> showSmoothedRangeFolding_ {
|
||||||
"show_smoothed_range_folding"};
|
"show_smoothed_range_folding"};
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ class SettingsCategory::Impl
|
||||||
public:
|
public:
|
||||||
explicit Impl(const std::string& name) : name_ {name} {}
|
explicit Impl(const std::string& name) : name_ {name} {}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
void ConnectSubcategory(SettingsCategory& category);
|
void ConnectSubcategory(SettingsCategory& category);
|
||||||
void ConnectVariable(SettingsVariableBase* variable);
|
void ConnectVariable(SettingsVariableBase* variable);
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,13 @@ template<class Container>
|
||||||
class SettingsContainer<Container>::Impl
|
class SettingsContainer<Container>::Impl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Impl() {}
|
explicit Impl() = default;
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
T elementDefault_ {};
|
T elementDefault_ {};
|
||||||
std::optional<T> elementMinimum_ {};
|
std::optional<T> elementMinimum_ {};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,11 @@ public:
|
||||||
context_->moveToThread(QCoreApplication::instance()->thread());
|
context_->moveToThread(QCoreApplication::instance()->thread());
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
template<class U>
|
template<class U>
|
||||||
void SetWidgetText(U* widget, const T& currentValue);
|
void SetWidgetText(U* widget, const T& currentValue);
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,12 @@ static const std::string logPrefix_ =
|
||||||
class SettingsInterfaceBase::Impl
|
class SettingsInterfaceBase::Impl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Impl() {}
|
explicit Impl() = default;
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
SettingsInterfaceBase::SettingsInterfaceBase() : p(std::make_unique<Impl>()) {}
|
SettingsInterfaceBase::SettingsInterfaceBase() : p(std::make_unique<Impl>()) {}
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,12 @@ template<class T>
|
||||||
class SettingsVariable<T>::Impl
|
class SettingsVariable<T>::Impl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Impl() {}
|
explicit Impl() = default;
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
T value_ {};
|
T value_ {};
|
||||||
T default_ {};
|
T default_ {};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,11 @@ class SettingsVariableBase::Impl
|
||||||
public:
|
public:
|
||||||
explicit Impl(const std::string& name) : name_ {name} {}
|
explicit Impl(const std::string& name) : name_ {name} {}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
const std::string name_;
|
const std::string name_;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,11 @@ public:
|
||||||
InitializeFontVariables();
|
InitializeFontVariables();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
void InitializeFontVariables();
|
void InitializeFontVariables();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ public:
|
||||||
// NOLINTEND(cppcoreguidelines-avoid-magic-numbers)
|
// NOLINTEND(cppcoreguidelines-avoid-magic-numbers)
|
||||||
}
|
}
|
||||||
|
|
||||||
~UiSettingsImpl() {}
|
~UiSettingsImpl() = default;
|
||||||
|
UiSettingsImpl(const UiSettingsImpl&) = delete;
|
||||||
|
UiSettingsImpl& operator=(const UiSettingsImpl&) = delete;
|
||||||
|
UiSettingsImpl(const UiSettingsImpl&&) = delete;
|
||||||
|
UiSettingsImpl& operator=(const UiSettingsImpl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<bool> level2ProductsExpanded_ {"level2_products_expanded"};
|
SettingsVariable<bool> level2ProductsExpanded_ {"level2_products_expanded"};
|
||||||
SettingsVariable<bool> level2SettingsExpanded_ {"level2_settings_expanded"};
|
SettingsVariable<bool> level2SettingsExpanded_ {"level2_settings_expanded"};
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,11 @@ public:
|
||||||
types::GetDistanceUnitsName));
|
types::GetDistanceUnitsName));
|
||||||
}
|
}
|
||||||
|
|
||||||
~Impl() {}
|
~Impl() = default;
|
||||||
|
Impl(const Impl&) = delete;
|
||||||
|
Impl& operator=(const Impl&) = delete;
|
||||||
|
Impl(const Impl&&) = delete;
|
||||||
|
Impl& operator=(const Impl&&) = delete;
|
||||||
|
|
||||||
SettingsVariable<std::string> accumulationUnits_ {"accumulation_units"};
|
SettingsVariable<std::string> accumulationUnits_ {"accumulation_units"};
|
||||||
SettingsVariable<std::string> echoTopsUnits_ {"echo_tops_units"};
|
SettingsVariable<std::string> echoTopsUnits_ {"echo_tops_units"};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue