Skip to content

Commit 09ad36e

Browse files
Merge pull request #2022 from KLayout/bugfix/issue-2019
Fixing issue #2019 (build issue against Qt 6.9)
2 parents 449a9a9 + 0932944 commit 09ad36e

File tree

2 files changed

+11
-41
lines changed

2 files changed

+11
-41
lines changed

scripts/mkqtdecl6/mkqtdecl.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ drop_method "QDebug", /QDebug::operator\s*<<\((?!const\s+QString\s*&)/ # don't m
547547
drop_method "", /::operator\s*<<\(QDebug\s*\w*\s*,\s*(?!const\s+QString\s*&)/ # don't map the others right now - too many (TODO: how to map?)
548548
drop_method "QNoDebug", /QNoDebug::operator<</ # nothing usable (TODO: how to map?)
549549

550-
# No longer supported operator== and operator!= in Qt 6.7/6.8
550+
# No longer supported operator== and operator!= in Qt 6.7/6.8/6.9
551551
add_native_operator_neq(self, "QEasingCurve")
552552
add_native_operator_neq(self, "QTimeZone")
553553
add_native_operator_neq(self, "QDir")
@@ -569,6 +569,7 @@ add_native_operator_neq(self, "QProcessEnvironment")
569569
add_native_operator_neq(self, "QRegularExpression")
570570
add_native_operator_neqlt(self, "QUrl")
571571
add_native_operator_neq(self, "QUrlQuery")
572+
add_native_operator_neq(self, "QDomNodeList")
572573
add_native_operator_neq(self, "QXmlStreamAttribute")
573574
add_native_operator_neq(self, "QXmlStreamEntityDeclaration")
574575
add_native_operator_neq(self, "QXmlStreamNamespaceDeclaration")

src/gsiqt/qt6/QtXml/gsiDeclQDomNodeList.cc

+9-40
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535

3636
// -----------------------------------------------------------------------
3737
// class QDomNodeList
38+
static bool QDomNodeList_operator_eq(const QDomNodeList *a, const QDomNodeList &b) {
39+
return *a == b;
40+
}
41+
static bool QDomNodeList_operator_ne(const QDomNodeList *a, const QDomNodeList &b) {
42+
return !(*a == b);
43+
}
3844

3945
// Constructor QDomNodeList::QDomNodeList()
4046

@@ -153,25 +159,6 @@ static void _call_f_length_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls
153159
}
154160

155161

156-
// bool QDomNodeList::operator!=(const QDomNodeList &)
157-
158-
159-
static void _init_f_operator_excl__eq__c2484 (qt_gsi::GenericMethod *decl)
160-
{
161-
static gsi::ArgSpecBase argspec_0 ("arg1");
162-
decl->add_arg<const QDomNodeList & > (argspec_0);
163-
decl->set_return<bool > ();
164-
}
165-
166-
static void _call_f_operator_excl__eq__c2484 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret)
167-
{
168-
__SUPPRESS_UNUSED_WARNING(args);
169-
tl::Heap heap;
170-
const QDomNodeList &arg1 = gsi::arg_reader<const QDomNodeList & >() (args, heap);
171-
ret.write<bool > ((bool)((QDomNodeList *)cls)->operator!= (arg1));
172-
}
173-
174-
175162
// QDomNodeList &QDomNodeList::operator=(const QDomNodeList &)
176163

177164

@@ -191,25 +178,6 @@ static void _call_f_operator_eq__2484 (const qt_gsi::GenericMethod * /*decl*/, v
191178
}
192179

193180

194-
// bool QDomNodeList::operator==(const QDomNodeList &)
195-
196-
197-
static void _init_f_operator_eq__eq__c2484 (qt_gsi::GenericMethod *decl)
198-
{
199-
static gsi::ArgSpecBase argspec_0 ("arg1");
200-
decl->add_arg<const QDomNodeList & > (argspec_0);
201-
decl->set_return<bool > ();
202-
}
203-
204-
static void _call_f_operator_eq__eq__c2484 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret)
205-
{
206-
__SUPPRESS_UNUSED_WARNING(args);
207-
tl::Heap heap;
208-
const QDomNodeList &arg1 = gsi::arg_reader<const QDomNodeList & >() (args, heap);
209-
ret.write<bool > ((bool)((QDomNodeList *)cls)->operator== (arg1));
210-
}
211-
212-
213181
// int QDomNodeList::size()
214182

215183

@@ -238,14 +206,15 @@ static gsi::Methods methods_QDomNodeList () {
238206
methods += new qt_gsi::GenericMethod ("isEmpty?", "@brief Method bool QDomNodeList::isEmpty()\n", true, &_init_f_isEmpty_c0, &_call_f_isEmpty_c0);
239207
methods += new qt_gsi::GenericMethod ("item", "@brief Method QDomNode QDomNodeList::item(int index)\n", true, &_init_f_item_c767, &_call_f_item_c767);
240208
methods += new qt_gsi::GenericMethod ("length", "@brief Method int QDomNodeList::length()\n", true, &_init_f_length_c0, &_call_f_length_c0);
241-
methods += new qt_gsi::GenericMethod ("!=", "@brief Method bool QDomNodeList::operator!=(const QDomNodeList &)\n", true, &_init_f_operator_excl__eq__c2484, &_call_f_operator_excl__eq__c2484);
242209
methods += new qt_gsi::GenericMethod ("assign", "@brief Method QDomNodeList &QDomNodeList::operator=(const QDomNodeList &)\n", false, &_init_f_operator_eq__2484, &_call_f_operator_eq__2484);
243-
methods += new qt_gsi::GenericMethod ("==", "@brief Method bool QDomNodeList::operator==(const QDomNodeList &)\n", true, &_init_f_operator_eq__eq__c2484, &_call_f_operator_eq__eq__c2484);
244210
methods += new qt_gsi::GenericMethod ("size", "@brief Method int QDomNodeList::size()\n", true, &_init_f_size_c0, &_call_f_size_c0);
245211
return methods;
246212
}
247213

248214
gsi::Class<QDomNodeList> decl_QDomNodeList ("QtXml", "QDomNodeList",
215+
gsi::method_ext("==", &QDomNodeList_operator_eq, gsi::arg ("other"), "@brief Method bool QDomNodeList::operator==(const QDomNodeList &) const") +
216+
gsi::method_ext("!=", &QDomNodeList_operator_ne, gsi::arg ("other"), "@brief Method bool QDomNodeList::operator!=(const QDomNodeList &) const")
217+
+
249218
methods_QDomNodeList (),
250219
"@qt\n@brief Binding of QDomNodeList");
251220

0 commit comments

Comments
 (0)