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

Shadowed Q_PROPERTY with non-empty params NOTIFY breaks compilation

    XMLWordPrintable

Details

    • All
    • ac001bef7 (dev), d2f663eeb (6.7)

    Description

       

      /Users/torarne/build/qt/6.x/qtdeclarative/src/quick/Quick_autogen/include/moc_qquickwindow.cpp:764:17: error: too few arguments to function call, single argument 'arg' was not specified
          t->xChanged();
          ~~~~~~~~~~~ ^
      /Users/torarne/build/qt/6.x/qtbase/include/QtGui/../../../../../../dev/qt/qtbase/src/gui/kernel/qwindow.h:301:10: note: 'xChanged' declared here
          void xChanged(int arg);
               ^
      

      Caused by code at end of Generator::generateCode() in moc:

          if (!cdef->nonClassSignalList.isEmpty()) {
              fprintf(out, "// If you get a compile error in this function it can be because either\n");
              fprintf(out, "//     a) You are using a NOTIFY signal that does not exist. Fix it.\n");
              fprintf(out, "//     b) You are using a NOTIFY signal that does exist (in a parent class) but has a non-empty parameter list. This is a moc limitation.\n");
              fprintf(out, "[[maybe_unused]] static void checkNotifySignalValidity_%s(%s *t) {\n", qualifiedClassNameIdentifier.constData(), cdef->qualified.constData());
              for (const QByteArray &nonClassSignal : std::as_const(cdef->nonClassSignalList))
                  fprintf(out, "    t->%s();\n", nonClassSignal.constData());
              fprintf(out, "}\n");
          } 

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes