[clazy] [Bug 423780] New: clazy-fully-qualified-moc-types not detecting missing namespace

Christian Gagneraud bugzilla_noreply at kde.org
Thu Jul 2 05:24:42 BST 2020


https://bugs.kde.org/show_bug.cgi?id=423780

            Bug ID: 423780
           Summary: clazy-fully-qualified-moc-types not detecting missing
                    namespace
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: chgans at gmail.com
                CC: smartins at kde.org
  Target Milestone: ---

SUMMARY

Given an enum E in a class C in a namespace N, clazy reports an error when the
enum is used fully-unqualified (E value), but doesn't report an error if used
partially-qualified (C:E value).
The only valid usage should be "N:C:E value"

Or the documentation is not accurate, here is the given example:
namespace MyNameSpace {

    struct MyType { (...) };

    class MyObject : public QObject
    {
        Q_OBJECT
        Q_PROPERTY(MyGadget myprop READ myprop); // Wrong, needs namespace
    Q_SIGNALS:
        void mySignal(MyType); // Wrong
        void mySignal(MyNameSpace::MyType); // OK
    };
}


STEPS TO REPRODUCE
run clazy on:
namespace N { 
 class C: QObject 
 { 
  Enum E {}; 
 signals: 
  void function(C:E value) {} 
 }
}

OBSERVED RESULT
No error reported

EXPECTED RESULT
"signal arguments need to be fully-qualified" is emitted


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Stock clazy on Ubuntu 18.04, based on LLVM-6.0.0

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list