From 1c9e021e97d6ce704f24e4f319e8fe0e714ae642 Mon Sep 17 00:00:00 2001 From: Denis Mingulov Date: Tue, 1 May 2012 21:44:36 +0300 Subject: [PATCH] Enable QML_IMPORT_TRACE for setImportPathList and setPluginPathList Currently QQmlImportDatabase methods addPluginPath and addImportPath are providing a debug output by QML_IMPORT_TRACE environment variable. QQmlImportDatabase::setImportPathList and QQmlImportDatabase - do not. So the current import/plugin path list might be inconsistent with the provided debug output. This commit adds support for QML_IMPORT_TRACE for both 'set' methods. Change-Id: I52bb3c7b7e7e5c1119f5b73c7574da2952f4242d Reviewed-by: Matthew Vogt --- src/qml/qml/qqmlimport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 2f17137..d300c38 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -1253,6 +1253,9 @@ QStringList QQmlImportDatabase::pluginPathList() const */ void QQmlImportDatabase::setPluginPathList(const QStringList &paths) { + if (qmlImportTrace()) + qDebug().nospace() << "QQmlImportDatabase::setPluginPathList: " << paths; + filePluginPath = paths; } @@ -1315,6 +1318,9 @@ QStringList QQmlImportDatabase::importPathList() const */ void QQmlImportDatabase::setImportPathList(const QStringList &paths) { + if (qmlImportTrace()) + qDebug().nospace() << "QQmlImportDatabase::setImportPathList: " << paths; + fileImportPath = paths; } -- 2.7.4