Skip to content
Snippets Groups Projects
Commit 15837659 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Fix for older Qt with absence of QStringList comparison operator

parent 23e53378
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,7 @@ void ComboProperty::setCachedValue(const QString &name) ...@@ -74,8 +74,7 @@ void ComboProperty::setCachedValue(const QString &name)
bool ComboProperty::operator==(const ComboProperty &other) const { bool ComboProperty::operator==(const ComboProperty &other) const {
if(m_current_value != other.m_current_value) return false; if(m_current_value != other.m_current_value) return false;
if(m_values != other.m_values) return false; if(!GUIHelpers::isTheSame(m_values, other.m_values)) return false;
// if(!GUIHelpers::isTheSame(m_values, other.m_values)) return false;
// if(m_cached_value != other.m_cached_value) return false; // if(m_cached_value != other.m_cached_value) return false;
// if(m_cache_contains_GUI_value != other.m_cache_contains_GUI_value) return false; // if(m_cache_contains_GUI_value != other.m_cache_contains_GUI_value) return false;
return true; return true;
......
...@@ -245,5 +245,15 @@ QString createUuid() ...@@ -245,5 +245,15 @@ QString createUuid()
return QUuid::createUuid().toString(); return QUuid::createUuid().toString();
} }
bool isTheSame(const QStringList &lhs, const QStringList &rhs)
{
if(lhs.size() != rhs.size()) return false;
for(int i=0; i<lhs.size(); ++i)
if(lhs.at(i) != rhs.at(i))
return false;
return true;
}
} // namespace GUIHelpers } // namespace GUIHelpers
...@@ -80,6 +80,8 @@ template<class T, class... Ts> std::unique_ptr<T> make_unique(Ts&&... params) ...@@ -80,6 +80,8 @@ template<class T, class... Ts> std::unique_ptr<T> make_unique(Ts&&... params)
BA_CORE_API_ QString createUuid(); BA_CORE_API_ QString createUuid();
BA_CORE_API_ bool isTheSame(const QStringList &lhs, const QStringList &rhs);
} // namespace GUIHelpers } // namespace GUIHelpers
#endif // GUIHELPERS_H #endif // GUIHELPERS_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment