diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2018-10-04 15:02:00 +0200 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2018-10-05 06:47:25 +0000 |
| commit | 6e7b88b34cc57120851699782e014f190dabc038 (patch) | |
| tree | 9ebb873241588b1c65c3a408476f8c1fb84abf3a /plugins/pythonextensions/pythonextensionsplugin.cpp | |
| parent | 0f1d1387b60174670180e2578f977098c3cc472a (diff) | |
Use logging category for debug messages
Change-Id: I895188f12b3f23c6385069de312946720de50bbe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'plugins/pythonextensions/pythonextensionsplugin.cpp')
| -rw-r--r-- | plugins/pythonextensions/pythonextensionsplugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/pythonextensions/pythonextensionsplugin.cpp b/plugins/pythonextensions/pythonextensionsplugin.cpp index 59b32a1..77024ca 100644 --- a/plugins/pythonextensions/pythonextensionsplugin.cpp +++ b/plugins/pythonextensions/pythonextensionsplugin.cpp @@ -189,7 +189,7 @@ void PythonExtensionsPlugin::initializePythonBindings() PyUtil::addToSysPath(pythonPackagePath().toStdString()); // Initialize the Python context and register global Qt Creator variable if (!PyUtil::bindCoreModules()) { - qWarning() << "Python bindings could not be initialized"; + qCDebug(pyLog) << "Python bindings could not be initialized"; Core::MessageManager::write(Constants::MESSAGE_MANAGER_PREFIX + tr("Python bindings could not be initialized")); return; } @@ -214,7 +214,7 @@ void PythonExtensionsPlugin::initializeOptionalBindings() QLibrary bindingLib(path + Constants::PY_BINDING_LIB + name); QFunctionPointer bind = bindingLib.resolve("bind"); if (bind) { - qDebug() << "Initializing optional bindings for plugin" << name; + qCDebug(pyLog) << "Initializing bindings for plugin" << name; bind(); break; } @@ -237,7 +237,7 @@ void PythonExtensionsPlugin::installRequirements() && !QFileInfo::exists(extension_requirements + ".installed")) { if (!PyUtil::pipInstallRequirements(extension_requirements.toStdString(), pythonPackagePath().toStdString())) { - qWarning() << "Failed to install requirements for extension" << extension.name; + qCDebug(pyLog) << "Failed to install requirements for extension" << extension.name; Core::MessageManager::write(Constants::MESSAGE_MANAGER_PREFIX + tr("Failed to install requirements for extension ") + extension.name); @@ -251,32 +251,32 @@ void PythonExtensionsPlugin::initializePythonExtensions() // Search python directory in plugin paths QDir extension_dir = extensionDir(); if (!extension_dir.exists()) { - qWarning() << "Python extension directory not found"; + qCDebug(pyLog) << "Python extension directory not found"; Core::MessageManager::write(Constants::MESSAGE_MANAGER_PREFIX + tr("Python extension directory not found")); return; } - qDebug() << "Found Python extension directory at location" << extension_dir.absolutePath(); + qCDebug(pyLog) << "Found Python extension directory at location" << extension_dir.absolutePath(); QVector<Extension> &extension_list = extensionListRef(); - qDebug() << "Number of Python extensions found:" << extension_list.size(); + qCDebug(pyLog) << "Number of Python extensions found:" << extension_list.size(); int loadedCount = 0; // Run the extension initialization code for (Extension &extension : extension_list) { - qDebug() << "Trying to initialize extension" << extension.name; + qCDebug(pyLog) << "Trying to initialize extension" << extension.name; if (PyUtil::runScript("import " + extension.name.toStdString())) { extension.loaded = true; ++loadedCount; } else { - qWarning() << "Failed to initialize extension" << extension.name; + qCDebug(pyLog) << "Failed to initialize extension" << extension.name; Core::MessageManager::write(Constants::MESSAGE_MANAGER_PREFIX + tr("Failed to initialize extension ") + extension.name); } } - qDebug() << "Number of Python extensions loaded:" << loadedCount; + qCDebug(pyLog) << "Number of Python extensions loaded:" << loadedCount; } } // namespace Internal |
