From 8ee51d3497c7e7ae02da81a84c5e127161e200c6 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 4 Mar 2015 18:06:55 -0800 Subject: [PATCH] Add getMainToolBar for unit test writing --- src/ui/MainWindow.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index 237e3176a..eab397705 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -125,6 +125,11 @@ public: /// @brief Restore (and connects) the last used connection (if any) void restoreLastUsedConnection(); + +#ifdef UNITTEST_BUILD + // Returns a pointer to the MainToolBar so that unit tests can change views. + MainToolBar* getMainToolBar(void) { return _mainToolBar; } +#endif public slots: -- 2.22.0