Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-998

Metadata URI in static plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.6.0, 1.7.0
    • 1.5.2
    • General
    • None
    • 3918ce3601 (workaround for 1.6), b55f13c52e (proper fix in 1.7)

    Description

      I am trying to build a static QML plugin and a test application using it (see attached project files). So far, I have succeeded in building the plugin and application, but when I try to run it (using qbs run), I get the following error message:

      file:///home/dt/work/testqtplugin/test/tst_foo.qml:3:1: static plugin for module "myplugin" with name "MyPlugin" has no metadata URI
           import myplugin 1.0
           ^
      ********* Start testing of myplugin *********
      Config: Using QtTest library 5.7.0, Qt 5.7.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.9.1 20140922 (Red Hat 4.9.1-10))
      QWARN  : myplugin::tst_foo::compile()
        /home/dt/work/testqtplugin/test/tst_foo.qml produced 1 error(s):
          /home/dt/work/testqtplugin/test/tst_foo.qml:3,1: static plugin for module "myplugin" with name "MyPlugin" has no metadata URI
        Working directory: /home/dt/work/testqtplugin
        View: QQuickView, import paths:
          '/home/dt/work/testqtplugin/qt5-debug/install-root/bin'
          'qrc:/qt-project.org/imports'
          '/home/dt/Qt/5.7/gcc_64/qml'
        Plugin paths:
          '.'
      

      With QMake, the solution was adding

      QMAKE_MOC_OPTIONS += -Muri=myplugin

      to the .pro file.
      Currently, there is no property in Qbs for setting arbitrary moc flags.

      Attachments

        1. mocOptions.patch
          2 kB
        2. src.qbs
          0.4 kB
        3. test.qbs
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            dtomas dtomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes