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

QtQuickCompiler 1.1 is not generating actual code when using QT_TR_NOOP

    XMLWordPrintable

Details

    Description

      Hello.

      I 'm currently working on an application and when I use the QT_TR_NOOP

      ListElement { textNode: QT_TR_NOOP("Visit Web Page"); pageLink: "" }
      

      When I run the application, it gives me following error

      QQmlApplicationEngine failed to load component
      qrc:/platform/ios/qml/main.qml:78 ListElement: cannot use script for property value
      

      I think I found the problem. As I understand, QT_TR_NOOP is just the identifier with no affect that helps Linguist. So QtQuickCompiler should ignore QT_TR_NOOP. But the generating lines are:

      // line 78
          context->lineNumber = 78;
      temps[0] = context->compilationUnit->runtimeStrings[125];
          {
              QV4::Scope innerScope(context);
              QV4::ScopedCallData callData(innerScope, 1);
              callData->thisObject = QV4::Encode::undefined();
              callData->args[0] = temps[0];
              {
                  QV4::Value retval;
                  retval = QV4::Runtime::callActivationProperty(context, context->compilationUnit->runtimeStrings[126], callData);
                  if (context->engine->hasException)
                      return QV4::Encode::undefined();
                  temps[1] = retval;
              }
          }
          return temps[1].asReturnedValue();
      
      }
      
      

      It behaves like a function.

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            firatagdas Firat Agdas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes