* @brief A helper function telling if we shall log for the widget given * * This method defines which widgets not to log for. These include ToolBar widgets * and Menu widgets as well as special ones used internally by Qt. */
| 1084 | * and Menu widgets as well as special ones used internally by Qt. |
| 1085 | */ |
| 1086 | static bool |
| 1087 | is_valid_widget (QWidget *w) |
| 1088 | { |
| 1089 | if (dynamic_cast <QToolBar *> (w) != 0 || |
| 1090 | dynamic_cast <QMenuBar *> (w) != 0 || |
| 1091 | dynamic_cast <QMenu *> (w) != 0) { |
| 1092 | return false; |
| 1093 | } else if (w->parentWidget () == 0) { |
| 1094 | return (dynamic_cast <QDialog *> (w) != 0 || dynamic_cast <QMainWindow *> (w) != 0); |
| 1095 | } else { |
| 1096 | return is_valid_widget (w->parentWidget ()); |
| 1097 | } |
| 1098 | } |
| 1099 | |
| 1100 | class ErrorLogRecorder |
| 1101 | : public tl::Channel |