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

moc should warn if Q_PROPERTY read/write methods conflict with the property

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • Build tools: moc
    • Foundation Sprint 72

      moc should warn if I try to do something stupid like this:

      class MyClass : public QObject
      {
          Q_OBJECT
          Q_PROPERTY(bool prop READ prop)
          bool m_prop;
      public:
          Q_INVOKABLE bool prop() { return m_prop; }
      }
      

      And likewise if the bool prop() method were a slot since in both cases the method name will clash with the property name when used from a QML/Javascript context.

        For Gerrit Dashboard: QTBUG-57688
        # Subject Branch Project Status CR V

            saghinet Samuel Ghinet
            nocnokneo Taylor Braun-Jones
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There is 1 open Gerrit change