summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-17 16:54:12 -0200
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-18 08:36:52 -0300
commitc022f8f4331d0ec741bb8ddaa43661d51cd085a9 (patch)
tree5aa859adef7a1148f8e652e1852df967ea6f8a84
parent6abb94dd7727e476e3df61b183cbf34597a99739 (diff)
downloadshiboken-c022f8f4331d0ec741bb8ddaa43661d51cd085a9.tar.gz
shiboken-c022f8f4331d0ec741bb8ddaa43661d51cd085a9.tar.xz
shiboken-c022f8f4331d0ec741bb8ddaa43661d51cd085a9.zip
Adapt to changes in Generator interface.
Reviewed by Renato Ara├║jo <renato.filho@openbossa.org>
-rw-r--r--cppgenerator.cpp7
-rw-r--r--headergenerator.cpp5
2 files changed, 3 insertions, 9 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index d26a6de0..2738c661 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -1941,9 +1941,6 @@ void CppGenerator::finishGeneration()
if (!shouldGenerate(cls) || cls->enclosingClass())
continue;
- if (m_packageName.isEmpty())
- m_packageName = cls->package();
-
s_classInitDecl << "extern \"C\" PyAPI_FUNC(void) init_"
<< cls->name().toLower() << "(PyObject* module);" << endl;
@@ -1954,7 +1951,7 @@ void CppGenerator::finishGeneration()
s_classPythonDefines << INDENT << defineStr << endl;
}
- QString moduleFileName(outputDirectory() + "/" + subDirectoryForPackage(m_packageName));
+ QString moduleFileName(outputDirectory() + "/" + subDirectoryForPackage(packageName()));
moduleFileName += "/" + moduleName().toLower() + "_module_wrapper.cpp";
QFile file(moduleFileName);
@@ -1974,7 +1971,7 @@ void CppGenerator::finishGeneration()
s << "#include \"" << include << '\"' << endl;
s << endl;
- TypeSystemTypeEntry* moduleEntry = reinterpret_cast<TypeSystemTypeEntry*>(TypeDatabase::instance()->findType(m_packageName));
+ TypeSystemTypeEntry* moduleEntry = reinterpret_cast<TypeSystemTypeEntry*>(TypeDatabase::instance()->findType(packageName()));
CodeSnipList snips = moduleEntry->codeSnips();
// module inject-code native/beginning
diff --git a/headergenerator.cpp b/headergenerator.cpp
index b9d5c240..ccec6ae7 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -224,9 +224,6 @@ void HeaderGenerator::finishGeneration()
!(classType->isObject() || classType->isValue() || classType->isNamespace()))
continue;
- if (m_packageName.isEmpty())
- m_packageName = metaClass->package();
-
//Includes
if (metaClass->typeEntry()->include().isValid())
s_cin << metaClass->typeEntry()->include().toString() << endl;
@@ -265,7 +262,7 @@ void HeaderGenerator::finishGeneration()
}
QString moduleHeaderFileName(outputDirectory() + QDir::separator()
- + subDirectoryForPackage(m_packageName));
+ + subDirectoryForPackage(packageName()));
moduleHeaderFileName += QDir::separator() + moduleName().toLower() + "_python.h";
QString includeShield = moduleName().toUpper() + "_PYTHON_H";