aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-06 13:53:19 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-06 15:29:26 +0000
commit7400b03e679d7144bdae9b5acf05c1e2fce697c8 (patch)
tree36456ee50467483b9d2e8094fb59b455a0501521
parent12483a955f7aa3101d4f3ce2520150bc8dce9f07 (diff)
Minor cleanup
Rename bool String::compare(const String *other) to the slightly more self-explaining bool String::lessThan(const String *other) as the returned boolean value does not relate to equality. Change-Id: Ia7b1a7f47beca0659fb199c0c9d49951468ad03d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp8
-rw-r--r--src/qml/jsruntime/qv4string_p.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index d82eebd1d2..11f06d9ed1 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -979,7 +979,7 @@ QV4::Bool Runtime::method_compareGreaterThan(const Value &l, const Value &r)
Q_UNIMPLEMENTED();
return false;
#else
- return sr->compare(sl);
+ return sr->lessThan(sl);
#endif
}
@@ -1016,7 +1016,7 @@ QV4::Bool Runtime::method_compareLessThan(const Value &l, const Value &r)
Q_UNIMPLEMENTED();
return false;
#else
- return sl->compare(sr);
+ return sl->lessThan(sr);
#endif
}
@@ -1053,7 +1053,7 @@ QV4::Bool Runtime::method_compareGreaterEqual(const Value &l, const Value &r)
Q_UNIMPLEMENTED();
return false;
#else
- return !sl->compare(sr);
+ return !sl->lessThan(sr);
#endif
}
@@ -1090,7 +1090,7 @@ QV4::Bool Runtime::method_compareLessEqual(const Value &l, const Value &r)
Q_UNIMPLEMENTED();
return false;
#else
- return !sr->compare(sl);
+ return !sr->lessThan(sl);
#endif
}
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index aacc9d03a2..6a69c830ea 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -206,7 +206,7 @@ struct Q_QML_PRIVATE_EXPORT String : public StringOrSymbol {
return d()->isEqualTo(other->d());
}
- inline bool compare(const String *other) {
+ inline bool lessThan(const String *other) {
return toQString() < other->toQString();
}