Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
15837659
Commit
15837659
authored
8 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/coregui/Models/ComboProperty.cpp
+1
-2
1 addition, 2 deletions
GUI/coregui/Models/ComboProperty.cpp
GUI/coregui/utils/GUIHelpers.cpp
+10
-0
10 additions, 0 deletions
GUI/coregui/utils/GUIHelpers.cpp
GUI/coregui/utils/GUIHelpers.h
+2
-0
2 additions, 0 deletions
GUI/coregui/utils/GUIHelpers.h
with
13 additions
and
2 deletions
GUI/coregui/Models/ComboProperty.cpp
+
1
−
2
View file @
15837659
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
GUI/coregui/utils/GUIHelpers.cpp
+
10
−
0
View file @
15837659
...
@@ -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
This diff is collapsed.
Click to expand it.
GUI/coregui/utils/GUIHelpers.h
+
2
−
0
View file @
15837659
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment