From f01b3af76723d169781ea097d4008f137337a55c Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Sat, 3 May 2008 01:13:11 +0200 Subject: [PATCH] [#75] Connect to currentChanged() signal later, to fix chicken/egg issue raised by Qt 4.4. --- src/mainwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5d5da19..9b246fa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -69,8 +69,6 @@ MainWindow::MainWindow(const QString& variant) m_movelist_stack = new QStackedWidget; - connect(m_main, SIGNAL(currentChanged(int)), - this, SLOT(changeTab(int))); connect(m_main, SIGNAL(closeTab()), this, SLOT(closeTab())); @@ -107,6 +105,10 @@ MainWindow::MainWindow(const QString& variant) // start in edit game mode newGame(variant, AbstractPosition::Ptr(), true); updateVariantActions(); + + // finally hook the signal, now that we're ready to process it + connect(m_main, SIGNAL(currentChanged(int)), + this, SLOT(changeTab(int))); } ChessTable* MainWindow::table() { -- 2.11.4.GIT