11#include " locale.hpp"
2- #include < unicode/locid.h>
32#include " misc/log.hpp"
43#include " configure.hpp"
54
65static constexpr int s_maxLang = 315 ;
76
8- auto operator << (QDataStream &out, const :: Locale &l) -> QDataStream&
7+ auto operator << (QDataStream &out, const Locale &l) -> QDataStream&
98{
109 out << l.toVariant (); return out;
1110}
1211
13- auto operator >> (QDataStream &in, :: Locale &l) -> QDataStream&
12+ auto operator >> (QDataStream &in, Locale &l) -> QDataStream&
1413{
1514 QVariant var;
1615 in >> var;
17- l = :: Locale::fromVariant (var);
16+ l = Locale::fromVariant (var);
1817 return in;
1918}
2019
@@ -240,7 +239,7 @@ struct Data {
240239 aliases[u" za" _q] = u" zha" _q;
241240 aliases[u" zu" _q] = u" zul" _q;
242241 }
243- :: Locale native = :: Locale::system ();
242+ Locale native = Locale::system ();
244243 QHash<QString, QString> aliases;
245244 QMap<QString, QString> isoName;
246245 auto iso (QLocale::Language lang) const -> QJsonObject
@@ -308,7 +307,7 @@ struct IcuData {
308307};
309308#endif
310309
311- auto :: Locale::importIcu () -> void
310+ auto Locale::importIcu () -> void
312311{
313312#if !BOMI_RELEASE
314313 const QString folder = QDir::homePath () % " /icu/source/data/lang/" _a;
@@ -704,18 +703,18 @@ auto ::Locale::importIcu() -> void
704703#endif
705704}
706705
707- :: Locale::Locale (const Locale &rhs)
706+ Locale::Locale (const Locale &rhs)
708707{
709708 if (rhs.m_locale )
710709 m_locale = new QLocale (*rhs.m_locale );
711710}
712711
713- :: Locale::Locale (Locale &&rhs)
712+ Locale::Locale (Locale &&rhs)
714713{
715714 std::swap (m_locale, rhs.m_locale );
716715}
717716
718- auto :: Locale::operator = (const Locale &rhs) -> Locale&
717+ auto Locale::operator = (const Locale &rhs) -> Locale&
719718{
720719 if (this != &rhs) {
721720 _Delete (m_locale);
@@ -725,24 +724,24 @@ auto ::Locale::operator = (const Locale &rhs) -> Locale&
725724 return *this ;
726725}
727726
728- auto :: Locale::operator = (Locale &&rhs) -> Locale&
727+ auto Locale::operator = (Locale &&rhs) -> Locale&
729728{
730729 if (this != &rhs)
731730 std::swap (m_locale, rhs.m_locale );
732731 return *this ;
733732}
734733
735- auto :: Locale::native () -> Locale
734+ auto Locale::native () -> Locale
736735{
737736 return data ().native ;
738737}
739738
740- auto :: Locale::setNative (const Locale &l) -> void
739+ auto Locale::setNative (const Locale &l) -> void
741740{
742741 data ().native = l;
743742}
744743
745- auto :: Locale::isoToNativeName (const QString &_iso) -> QString
744+ auto Locale::isoToNativeName (const QString &_iso) -> QString
746745{
747746 if (_iso.size () > 3 )
748747 return QString ();
@@ -763,7 +762,7 @@ auto ::Locale::isoToNativeName(const QString &_iso) -> QString
763762 return name;
764763}
765764
766- auto :: Locale::nativeName () const -> QString
765+ auto Locale::nativeName () const -> QString
767766{
768767 if (!m_locale)
769768 return QString ();
@@ -773,12 +772,12 @@ auto ::Locale::nativeName() const -> QString
773772}
774773
775774// dummy for pref
776- auto :: Locale::toJson () const -> QJsonObject
775+ auto Locale::toJson () const -> QJsonObject
777776{
778777 return QJsonObject ();
779778}
780779
781- auto :: Locale::setFromJson (const QJsonObject &json) -> bool
780+ auto Locale::setFromJson (const QJsonObject &json) -> bool
782781{
783782 Q_UNUSED (json);
784783 return true ;
0 commit comments