QmlDebugger: Added dialog "Attach to QML Port..."

The dialog is added to Debug->Start Debugging menu option. It specifies the host
and port that the JSDebugClient connects to for listening to debug messages.

Change-Id: I7f828c169ff2338f4780025f72182c5fc8784c4a
Reviewed-on: http://codereview.qt-project.org/4824
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2011-09-13 17:26:02 +02:00
parent f51efea40f
commit bfe5b520f1
9 changed files with 193 additions and 3 deletions

View File

@@ -40,6 +40,7 @@
#include "ui_startexternaldialog.h"
#include "ui_startremotedialog.h"
#include "ui_startremoteenginedialog.h"
#include "ui_attachtoqmlportdialog.h"
#ifdef Q_OS_WIN
# include "shared/dbgwinutils.h"
@@ -805,6 +806,49 @@ void StartRemoteDialog::updateState()
m_ui->serverStartScript->setEnabled(enabled);
}
///////////////////////////////////////////////////////////////////////
//
// AttachToQmlPortDialog
//
///////////////////////////////////////////////////////////////////////
AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
: QDialog(parent),
m_ui(new Ui::AttachToQmlPortDialog)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
connect(m_ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(m_ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}
AttachToQmlPortDialog::~AttachToQmlPortDialog()
{
delete m_ui;
}
void AttachToQmlPortDialog::setHost(const QString &host)
{
m_ui->hostLineEdit->setText(host);
}
QString AttachToQmlPortDialog::host() const
{
return m_ui->hostLineEdit->text();
}
void AttachToQmlPortDialog::setPort(const int port)
{
m_ui->portSpinBox->setValue(port);
}
int AttachToQmlPortDialog::port() const
{
return m_ui->portSpinBox->value();
}
// --------- StartRemoteCdbDialog
static inline QString cdbRemoteHelp()
{