summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-29 16:15:12 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-11-03 10:30:40 -0300
commit4e0e1c65ce2eb33ce83b5d6f94ad2ae59e53ca64 (patch)
tree97c9580c69986f570ce4465800d1512a5bc19278 /generator
parent6f6eabfc91d0b034be1b411c451dd1562519252d (diff)
downloadshiboken-4e0e1c65ce2eb33ce83b5d6f94ad2ae59e53ca64.tar.gz
shiboken-4e0e1c65ce2eb33ce83b5d6f94ad2ae59e53ca64.tar.xz
shiboken-4e0e1c65ce2eb33ce83b5d6f94ad2ae59e53ca64.zip
Updated to new libpyside Signal/Slot namespace.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp15
-rw-r--r--generator/headergenerator.cpp2
2 files changed, 8 insertions, 9 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 1ea5b15d..428b1848 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -940,7 +940,7 @@ void CppGenerator::writeConstructorWrapper(QTextStream& s, const AbstractMetaFun
// Create metaObject and register signal/slot
if (metaClass->isQObject() && usePySideExtensions()) {
s << endl << INDENT << "// QObject setup" << endl;
- s << INDENT << "PySide::signalUpdateSource(self);" << endl;
+ s << INDENT << "PySide::Signal::updateSourceObject(self);" << endl;
s << INDENT << "metaObject = cptr->metaObject(); // <- init python qt properties" << endl;
s << INDENT << "if (kwds && !PySide::fillQtProperties(self, metaObject, kwds, argNames, " << argNamesSet.count() << "))" << endl;
{
@@ -3025,14 +3025,14 @@ void CppGenerator::writeSignalInitialization(QTextStream& s, const AbstractMetaC
return;
s << INDENT << "// Initialize signals" << endl;
- s << INDENT << "PyObject* signal_item;" << endl << endl;
+ s << INDENT << "PySideSignal* signal_item;" << endl << endl;
foreach(QString funcName, signatures.keys()) {
- s << INDENT << "signal_item = PySide::signalNew(\"" << funcName <<"\"";
+ s << INDENT << "signal_item = PySide::Signal::newObject(\"" << funcName <<"\"";
foreach(QString signature, signatures[funcName])
s << ", \"" + signature << "\"";
s << ", NULL);" << endl;
- s << INDENT << "PySide::addSignalToWrapper(&" + cpythonTypeName(metaClass) + ", \"";
+ s << INDENT << "PySide::Signal::addSignalToWrapper(&" + cpythonTypeName(metaClass) + ", \"";
s << funcName << "\", signal_item);" << endl;
s << INDENT << "Py_DECREF(signal_item);" << endl;
}
@@ -3514,8 +3514,8 @@ void CppGenerator::writeGetattroFunction(QTextStream& s, const AbstractMetaClass
s << INDENT << "if (attr && PyObject_TypeCheck(attr, &PySideSignalType)) {" << endl;
{
Indentation indent(INDENT);
- s << INDENT << "PyObject* signal = reinterpret_cast<PyObject*>(PySide::signalInitialize(attr, name, self));" << endl
- << INDENT << "PyObject_SetAttr(self, name, signal);" << endl
+ s << INDENT << "PyObject* signal = reinterpret_cast<PyObject*>(PySide::Signal::initialize(reinterpret_cast<PySideSignal*>(attr), name, self));" << endl
+ << INDENT << "PyObject_SetAttr(self, name, reinterpret_cast<PyObject*>(signal));" << endl
<< INDENT << "return signal;" << endl;
}
s << INDENT << "}" << endl;
@@ -3542,9 +3542,8 @@ void CppGenerator::writeGetattroFunction(QTextStream& s, const AbstractMetaClass
<< INDENT << "if (signalList.size() > 0) {" << endl;
{
Indentation indent(INDENT);
- s << INDENT << "PyObject* pySignal = PySide::signalNewFromMethod(self, signalList);" << endl
+ s << INDENT << "PyObject* pySignal = reinterpret_cast<PyObject*>(PySide::Signal::newObjectFromMethod(self, signalList));" << endl
<< INDENT << "PyObject_SetAttr(self, name, pySignal);" << endl
- << INDENT << "PyObject_GenericSetAttr(self, name, pySignal);" << endl
<< INDENT << "return pySignal;" << endl;
}
s << INDENT << "}" << endl;
diff --git a/generator/headergenerator.cpp b/generator/headergenerator.cpp
index 12d246a1..97cec4b7 100644
--- a/generator/headergenerator.cpp
+++ b/generator/headergenerator.cpp
@@ -436,7 +436,7 @@ void HeaderGenerator::finishGeneration()
s << INDENT << INDENT << "typeName = typeid(*value).name();" << endl;
s << INDENT << "PyObject* pyObj = Shiboken::SbkBaseWrapper_New(reinterpret_cast<SbkBaseWrapperType*>(SbkType<" << metaClass->qualifiedCppName() << " >()),"
<< "value, hasOwnership, isExactType, typeName);" << endl;
- s << INDENT << "PySide::signalUpdateSource(pyObj);" << endl;
+ s << INDENT << "PySide::Signal::updateSourceObject(pyObj);" << endl;
s << INDENT << "return pyObj;" << endl;
s << '}' << endl;