From f54ce8b89fb599dbf0c5bad7adcb58a867e7594f Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Thu, 20 Aug 2009 18:59:23 -0300 Subject: - Correctly initialize and delete the AbstractMetaBuilder - Fix typo in setSuppressWarning method - Added setSilent method --- apiextractor.cpp | 10 ++++++++-- apiextractor.h | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apiextractor.cpp b/apiextractor.cpp index 8c7ea145e..8a2805383 100644 --- a/apiextractor.cpp +++ b/apiextractor.cpp @@ -38,7 +38,7 @@ static bool preprocess(const QString& sourceFile, QFile& targetFile, const QStringList& includes); -ApiExtractor::ApiExtractor() +ApiExtractor::ApiExtractor() : m_builder(0) { // Environment TYPESYSTEMPATH QString envTypesystemPaths = getenv("TYPESYSTEMPATH"); @@ -49,6 +49,7 @@ ApiExtractor::ApiExtractor() ApiExtractor::~ApiExtractor() { + delete m_builder; } void ApiExtractor::addTypesystemSearchPath ( const QString& path ) @@ -76,11 +77,16 @@ void ApiExtractor::setDebugLevel(ReportHandler::DebugLevel debugLevel) ReportHandler::setDebugLevel(debugLevel); } -void ApiExtractor::setSupressWarnings ( bool value ) +void ApiExtractor::setSuppressWarnings ( bool value ) { TypeDatabase::instance()->setSuppressWarnings(value); } +void ApiExtractor::setSilent ( bool value ) +{ + ReportHandler::setSilent(value); +} + bool ApiExtractor::run() { if (m_builder) diff --git a/apiextractor.h b/apiextractor.h index cc98cd15a..8cad8f1da 100644 --- a/apiextractor.h +++ b/apiextractor.h @@ -39,7 +39,8 @@ public: void setTypeSystem(const QString& typeSystemFileName); void setCppFileName(const QString& cppFileName); void setDebugLevel(ReportHandler::DebugLevel debugLevel); - void setSupressWarnings(bool value); + void setSuppressWarnings(bool value); + void setSilent(bool value); void addTypesystemSearchPath(const QString& path); void addIncludePath(const QString& path); -- cgit v1.2.3