aboutsummaryrefslogtreecommitdiffstats
path: root/typedatabase.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-02-16 08:14:45 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-09 19:10:15 -0300
commiteab5d72e3f7727f5726fa49267985cfcbd8e2c07 (patch)
tree67040918dc9a23e45b598ffbfd7a13bfb31bf4ac /typedatabase.cpp
parentf66bede561b7e1b282c835395f14f08437c407f8 (diff)
Type system parser has now the ability to ignore entries as demanded by the user.
The entries that could be dropped are: * Object and Value types * Global functions * Namespaces * Enums The entry name must be fully qualified with scope items separated by a dot (.) and beginning with the module/package name. Example: to drop the class "Bar" inside the namespace "Foo" from the "Pkg" package specify it with: "Pkg.Foo.Bar". TODO: The parser will later complain that dropped entries found on the headers are not found in the type system. That's obviously incorrect, but to fix it all the type entries should store the name of the package from where the came. And that's a needed improvement!
Diffstat (limited to 'typedatabase.cpp')
-rw-r--r--typedatabase.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/typedatabase.cpp b/typedatabase.cpp
index d97959820..4e0ab5b80 100644
--- a/typedatabase.cpp
+++ b/typedatabase.cpp
@@ -401,3 +401,14 @@ bool TypeDatabase::supportedApiVersion(double version) const
return version <= m_apiVersion;
}
+bool TypeDatabase::shouldDropTypeEntry(const QString& fullTypeName) const
+{
+ return m_dropTypeEntries.contains(fullTypeName);
+}
+
+void TypeDatabase::setDropTypeEntries(QStringList dropTypeEntries)
+{
+ m_dropTypeEntries = dropTypeEntries;
+ m_dropTypeEntries.sort();
+}
+