diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-09-12 15:35:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-09-12 14:37:02 +0000 |
commit | 4c3ee6ee545635d93f00fa04981b3486b5e84925 (patch) | |
tree | c3c6de4a82938e4feab21b395c0be8c603cd34dc /ApiExtractor/typedatabase.cpp | |
parent | 866cb949cdf78600acb1bde6cbd824a9f2e28dc4 (diff) |
Introduce the Qt 5 logging system
Define a logging category and use that to output debug messages and
warnings. All of this now goes to standard error and can be
conveniently captured from there without disturbance by
the progress messages. Also, message formatting can now
be controlled for example to output file and line numbers.
Change-Id: If0de8776d4f5b6e418c70d4fe0931d2882b36ab8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'ApiExtractor/typedatabase.cpp')
-rw-r--r-- | ApiExtractor/typedatabase.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ApiExtractor/typedatabase.cpp b/ApiExtractor/typedatabase.cpp index 3d91da893..ce483b419 100644 --- a/ApiExtractor/typedatabase.cpp +++ b/ApiExtractor/typedatabase.cpp @@ -337,7 +337,8 @@ bool TypeDatabase::parseFile(const QString &filename, bool generate) QFile file(filepath); if (!file.exists()) { - ReportHandler::warning("Can't find " + filename+", typesystem paths: "+m_typesystemPaths.join(", ")); + qCWarning(lcShiboken).noquote().nospace() + << "Can't find " << filename << ", typesystem paths: " << m_typesystemPaths.join(", "); return false; } @@ -346,9 +347,10 @@ bool TypeDatabase::parseFile(const QString &filename, bool generate) m_parsedTypesystemFiles[filepath] = ok; int newCount = m_entries.size(); - ReportHandler::debugSparse(QString::fromLatin1("Parsed: '%1', %2 new entries") - .arg(filename) - .arg(newCount - count)); + if (ReportHandler::isDebug(ReportHandler::SparseDebug)) { + qCDebug(lcShiboken) + << QStringLiteral("Parsed: '%1', %2 new entries").arg(filename).arg(newCount - count); + } return ok; } |