From 4c3ee6ee545635d93f00fa04981b3486b5e84925 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 12 Sep 2016 15:35:58 +0200 Subject: 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 --- ApiExtractor/typedatabase.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ApiExtractor/typedatabase.cpp') 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; } -- cgit v1.2.3