diff options
author | dos-reis <gdr@axiomatics.org> | 2013-04-07 16:52:03 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-04-07 16:52:03 +0000 |
commit | 026723c0e0cfc0c02838c614b3c529d1b5d50c62 (patch) | |
tree | 62774daa5b9c8188726333efb294c1f79142e047 /src/gui/debate.h | |
parent | b5d890ae837ea35d9f5077cf260bf85922259be9 (diff) | |
download | open-axiom-026723c0e0cfc0c02838c614b3c529d1b5d50c62.tar.gz |
gui: fix parent of Debate
Diffstat (limited to 'src/gui/debate.h')
-rw-r--r-- | src/gui/debate.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/debate.h b/src/gui/debate.h index 60749816..b2339d76 100644 --- a/src/gui/debate.h +++ b/src/gui/debate.h @@ -43,22 +43,21 @@ namespace OpenAxiom { - class Debate : public managed_by<QScrollArea, QTabWidget> { + class Debate : public QScrollArea { Q_OBJECT; public: - explicit Debate(QTabWidget*); + explicit Debate(MainWindow*, QTabWidget*); ~Debate(); Conversation* exchanges() { return &conv; } - MainWindow* main_window() const { - return qobject_cast<MainWindow*>(parent()->parent()); - } + MainWindow* main_window() const { return main_win; } Server* server() const { return main_window()->server(); } protected: void resizeEvent(QResizeEvent*); private: + MainWindow* const main_win; Conversation conv; }; } |