From a661a122db75bd7ac14e6193e0ccc00ed6bc2f4d Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Thu, 17 Mar 2016 11:24:33 +0300 Subject: [PATCH] Minor renaming. --- map/framework.cpp | 2 +- qt/search_panel.cpp | 2 +- search/result.cpp | 18 +++++++++--------- search/result.hpp | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index f6e217e9ac..23a0336878 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1301,7 +1301,7 @@ search::AddressInfo Framework::GetSearchResultAddress(search::Result const & res if (name != type) info.m_name = name; - info.m_city = res.GetRegion(); + info.m_city = res.GetAddress(); /// @todo Optimize here according to the fact that feature is /// already read in many cases during search results processing. diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 3f275426b2..2077a5b0ad 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -137,7 +137,7 @@ void SearchPanel::OnSearchResult(ResultsT * results) int const rowCount = m_pTable->rowCount(); m_pTable->insertRow(rowCount); m_pTable->setCellWidget(rowCount, 1, new QLabel(strHigh)); - m_pTable->setItem(rowCount, 2, CreateItem(QString::fromStdString(res.GetRegion()))); + m_pTable->setItem(rowCount, 2, CreateItem(QString::fromStdString(res.GetAddress()))); if (res.GetResultType() == ResultT::RESULT_FEATURE) { diff --git a/search/result.cpp b/search/result.cpp index a18a107d6d..fc986236a4 100644 --- a/search/result.cpp +++ b/search/result.cpp @@ -5,12 +5,12 @@ namespace search { Result::Result(FeatureID const & id, m2::PointD const & pt, string const & str, - string const & region, string const & type, uint32_t featureType, + string const & address, string const & type, uint32_t featureType, Metadata const & meta) : m_id(id) , m_center(pt) , m_str(str) - , m_region(region) + , m_address(address) , m_type(type) , m_featureType(featureType) , m_metadata(meta) @@ -19,19 +19,19 @@ Result::Result(FeatureID const & id, m2::PointD const & pt, string const & str, } Result::Result(FeatureID const & id, m2::PointD const & pt, string const & str, - string const & region, string const & type) + string const & address, string const & type) : m_id(id) , m_center(pt) , m_str(str) - , m_region(region) + , m_address(address) , m_type(type) { Init(false /* metadataInitialized */); } -Result::Result(m2::PointD const & pt, string const & str, string const & region, +Result::Result(m2::PointD const & pt, string const & str, string const & address, string const & type) - : m_center(pt), m_str(str), m_region(region), m_type(type) + : m_center(pt), m_str(str), m_address(address), m_type(type) { } @@ -44,7 +44,7 @@ Result::Result(Result const & res, string const & suggest) : m_id(res.m_id) , m_center(res.m_center) , m_str(res.m_str) - , m_region(res.m_region) + , m_address(res.m_address) , m_type(res.m_type) , m_featureType(res.m_featureType) , m_suggestionStr(suggest) @@ -126,7 +126,7 @@ bool Result::IsEqualFeature(Result const & r) const // - emitted World.mwm and Country.mwm // - after additional search in all mwm // so it's suitable here to test for 500m - return (m_str == r.m_str && m_region == r.m_region && + return (m_str == r.m_str && m_address == r.m_address && m_featureType == r.m_featureType && PointDistance(m_center, r.m_center) < 500.0); } @@ -146,7 +146,7 @@ void Result::AppendCity(string const & name) { // No need to store mwm file name if we have valid city name. if (!name.empty()) - m_region = name; + m_address = name; } string Result::ToStringForStats() const diff --git a/search/result.hpp b/search/result.hpp index 52524c05ec..4da4d7956e 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -40,16 +40,16 @@ public: }; /// For RESULT_FEATURE. - Result(FeatureID const & id, m2::PointD const & pt, string const & str, string const & region, + Result(FeatureID const & id, m2::PointD const & pt, string const & str, string const & address, string const & type, uint32_t featureType, Metadata const & meta); /// Used for generation viewport results. Result(FeatureID const & id, m2::PointD const & pt, string const & str, - string const & region, string const & type); + string const & address, string const & type); /// @param[in] type Empty string - RESULT_LATLON, building address otherwise. Result(m2::PointD const & pt, string const & str, - string const & region, string const & type); + string const & address, string const & type); /// For RESULT_SUGGESTION_PURE. Result(string const & str, string const & suggest); @@ -60,7 +60,7 @@ public: /// Strings that is displayed in the GUI. //@{ string const & GetString() const { return m_str; } - string const & GetRegion() const { return m_region; } + string const & GetAddress() const { return m_address; } string const & GetFeatureType() const { return m_type; } string const & GetCuisine() const { return m_metadata.m_cuisine; } //@} @@ -116,7 +116,7 @@ private: FeatureID m_id; m2::PointD m_center; - string m_str, m_region, m_type; + string m_str, m_address, m_type; uint32_t m_featureType; string m_suggestionStr; buffer_vector, 4> m_hightlightRanges;