[Kde-bindings] KDE/kdebindings/csharp/qyoto
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sun Feb 1 17:55:09 UTC 2009
SVN commit 919858 by rdale:
* The construct_copy() function was using the full classname of the class
to construct which meant that it didn't work with classnames containing
'::' scope operators. So strip out the scope part of the classname to
create the consructor name.
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +9 -4 src/handlers.cpp
--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #919857:919858
@@ -1,3 +1,9 @@
+2009-02-01 Richard Dale <richard.j.dale at gmail.com>
+ * The construct_copy() function was using the full classname of the class
+ to construct which meant that it didn't work with classnames containing
+ '::' scope operators. So strip out the scope part of the classname to
+ create the consructor name.
+
2009-01-11 Arno Rehn <arno at arnorehn.de>
* Implement disconnecting delegates from a signal.
--- trunk/KDE/kdebindings/csharp/qyoto/src/handlers.cpp #919857:919858
@@ -717,11 +717,16 @@
{
const char *className = o->smoke->className(o->classId);
int classNameLen = strlen(className);
- char *ccSig = new char[classNameLen + 2]; // copy constructor signature
- strcpy(ccSig, className);
- strcat(ccSig, "#");
+
+ // copy constructor signature
+ QByteArray ccSig(className);
+ int pos = ccSig.lastIndexOf("::");
+ if (pos != -1) {
+ ccSig = ccSig.mid(pos + strlen("::"));
+ }
+ ccSig.append("#");
+
Smoke::ModuleIndex ccId = o->smoke->findMethodName(className, ccSig);
- delete[] ccSig;
char *ccArg = new char[classNameLen + 8];
sprintf(ccArg, "const %s&", className);
More information about the Kde-bindings
mailing list