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

meta object system not support UTF8 slot name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.10.0
    • None

    Description

      When I try to connect a signal to a UTF8 slot (UTF8 identifier name, CJK characters), moc file report error: _a not a member.
      But UTF8 signal name is ok.

      And I use new connect style.

      Unfortunately, it still complains even I use the new style connect.

       

      void MonitorListWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
      {
          if (_c == QMetaObject::InvokeMetaMethod) {
              MonitorListWindow *_t = static_cast<MonitorListWindow *>(_o);
              Q_UNUSED(_t)
              switch (_id) {
              case 0: { int _r = _t->void((*reinterpret_cast< bool(*)>(_a[1])));
                  if (_a[0]) *reinterpret_cast< int*>(_a[0]) = std::move(_r); }  break;
              default: ;
              }
          }
      }
      
      

      Moc file, in case 0: C2039 _a is not the member of MonitorListWindow.

       And my connect code:

      auto 刷新 = new QAction(刷新图标, tr("Rescan"), this);
          刷新->setStatusTip(tr("Show/Hide monitor list."));
          QObject::connect(刷新, &QAction::triggered, this, &MonitorListWindow::重置屏幕截图);
      
      

      And I can't even define a signal with CJK name. Just put a CJK named signal into the header file and compile, you will see the error message. moc file will not pass the compile stage.

      signals:
          void 当前监视器改变(int id);
      

      I am using MSVC2017 64bit community edition.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            hanrai911 Lei Fan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes