mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Addjust default implementation of equal comparisons for QVariant encapsuled field content types that are not directly supported by Qt.
Should now work in most cases, where as it always returned "false" before this fix
This commit is contained in:
parent
b28bcaa4e4
commit
f4eadc5cef
@ -45,7 +45,14 @@ public:
|
||||
/// This is needed for the lookup regarding OptionValues
|
||||
static bool isDataElementEqual(const QVariant& variantValue, const QVariant& variantValue2)
|
||||
{
|
||||
return variantValue == variantValue2;
|
||||
if (variantValue.type() == QVariant::UserType)
|
||||
{
|
||||
return (variantValue.value<T>() == variantValue2.value<T>());
|
||||
}
|
||||
else
|
||||
{
|
||||
return variantValue == variantValue2;
|
||||
}
|
||||
}
|
||||
|
||||
/// Methods to get a list of options for a field, specialized for AppEnum
|
||||
|
Loading…
Reference in New Issue
Block a user