[Development] Problems with QmlEngine and importPath

Wehmer, Matthias Matthias.Wehmer at draeger.com
Mon Sep 3 09:40:07 CEST 2012


Hi everybody,

After I've been given a clue about some test features in Qt5 I tried out the qqmlmoduleplugin test in tests/auto/qml in the Qt source directory.
It turned out that this test failed with the same symptoms we've observed in out project. I send you a shortend version of the output.
There seems to be a problem with the loading of dll's in windows.
Is anyone addressing this problem or should I report a bug? Is here anyone else using Qt with Windows XP or any other Windows version?

Thanks for your help.

Greetings
Matthias



********* Start testing of tst_qqmlmoduleplugin *********

Config: Using QTest library 5.0.0, Qt 5.0.0

PASS : tst_qqmlmoduleplugin::initTestCase()

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImportDatabase::addImportPath: "C:/Qt/5.0_angle/qtbase/imports"

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImportDatabase::addImportPath: "C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/debug"

QML debugging is enabled. Only use this in a safe environment.

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImportDatabase::addImportPath: "C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/imports"

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImports(file:///C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/data/works.qml)::addImplicitImport

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImports(file:///C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/data/works.qml)::addLibraryImport: "com.nokia.AutoTestQmlPluginType" 1.0 as ""

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImports(file:///C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/data/works.qml)::importExtension: loaded "C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType/qmldir"

QDEBUG : tst_qqmlmoduleplugin::importsPlugin() QQmlImportDatabase::resolvePlugin: Could not resolve plugin "plugin" in "C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/imports/com/nokia/AutoTestQmlPluginType"

QWARN : tst_qqmlmoduleplugin::importsPlugin() file:///C:/Qt/5.0_angle/qtdeclarative/tests/auto/qml/qqmlmoduleplugin/data/works.qml:1:1: module "com.nokia.AutoTestQmlPluginType" plugin "plugin" not found

import com.nokia.AutoTestQmlPluginType 1.0?

^

FAIL! : tst_qqmlmoduleplugin::importsPlugin() '!component.isError()' returned FALSE. ()

tst_qqmlmoduleplugin.cpp(148) : failure location



[...]



tst_qqmlmoduleplugin.cpp(493) : failure location

PASS : tst_qqmlmoduleplugin::cleanupTestCase()

Totals: 11 passed, 17 failed, 0 skipped

********* Finished testing of tst_qqmlmoduleplugin *********

Number of leaked items: 0
C:\Qt\5.0_angle\qtdeclarative\tests\auto\qml\qqmlmoduleplugin\debug\tst_qqmlmoduleplugin.exe exited with code 17


----------------------------------------------------------------------------------------------------------

Message: 4
Date: Tue, 28 Aug 2012 09:42:58 +0200
From: "Wehmer, Matthias" <Matthias.Wehmer at draeger.com>
Subject: [Development] Problems with QmlEngine and importPath
To: "development at qt-project.org" <development at qt-project.org>
Message-ID:
      <D0C7F8994CDD784C849786CFDBE5A92804443D7657 at CDECLUEXMBX03.corp.draeger.global>

Content-Type: text/plain; charset="us-ascii"

Hi everybody,

we are currently suffering from the following problem: We fail to change the default directory for our custom qml plugins, that we have written in C++, and that we want to import (e.g. via import custom_plugin 1.0). That is the only directory our QML applications find the plugins is in the default import directory from the Qt5 directory. What is also strange is that the Qt Creator recognizes our plugin (i.e. the syntax highlighting works) in an arbitrary directory as long as the QML_IMPORT_PATH is set.

We are using Qt5 with the angle project and the Qt Creator.

That is what we've tried so far:

 1.  changing the QML_IMPORT_PATH: although this results in syntax highlighting in the Qt Creator, our application still doesn't find the plugins  2.  using QmlEngine::addImportPath( dest ) : the path is in the importPathList now, we've checked that, but the plugins can't be found anyway  3.  varying the qmldir files: doesn't work either

Is this a known problem or is there an error in our application?
Thank you in advance for your help.

Greetings
Matthias

 (i.e. the syntax highlighting works) in an arbitrary directory as long as the QML_IMPORT_PATH is set.

---
This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthaelt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfaenger dieser E-mail sein, senden Sie bitte diese an den Absender zurueck und loeschen Sie die E-mail aus Ihrem System.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120903/831a7e3e/attachment.html>


More information about the Development mailing list