Fixing the Qt binding definitions to include addItem and for better alignment of Qt API

This commit is contained in:
Matthias Koefferlein
2026-02-12 23:05:08 +01:00
parent 88efda71e6
commit cc7f049799
31 changed files with 128 additions and 125 deletions
+5
View File
@@ -641,18 +641,23 @@ rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/,
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QHBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QVBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QFormLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
+9 -5
View File
@@ -840,23 +840,23 @@ rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/,
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow\(QWidget\s*\*/, 0 # will take ownership of item
keep_arg "QFormLayout", /::insertRow/, 2 # will take ownership of item
keep_arg "QFormLayout", /::insertRow\(QWidget\s*\*/, 1 # will take ownership of item
keep_arg "QFormLayout", /::setWidget/, 2 # will take ownership of item
keep_arg "QHBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QVBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QFormLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
@@ -886,9 +886,13 @@ owner_arg "QWidget", /::setParent\(QWidget\s+\*/, 0 # will make self owned by ar
# over ownership of it?
# keep_arg "QTableWidget", /::setItemPrototype\(/, 0 # will take ownership of the child
return_new "QLayout", /::takeAt/ # returns a free object
return_new "QLayout", /::replaceWidget/ # returns a free object
return_new "QBoxLayout", /::takeAt/ # returns a free object
return_new "QHBoxLayout", /::takeAt/ # returns a free object
return_new "QVBoxLayout", /::takeAt/ # returns a free object
# TODO: QFormLayout: takeRow -> needs QFormLayout::TakeRowResult
return_new "QGridLayout", /::takeAt/ # returns a free object
return_new "QFormLayout", /::takeAt/ # returns a free object
return_new "QStackedLayout", /::takeAt/ # returns a free object
return_new "QStandardItem", /::take/ # returns a free object
return_new "QStandardItemModel", /::take/ # returns a free object
+14 -5
View File
@@ -1162,23 +1162,23 @@ rename "QKeySequence", /QKeySequence::QKeySequence\(QKeySequence::StandardKey/,
# TODO: basically, the layout object only takes ownership over the objects when
# it has a QWidget parent itself. This is not reflected in the following simple scheme
keep_arg "QBoxLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addSpacerItem/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QBoxLayout", /::insertItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertLayout/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertSpacerItem/, 1 # will take ownership of item
keep_arg "QBoxLayout", /::insertWidget/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow/, 1 # will take ownership of item
keep_arg "QFormLayout", /::addRow\(QWidget\s*\*/, 0 # will take ownership of item
keep_arg "QFormLayout", /::insertRow/, 2 # will take ownership of item
keep_arg "QFormLayout", /::insertRow\(QWidget\s*\*/, 1 # will take ownership of item
keep_arg "QFormLayout", /::setWidget/, 2 # will take ownership of item
keep_arg "QHBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QVBoxLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QGridLayout", /::addLayout/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QGridLayout", /::addWidget/, 0 # will take ownership of layout
keep_arg "QFormLayout", /::addItem/, 0 # will take ownership of layout
keep_arg "QLayout", /::addChildLayout/, 0 # will take ownership of layout
keep_arg "QLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addItem/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::addWidget/, 0 # will take ownership of item
keep_arg "QStackedLayout", /::insertWidget/, 1 # will take ownership of item
@@ -1208,11 +1208,20 @@ owner_arg "QWidget", /::setParent\(QWidget\s+\*/, 0 # will make self owned by ar
# over ownership of it?
# keep_arg "QTableWidget", /::setItemPrototype\(/, 0 # will take ownership of the child
return_new "QLayout", /::takeAt/ # returns a free object
return_new "QLayout", /::replaceWidget/ # returns a free object
return_new "QBoxLayout", /::takeAt/ # returns a free object
return_new "QBoxLayout", /::replaceWidget/ # returns a free object
return_new "QHBoxLayout", /::takeAt/ # returns a free object
return_new "QHBoxLayout", /::replaceWidget/ # returns a free object
return_new "QVBoxLayout", /::takeAt/ # returns a free object
return_new "QVBoxLayout", /::replaceWidget/ # returns a free object
return_new "QFormLayout", /::takeAt/ # returns a free object
return_new "QFormLayout", /::replaceWidget/ # returns a free object
return_new "QGridLayout", /::takeAt/ # returns a free object
return_new "QGridLayout", /::replaceWidget/ # returns a free object
# TODO: QFormLayout: takeRow -> needs QFormLayout::TakeRowResult
return_new "QStackedLayout", /::takeAt/ # returns a free object
return_new "QStackedLayout", /::replaceWidget/ # returns a free object
return_new "QStandardItem", /::take/ # returns a free object
return_new "QStandardItemModel", /::take/ # returns a free object
return_new "QTreeWidgetItem", /::take/ # returns a free object