30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From f3f3e27350ae9011caa260a3e6833ee7cb9abfe1 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
|
|
Date: Wed, 8 May 2024 10:58:27 +0800
|
|
Subject: [PATCH] use reference when appropriate
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
|
|
---
|
|
model/searchmarch.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/model/searchmarch.cpp b/model/searchmarch.cpp
|
|
index 445bc98..6a6920f 100644
|
|
--- a/model/searchmarch.cpp
|
|
+++ b/model/searchmarch.cpp
|
|
@@ -76,7 +76,7 @@ QList<LocationData> SearchMarch::exactMatchCity(const QString &inputText) const
|
|
{
|
|
QList<LocationData> searchedList;
|
|
//搜索匹配-遍历m_locatonList
|
|
- for (const LocationData line : m_locatonList) {
|
|
+ for (const LocationData &line : m_locatonList) {
|
|
if (line.shorthand == inputText || line.id == inputText || //拼音和ID
|
|
line.province == inputText ||line.province_en == inputText || //省
|
|
line.city.contains(inputText) || line.city_en.contains(inputText) //县
|
|
--
|
|
2.43.0
|
|
|