summaryrefslogtreecommitdiffstats
path: root/python/sip/TODO
diff options
context:
space:
mode:
Diffstat (limited to 'python/sip/TODO')
-rw-r--r--python/sip/TODO55
1 files changed, 55 insertions, 0 deletions
diff --git a/python/sip/TODO b/python/sip/TODO
new file mode 100644
index 00000000..bf1227c1
--- /dev/null
+++ b/python/sip/TODO
@@ -0,0 +1,55 @@
+1. Make the parser aware of Python keywords so they can't be used as
+member function names.
+
+5. Allow handwritten code for static class variables (like
+KTMainWindow.memberList). The problem is intercepting references to it
+(__getattr__ and __setattr__ aren't good enough) - probably extending the
+lazy function mechanism.
+
+11. Consider changing the way default arguments that are function calls are
+handled. At the moment the function is always called and the result discarded
+if it is not needed. It should really only be called if the result is really
+needed.
+
+18. Implement the C++ feature of automatically calling simple ctors to
+transparently convert between types for function parameters. For example, a
+function takes a parameter of type QKeySequence, but is passed an int, but
+there is a QKeySequence ctor that takes a single int - so call it
+automatically. This just needs extra code generated for the CanConvertTo and
+ConvertTo functions. This will only work where the destination type is a
+class. Note that we will end up doing lots of checks in the CanConvertTo
+function and repeating them in the ConvertToFunction. It would be better if
+the CanConvertTo function could return some information (even the results of
+the conversion of simple types like ints) to be re-used by ConvertTo - but make
+sure default arguments are handled correctly. We could implement it for base
+types as well (if the source type implemented an appropriate cast operator) but
+the way of doing argument parsing would have to change completely - if
+sipParseArgs was trying to convert an argument to an int it would have to have
+a table of all types that could be converted to an int (messy and slow?).
+
+19. Consider changing sipConvertToCpp() etc. to take a PyObject* (rather
+than a sipWrapperType*) and do a check and cast internally.
+
+22. Consider adding support for methods that take keyword arguments. Do it
+by allowing a function parameter to have a name (this becomes the keyword) and
+extend sipParseArgs() to take an options dictionary and list of keywords.
+
+24. Need some way of implementing new Qt properties, or at least fiddle the
+implementation of QSqlPropertyMap to allow new customer editor widgets to be
+implemented in Python.
+
+25. Add support for specifying docstrings for generated methods.
+
+26. Fully implement QObject.disconnect().
+
+27. Look at adding QObject.Q_OBJECT() that will create the moc generated
+methods dynamically (maybe just the tr() functions).
+
+28. Consider creating a copy of a const reference when wrapping it in order
+to enforce const in Python. Or add a flag to the wrapper which says it is a
+const instance. I think the only to way to implement it is to have a "const"
+Python type - an instance of which will point to the underlying Python object.
+This will enable const_cast to be implemented.
+
+30. Add support for specifying the reverse arithmetic operators. (Or just
+document that you should use the normal ones as global operators?)