Do the docs normally omit when a Qt Class inherits from classes in other libraries?
-
I was sub-classing QException and implemented a what() method:
virtual const QChar* what() const { return what_; }
There was an error related to overriding a base class member. I checked the docs for QException and found no "inherets" entry. I also found no what() method listed under "List of All Members, including inherited members". When I went back to Qt Creator and followed the error to the original defintion, it pointed to std::exception. In the source code for QException, I see that QException does in fact inherit from std::exception.
Not a hard problem to solve on my end, but it did catch me by surprise and got me thinking - when Qt classes inherit from something outside the framework, do the docs say so, or are the methods ever included under the list of inherited methods?
-
I think the answer for your observation is, yes, they omit that information.
-
Hi,
Good question, I would recommend bringing it to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more use oriented.
-
@SGaist Ooh, cool. Thanks!
I searched the qtbase git repo for "public std::" and "private std::" which ought to show classes that inherit from std classes at least. It looks like QException truly is exceptional in this case! It was the only Qt class I could find that used a std base class.