OSDN Git Service

QmlDesigner.rewriter: fix possible incompatibilities with import plugins
authorThomas Hartmann <Thomas.Hartmann@nokia.com>
Fri, 26 Nov 2010 11:02:11 +0000 (12:02 +0100)
committercon <qtc-committer@nokia.com>
Fri, 26 Nov 2010 11:14:53 +0000 (12:14 +0100)
The current Qt Version might be build with mingw or even be a Symbian
or Maemo target. This patch ensures that we do not try to load a plugin
from the configured Qt Version anymore.
Instead we only load plugins provided by Qt Creator
or plugins which are specified by:  QML_IMPORT_PATH

Reviewed-by: Kai Koehne
Reviewed-by: Erik Verbruggen
src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

index 6e1c748..41d3aa1 100644 (file)
@@ -580,8 +580,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
     { // Have the QML engine check if the document is valid:
         QDeclarativeEngine engine;
         engine.setOutputWarningsToStandardError(false);
-        foreach (const QString &importPath, importPaths)
-            engine.addImportPath(importPath);
         QDeclarativeComponent comp(&engine);
         comp.setData(data.toUtf8(), url);
         if (comp.status() == QDeclarativeComponent::Error) {