From 844cee07e8a16130d1f2df8886ab342df68923de Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 3 Feb 2014 03:44:39 -0800 Subject: [PATCH] Make sure GDB window is created in sync with GDB server state --- src/platform/qt/GDBWindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/qt/GDBWindow.cpp b/src/platform/qt/GDBWindow.cpp index a3f79bc1e..8f051e203 100644 --- a/src/platform/qt/GDBWindow.cpp +++ b/src/platform/qt/GDBWindow.cpp @@ -39,10 +39,13 @@ GDBWindow::GDBWindow(GDBController* controller, QWidget* parent) connect(m_bindAddressEdit, SIGNAL(textChanged(const QString&)), this, SLOT(bindAddressChanged(const QString&))); settingsGrid->addWidget(m_bindAddressEdit, 1, 1, Qt::AlignLeft); - m_startStopButton = new QPushButton(tr("Start")); - connect(m_startStopButton, SIGNAL(clicked()), m_gdbController, SLOT(listen())); - connect(m_startStopButton, SIGNAL(clicked()), this, SLOT(started())); + m_startStopButton = new QPushButton; mainSegment->addWidget(m_startStopButton); + if (m_gdbController->isAttached()) { + started(); + } else { + stopped(); + } } void GDBWindow::portChanged(const QString& portString) {