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

Using Namespaces in QtScript

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes