diff --git a/debugger/variablecontroller.cpp b/debugger/variablecontroller.cpp --- a/debugger/variablecontroller.cpp +++ b/debugger/variablecontroller.cpp @@ -134,12 +134,12 @@ auto model = v->model(); auto parent = model->indexForItem(v, 0); auto childCount = v->model()->rowCount(parent); - qDebug() << "updating:" << v->expression() << "active children:" << childCount; + qCDebug(KDEV_PYTHON_DEBUGGER) << "updating:" << v->expression() << "active children:" << childCount; for ( int j = 0; j < childCount; j++ ) { auto index = model->index(j, 0, parent); auto child = static_cast(index.internalPointer()); if ( auto childVariable = qobject_cast(child) ) { - qDebug() << " got child var:" << childVariable->expression(); + qCDebug(KDEV_PYTHON_DEBUGGER) << " got child var:" << childVariable->expression(); v->fetchMoreChildren(); break; } @@ -156,7 +156,7 @@ void VariableController::_update() { - qDebug() << " ************************* update requested"; + qCDebug(KDEV_PYTHON_DEBUGGER) << " ************************* update requested"; DebugSession* d = static_cast(parent()); if (autoUpdate() & UpdateWatches) { variableCollection()->watches()->reinstall(); diff --git a/duchain/contextbuilder.cpp b/duchain/contextbuilder.cpp --- a/duchain/contextbuilder.cpp +++ b/duchain/contextbuilder.cpp @@ -63,14 +63,14 @@ } } if (updateContext) { - qDebug() << " ====> DUCHAIN ====> rebuilding duchain for" << url.str() << "(was built before)"; + qCDebug(KDEV_PYTHON_DUCHAIN) << " ====> DUCHAIN ====> rebuilding duchain for" << url.str() << "(was built before)"; DUChainWriteLocker lock(DUChain::lock()); Q_ASSERT(updateContext->type() == DUContext::Global); updateContext->clearImportedParentContexts(); updateContext->parsingEnvironmentFile()->clearModificationRevisions(); updateContext->clearProblems(); } else { - qDebug() << " ====> DUCHAIN ====> building duchain for" << url.str(); + qCDebug(KDEV_PYTHON_DUCHAIN) << " ====> DUCHAIN ====> building duchain for" << url.str(); } return ContextBuilderBase::build(url, node, updateContext); } diff --git a/parser/astbuilder.cpp b/parser/astbuilder.cpp --- a/parser/astbuilder.cpp +++ b/parser/astbuilder.cpp @@ -563,7 +563,7 @@ CodeAst::Ptr AstBuilder::parse(const QUrl& filename, QString &contents) { - qDebug() << " ====> AST ====> building abstract syntax tree for " << filename.path(); + qCDebug(KDEV_PYTHON_PARSER) << " ====> AST ====> building abstract syntax tree for " << filename.path(); Py_NoSiteFlag = 1; @@ -591,7 +591,7 @@ mod_ty syntaxtree = PyParser_ASTFromString(contents.toUtf8().data(), "", file_input, &flags, arena); if ( ! syntaxtree ) { - qDebug() << " ====< parse error, trying to fix"; + qCDebug(KDEV_PYTHON_PARSER) << " ====< parse error, trying to fix"; PyErr_Fetch(&exception, &value, &backtrace); qCDebug(KDEV_PYTHON_PARSER) << "Error objects: " << exception << value << backtrace; diff --git a/pythondebug.cpp b/pythondebug.cpp --- a/pythondebug.cpp +++ b/pythondebug.cpp @@ -18,6 +18,6 @@ */ #include "pythondebug.h" -Q_LOGGING_CATEGORY(KDEV_PYTHON, "kdev.python") +Q_LOGGING_CATEGORY(KDEV_PYTHON, "kdevelop.languages.python") diff --git a/pythonlanguagesupport.cpp b/pythonlanguagesupport.cpp --- a/pythonlanguagesupport.cpp +++ b/pythonlanguagesupport.cpp @@ -157,7 +157,7 @@ QString autopep8path = QStandardPaths::findExecutable("autopep8"); if (autopep8path.isEmpty()) { // TODO: proper error handling/user notification - qDebug() << "Could not find the autopep8 executable"; + qCDebug(KDEV_PYTHON) << "Could not find the autopep8 executable"; autopep8path = "/usr/bin/autopep8"; } autopep8.setContent(autopep8path + " -i $TMPFILE"); @@ -183,7 +183,7 @@ return 0; } if ( std::all_of(changedText.begin(), changedText.end(), [](const QChar& c) { return c.isSpace(); }) ) { - qDebug() << changedText << changedRange.end().column() << doc->lineLength(changedRange.end().line()); + qCDebug(KDEV_PYTHON) << changedText << changedRange.end().column() << doc->lineLength(changedRange.end().line()); if ( changedRange.end().column()-1 == doc->lineLength(changedRange.end().line()) ) { return ILanguageSupport::NoUpdateRequired; } diff --git a/pythonparsejob.cpp b/pythonparsejob.cpp --- a/pythonparsejob.cpp +++ b/pythonparsejob.cpp @@ -19,6 +19,7 @@ */ #include "pythonparsejob.h" +#include "pythondebug.h" #include "pythonhighlighting.h" #include "pythoneditorintegrator.h" #include "dumpchain.h" @@ -102,7 +103,7 @@ return abortJob(); } - qDebug() << " ====> PARSING ====> parsing file " << document().toUrl() << "; has priority" << parsePriority(); + qCDebug(KDEV_PYTHON) << " ====> PARSING ====> parsing file " << document().toUrl() << "; has priority" << parsePriority(); { QMutexLocker l(&Helper::projectPathLock); @@ -126,7 +127,7 @@ continue; } if ( ! file->needsUpdate() && file->featuresSatisfied(minimumFeatures()) && file->topContext() ) { - qDebug() << " ====> NOOP ====> Already up to date:" << document().str(); + qCDebug(KDEV_PYTHON) << " ====> NOOP ====> Already up to date:" << document().str(); setDuChain(file->topContext()); if ( ICore::self()->languageController()->backgroundParser()->trackerForUrl(document()) ) { lock.unlock(); @@ -180,7 +181,7 @@ // check whether any unresolved imports were encountered bool needsReparse = ! builder.unresolvedImports().isEmpty(); - qDebug() << "Document needs update because of unresolved identifiers: " << needsReparse; + qCDebug(KDEV_PYTHON) << "Document needs update because of unresolved identifiers: " << needsReparse; if ( needsReparse ) { // check whether one of the imports is queued for parsing, this is to avoid deadlocks // it's also ok if the duchain is now available (and thus has been parsed before already) @@ -212,7 +213,7 @@ DUChain::self()->updateContextEnvironment(m_duContext, parsingEnvironmentFile.data()); } - qDebug() << "---- Parsing Succeeded ----"; + qCDebug(KDEV_PYTHON) << "---- Parsing Succeeded ----"; if ( abortRequested() ) { return abortJob(); diff --git a/pythonstylechecking.cpp b/pythonstylechecking.cpp --- a/pythonstylechecking.cpp +++ b/pythonstylechecking.cpp @@ -29,6 +29,7 @@ #include #include +#include "pythondebug.h" #include "pythonparsejob.h" #include "helpers.h" @@ -103,7 +104,7 @@ int lineno = match.captured(2).toInt(&lineno_ok); int colno = match.captured(3).toInt(&colno_ok); if ( ! lineno_ok || ! colno_ok ) { - qDebug() << "invalid line / col number"; + qCDebug(KDEV_PYTHON) << "invalid line / col number"; continue; } QString error = match.captured(4); @@ -117,7 +118,7 @@ m_currentlyChecking->addProblem(ptr); } else { - qDebug() << "invalid pep8 error line:" << error; + qCDebug(KDEV_PYTHON) << "invalid pep8 error line:" << error; } }