No, I'm talking about this:

Qt Code:
  1. //Header file connection.h
  2.  
  3. #ifndef CONNECTION_H
  4. #define CONNECTION_H
  5.  
  6. #include <QTcpSocket>
  7.  
  8. class Connection() : public QTcpSocket
  9. {
  10. Q_OBJECT
  11. Q_ENUMS( Listing )
  12. Q_PROPERTY( Listing listing READ listing WRITE setListing )
  13. public:
  14. Connection( const QString&, const quint16& );
  15. ~Connection();
  16. enum Listing{ NOT_LISTING = 0, LISTING_ARTICLES = 1, LISTING_GROUPS = 2 };
  17. Listing listing() const;
  18. void setListing( Listing l);
  19. private:
  20. Listing lst;
  21. };
  22.  
  23. #endif //CONNECTION_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. //connection.cpp
  2.  
  3. #include "connection.h"
  4.  
  5. ...
  6.  
  7. Connection::Listing Connection::listing() const
  8. {
  9. return lst;
  10. }
  11.  
  12. void Connection::setListing( Listing l )
  13. {
  14. lst = l;
  15. }
  16.  
  17. ...
To copy to clipboard, switch view to plain text mode 
I find it illogical that the return value of the function listing() has to be written as Connection::Listing when you are accessing it from the class implementation. Maybe it's just a gcc quirk, I don't know. But it doesn't bitch about accessing it as "Listing" anwhere else (as seen in the header file). Just when returning it from the function.
Maybe it's just some ANSI c++ rule I've never encountered since I don't normally use enums to do things. But I thought it was wierd when I ran into it a few days ago.