Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2393

Using Namespaces in QtScript

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.7.0
    • Qt Script
    • None

      When namespaces are used in a QtScript, there is need to prefix the functions with the namespace. E.g., XX::clsB getB() as it needs to match the type registered with qScriptRegisterMetaType().

      The QMetaType typesystem is based on string matching, so even though the function is already defined within the XX namespace, Qt does not know that at runtime. Hence, the strings must match exactly.

      Ideally namespaces in QtScript is document in a page like:
      http://doc.trolltech.com/qt/qtscript.html

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kevwrigh Kevin Wright
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes