diff options
author | Christian Tismer <tismer@stackless.com> | 2020-08-01 14:29:45 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2020-09-16 14:56:30 +0200 |
commit | dedbc42b569d0dc25de10712168b99d0844c8e50 (patch) | |
tree | 1709327427dfa644d754d85b6a25ba110e1ac378 /sources/shiboken2/libshiboken/sbkstring.cpp | |
parent | 850b6faeaa580176863b3933e13c08b467720937 (diff) |
feature_select: Implement True Properties
This feature is now almost fully implemented.
TODO: Static properties like `QtWidgets.QApplication.platformName` are
skipped for now. They need support by the meta class.
Maybe this is a reason to use QtCore.Property instead of vanilla
Python property and improve it.
With the new infrastructure, we can also consider to add properties
which have no equivalent in the Qt implementation. A prominent
example is "central_widget".
Change-Id: Ia0e32e41de8ab72e3bba74878e61bcbac6da50ea
Task-number: PYSIDE-1019
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkstring.cpp')
-rw-r--r-- | sources/shiboken2/libshiboken/sbkstring.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/sbkstring.cpp b/sources/shiboken2/libshiboken/sbkstring.cpp index ed8b61fc8..ba1cd1e47 100644 --- a/sources/shiboken2/libshiboken/sbkstring.cpp +++ b/sources/shiboken2/libshiboken/sbkstring.cpp @@ -315,5 +315,13 @@ PyObject *getSnakeCaseName(const char *name, bool lower) return createStaticString(new_name); } +PyObject *getSnakeCaseName(PyObject *name, bool lower) +{ + // This is all static strings, not refcounted. + if (lower) + return getSnakeCaseName(toCString(name), lower); + return name; +} + } // namespace String } // namespace Shiboken |