Combine namespaces in settings files into single line

This commit is contained in:
AdenKoperczak 2025-01-29 09:55:30 -05:00
parent 0a3913bdee
commit ba62004002
34 changed files with 68 additions and 272 deletions

View file

@ -7,11 +7,7 @@
#include <boost/gil.hpp> #include <boost/gil.hpp>
#include <boost/unordered/unordered_flat_map.hpp> #include <boost/unordered/unordered_flat_map.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = static const std::string logPrefix_ =
@ -236,6 +232,4 @@ bool operator==(const AlertPaletteSettings& lhs,
lhs.p->tornadoPossible_ == rhs.p->tornadoPossible_); lhs.p->tornadoPossible_ == rhs.p->tornadoPossible_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -8,11 +8,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class AlertPaletteSettings : public SettingsCategory class AlertPaletteSettings : public SettingsCategory
@ -41,6 +37,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -9,11 +9,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <fmt/format.h> #include <fmt/format.h>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::audio_settings"; static const std::string logPrefix_ = "scwx::qt::settings::audio_settings";
@ -210,6 +206,4 @@ bool operator==(const AudioSettings& lhs, const AudioSettings& rhs)
lhs.p->alertEnabled_ == rhs.p->alertEnabled_); lhs.p->alertEnabled_ == rhs.p->alertEnabled_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -7,11 +7,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class AudioSettings : public SettingsCategory class AudioSettings : public SettingsCategory
@ -46,6 +42,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -13,11 +13,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <QUrl> #include <QUrl>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::general_settings"; static const std::string logPrefix_ = "scwx::qt::settings::general_settings";
@ -447,6 +443,4 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs)
rhs.p->highPrivilegeWarningEnabled_); rhs.p->highPrivilegeWarningEnabled_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class GeneralSettings : public SettingsCategory class GeneralSettings : public SettingsCategory
@ -70,6 +66,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -2,11 +2,7 @@
#include <QKeySequence> #include <QKeySequence>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::hotkey_settings"; static const std::string logPrefix_ = "scwx::qt::settings::hotkey_settings";
@ -142,6 +138,4 @@ static bool IsHotkeyValid(const std::string& value)
.toStdString() == value; .toStdString() == value;
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -7,11 +7,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class HotkeySettings : public SettingsCategory class HotkeySettings : public SettingsCategory
@ -37,6 +33,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -1,11 +1,7 @@
#include <scwx/qt/settings/line_settings.hpp> #include <scwx/qt/settings/line_settings.hpp>
#include <scwx/qt/util/color.hpp> #include <scwx/qt/util/color.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::line_settings"; static const std::string logPrefix_ = "scwx::qt::settings::line_settings";
@ -153,6 +149,4 @@ bool operator==(const LineSettings& lhs, const LineSettings& rhs)
lhs.p->lineWidth_ == rhs.p->lineWidth_); lhs.p->lineWidth_ == rhs.p->lineWidth_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -8,11 +8,7 @@
#include <boost/gil/typedefs.hpp> #include <boost/gil/typedefs.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class LineSettings : public SettingsCategory class LineSettings : public SettingsCategory
@ -53,6 +49,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -9,11 +9,7 @@
#include <boost/json.hpp> #include <boost/json.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::map_settings"; static const std::string logPrefix_ = "scwx::qt::settings::map_settings";
@ -276,6 +272,4 @@ bool operator==(const MapSettings& lhs, const MapSettings& rhs)
return (lhs.p->map_ == rhs.p->map_); return (lhs.p->map_ == rhs.p->map_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class MapSettings : public SettingsCategory class MapSettings : public SettingsCategory
@ -60,6 +56,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <boost/gil.hpp> #include <boost/gil.hpp>
#include <fmt/format.h> #include <fmt/format.h>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::palette_settings"; static const std::string logPrefix_ = "scwx::qt::settings::palette_settings";
@ -252,6 +248,4 @@ bool operator==(const PaletteSettings& lhs, const PaletteSettings& rhs)
lhs.p->inactiveAlertColor_ == rhs.p->inactiveAlertColor_); lhs.p->inactiveAlertColor_ == rhs.p->inactiveAlertColor_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -9,11 +9,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class PaletteSettings : public SettingsCategory class PaletteSettings : public SettingsCategory
@ -45,6 +41,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -1,11 +1,7 @@
#include <scwx/qt/settings/product_settings.hpp> #include <scwx/qt/settings/product_settings.hpp>
#include <scwx/qt/settings/settings_container.hpp> #include <scwx/qt/settings/settings_container.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::product_settings"; static const std::string logPrefix_ = "scwx::qt::settings::product_settings";
@ -85,6 +81,4 @@ bool operator==(const ProductSettings& lhs, const ProductSettings& rhs)
lhs.p->stiPastEnabled_ == rhs.p->stiPastEnabled_); lhs.p->stiPastEnabled_ == rhs.p->stiPastEnabled_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class ProductSettings : public SettingsCategory class ProductSettings : public SettingsCategory
@ -41,6 +37,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -4,11 +4,7 @@
#include <algorithm> #include <algorithm>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::settings_category"; static const std::string logPrefix_ = "scwx::qt::settings::settings_category";
@ -479,6 +475,4 @@ void SettingsCategory::Impl::ConnectVariable(SettingsVariableBase* variable)
})); }));
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -8,11 +8,7 @@
#include <boost/json/object.hpp> #include <boost/json/object.hpp>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class SettingsCategory class SettingsCategory
@ -118,6 +114,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -1,11 +1,7 @@
#include <scwx/qt/settings/settings_container.hpp> #include <scwx/qt/settings/settings_container.hpp>
#include <scwx/util/logger.hpp> #include <scwx/util/logger.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::settings_container"; static const std::string logPrefix_ = "scwx::qt::settings::settings_container";
@ -172,6 +168,4 @@ bool SettingsContainer<Container>::Equals(const SettingsVariableBase& o) const
template class SettingsContainer<std::vector<std::int64_t>>; template class SettingsContainer<std::vector<std::int64_t>>;
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -2,11 +2,7 @@
#include <scwx/qt/settings/settings_variable.hpp> #include <scwx/qt/settings/settings_variable.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
template<class Container> template<class Container>
@ -99,6 +95,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -13,11 +13,7 @@
#include <QSpinBox> #include <QSpinBox>
#include <QWidget> #include <QWidget>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::settings_interface"; static const std::string logPrefix_ = "scwx::qt::settings::settings_interface";
@ -633,6 +629,4 @@ template class SettingsInterface<std::string>;
// Containers are not to be used directly // Containers are not to be used directly
template class SettingsInterface<std::vector<std::int64_t>>; template class SettingsInterface<std::vector<std::int64_t>>;
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -9,11 +9,7 @@
class QLabel; class QLabel;
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
template<class T> template<class T>
@ -140,6 +136,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -2,11 +2,7 @@
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = static const std::string logPrefix_ =
@ -29,6 +25,4 @@ SettingsInterfaceBase::SettingsInterfaceBase(SettingsInterfaceBase&&) noexcept =
SettingsInterfaceBase& SettingsInterfaceBase&
SettingsInterfaceBase::operator=(SettingsInterfaceBase&&) noexcept = default; SettingsInterfaceBase::operator=(SettingsInterfaceBase&&) noexcept = default;
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -5,11 +5,7 @@
class QAbstractButton; class QAbstractButton;
class QWidget; class QWidget;
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class SettingsInterfaceBase class SettingsInterfaceBase
@ -70,6 +66,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -7,11 +7,7 @@
#include <fmt/ostream.h> #include <fmt/ostream.h>
#include <fmt/ranges.h> #include <fmt/ranges.h>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::settings_variable"; static const std::string logPrefix_ = "scwx::qt::settings::settings_variable";
@ -439,6 +435,4 @@ template class SettingsVariable<std::string>;
// Containers are not to be used directly // Containers are not to be used directly
template class SettingsVariable<std::vector<std::int64_t>>; template class SettingsVariable<std::vector<std::int64_t>>;
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -10,11 +10,7 @@
class QAbstractButton; class QAbstractButton;
class QWidget; class QWidget;
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
template<class T> template<class T>
@ -257,6 +253,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -1,10 +1,6 @@
#include <scwx/qt/settings/settings_variable_base.hpp> #include <scwx/qt/settings/settings_variable_base.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = static const std::string logPrefix_ =
@ -62,6 +58,4 @@ bool operator==(const SettingsVariableBase& lhs,
return typeid(lhs) == typeid(rhs) && lhs.Equals(rhs); return typeid(lhs) == typeid(rhs) && lhs.Equals(rhs);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <boost/json/object.hpp> #include <boost/json/object.hpp>
#include <boost/signals2/signal.hpp> #include <boost/signals2/signal.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
/** /**
@ -117,6 +113,4 @@ private:
bool operator==(const SettingsVariableBase& lhs, bool operator==(const SettingsVariableBase& lhs,
const SettingsVariableBase& rhs); const SettingsVariableBase& rhs);
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -3,11 +3,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::text_settings"; static const std::string logPrefix_ = "scwx::qt::settings::text_settings";
@ -216,6 +212,4 @@ bool operator==(const TextSettings& lhs, const TextSettings& rhs)
lhs.p->tooltipMethod_ == rhs.p->tooltipMethod_); lhs.p->tooltipMethod_ == rhs.p->tooltipMethod_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -7,11 +7,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class TextSettings : public SettingsCategory class TextSettings : public SettingsCategory
@ -48,6 +44,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -1,10 +1,6 @@
#include <scwx/qt/settings/ui_settings.hpp> #include <scwx/qt/settings/ui_settings.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::ui_settings"; static const std::string logPrefix_ = "scwx::qt::settings::ui_settings";
@ -122,6 +118,4 @@ bool operator==(const UiSettings& lhs, const UiSettings& rhs)
lhs.p->mainUIGeometry_ == rhs.p->mainUIGeometry_); lhs.p->mainUIGeometry_ == rhs.p->mainUIGeometry_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class UiSettingsImpl; class UiSettingsImpl;
@ -45,6 +41,4 @@ private:
std::unique_ptr<UiSettingsImpl> p; std::unique_ptr<UiSettingsImpl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -4,11 +4,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
static const std::string logPrefix_ = "scwx::qt::settings::unit_settings"; static const std::string logPrefix_ = "scwx::qt::settings::unit_settings";
@ -130,6 +126,4 @@ bool operator==(const UnitSettings& lhs, const UnitSettings& rhs)
lhs.p->distanceUnits_ == rhs.p->distanceUnits_); lhs.p->distanceUnits_ == rhs.p->distanceUnits_);
} }
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx

View file

@ -6,11 +6,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
namespace scwx namespace scwx::qt::settings
{
namespace qt
{
namespace settings
{ {
class UnitSettings : public SettingsCategory class UnitSettings : public SettingsCategory
@ -40,6 +36,4 @@ private:
std::unique_ptr<Impl> p; std::unique_ptr<Impl> p;
}; };
} // namespace settings } // namespace scwx::qt::settings
} // namespace qt
} // namespace scwx