Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt6: QList<T>operator== requires const T::operator== #116

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generator/parser/codemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ QString TypeInfo::toString() const
return tmp;
}

bool TypeInfo::operator==(const TypeInfo &other)
bool TypeInfo::operator==(const TypeInfo &other) const
{
if (arrayElements().count() != other.arrayElements().count())
return false;
Expand Down
6 changes: 3 additions & 3 deletions generator/parser/codemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ struct TypeInfo
void setArguments(const QList<TypeInfo> &arguments);
void addArgument(const TypeInfo &arg) { m_arguments.append(arg); }

bool operator==(const TypeInfo &other);
bool operator!=(const TypeInfo &other) { return !(*this==other); }
bool operator==(const TypeInfo &other) const;
bool operator!=(const TypeInfo &other) const { return !(*this==other); }

// ### arrays and templates??

Expand All @@ -171,7 +171,7 @@ struct TypeInfo
uint m_reference: 1;
uint m_functionPointer: 1;
uint m_indirections: 6;
inline bool equals(TypeInfo_flags other) {
inline bool equals(TypeInfo_flags other) const {
return m_constant == other.m_constant
&& m_volatile == other.m_volatile
&& m_reference == other.m_reference
Expand Down
Loading