comparison data/model/QueryModel.cpp @ 32:50d04702da36

correct compilation warning on enum types
author lbajardsilogic
date Tue, 15 May 2007 07:19:24 +0000
parents 5cee0ce212a7
children 59d84a8bb76c
comparison
equal deleted inserted replaced
31:08aa244b91c6 32:50d04702da36
116 116
117 if (iter != m_properties.end()) 117 if (iter != m_properties.end())
118 { 118 {
119 *min = iter->second->getMinRange(); 119 *min = iter->second->getMinRange();
120 *max = iter->second->getMaxRange(); 120 *max = iter->second->getMaxRange();
121 if (iter->second->getType() != QueryThemeModel::PropertyType::StringProperty) 121 if (iter->second->getType() != StringProperty)
122 return iter->second->getValue().toInt(); 122 return iter->second->getValue().toInt();
123 } 123 }
124 124
125 return 0; 125 return 0;
126 } 126 }
247 m_max(0), 247 m_max(0),
248 m_value("") 248 m_value("")
249 { 249 {
250 if (type == "int") 250 if (type == "int")
251 { 251 {
252 m_type = PropertyType::RangeProperty; 252 m_type = RangeProperty;
253 253
254 if (range != "") 254 if (range != "")
255 { 255 {
256 int pos = range.indexOf("-"); 256 int pos = range.indexOf("-");
257 257
259 m_max = range.right(range.length()-pos-1).toInt(); 259 m_max = range.right(range.length()-pos-1).toInt();
260 } 260 }
261 } else if (type == "string") 261 } else if (type == "string")
262 { 262 {
263 if (range == "") { 263 if (range == "") {
264 m_type = PropertyType::StringProperty; 264 m_type = StringProperty;
265 } else { 265 } else {
266 m_type = PropertyType::ValueProperty; 266 m_type = ValueProperty;
267 267
268 if (range != "") 268 if (range != "")
269 { 269 {
270 m_value = "0"; 270 m_value = "0";
271 m_range = range.split("/"); 271 m_range = range.split("/");
273 m_max = m_range.size(); 273 m_max = m_range.size();
274 } 274 }
275 } 275 }
276 } else if (type == "gYear") 276 } else if (type == "gYear")
277 { 277 {
278 m_type = PropertyType::RangeProperty; 278 m_type = RangeProperty;
279 279
280 m_min = 0; 280 m_min = 0;
281 m_max = 2007; 281 m_max = 2007;
282 282
283 } else 283 } else
284 { 284 {
285 m_type = PropertyType::InvalidProperty; 285 m_type = InvalidProperty;
286 } 286 }
287 } 287 }