Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions scripts/mkqtdecl4/mkqtdecl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 9 additions & 5 deletions scripts/mkqtdecl5/mkqtdecl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
19 changes: 14 additions & 5 deletions scripts/mkqtdecl6/mkqtdecl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions scripts/mkqtdecl_common/produce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2995,12 +2995,8 @@ def produce_class(conf, decl_obj, ofile, index)
ofile.puts("static void _call_cbs_#{mn}_#{hk}_#{i_var} (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) ")
ofile.puts("{")
ofile.puts(" __SUPPRESS_UNUSED_WARNING(args);")
if !ant.empty?
ofile.puts(" tl::Heap heap;")
end
ant.each_with_index do |at,ia|
ofile.puts(" #{at.renamed_type(alist[ia]).gsi_decl_arg(decl_obj)} = args.read<#{at.gsi_decl_arg(decl_obj)} > (heap);")
end
produce_arg_read(ofile, decl_obj, func, alist, conf.kept_args(bd))
produce_keep_self(ofile, alist, "(#{cls} *)cls", conf.owner_args(bd))
if !rt.is_void?
ofile.puts(" ret.write<#{rt.gsi_decl_return(decl_obj)} > ((#{rt.gsi_decl_return(decl_obj)})((#{clsn}_Adaptor *)cls)->cbs_#{mn}_#{hk}_#{i_var} (#{alist.join(', ')}));")
else
Expand Down
Loading
Loading