summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyscanner.l')
-rw-r--r--src/pyscanner.l11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 913f88e..ed3f10b 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -1000,6 +1000,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
// prepend scope in case of nested classes
if (current_root->section&Entry::SCOPE_MASK)
{
+ printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
current->name.prepend(current_root->name+"::");
}
@@ -1476,11 +1477,15 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
QFileInfo fi(fileName);
g_moduleScope = findPackageScope(fileName);
- if (!g_moduleScope.isEmpty())
+ QString baseName=fi.baseName();
+ if (baseName!="__init__") // package initializer file is not a package itself
{
- g_moduleScope+="::";
+ if (!g_moduleScope.isEmpty())
+ {
+ g_moduleScope+="::";
+ }
+ g_moduleScope+=baseName;
}
- g_moduleScope+=fi.baseName();
current = new Entry;
current->name = g_moduleScope;