void Connection::start() { profile.lastTime = QDateTime::currentDateTime(); //perform a latency test if the latency is unknown if (profile.latency == SQProfile::LATENCY_UNKNOWN) { latencyTest(); } QSS::Profile qssprofile = profile.toProfile(); if (controller) { controller->deleteLater(); } controller = new QSS::Controller(true, false, this); connect(controller, &QSS::Controller::runningStateChanged, [&](bool run){ running = run; emit stateChanged(run); }); connect(controller, &QSS::Controller::tcpLatencyAvailable, this, &Connection::onLatencyAvailable); connect(controller, &QSS::Controller::newBytesReceived, this, &Connection::onNewBytesTransmitted); connect(controller, &QSS::Controller::newBytesSent, this, &Connection::onNewBytesTransmitted); connect(controller, &QSS::Controller::info, this, &Connection::onNewLog); if (profile.debug) { connect(controller, &QSS::Controller::debug, this, &Connection::onNewLog); } controller->setup(qssprofile); if (!controller->start()) { emit startFailed(); } }
RemoteObjectChooser::RemoteObjectChooser(QWidget* parent): QWidget(parent), mCurrentRemoteObject(0), mSuccessfullyStarted(false) { setWindowFlags(Qt::Window); Q_ASSERT(parent); ui = new Ui::RemoteObjectChooser(); ui->setupUi(this); QPushButton* button = ui->dialogButtonBox->button(QDialogButtonBox::Ok); button->setObjectName("okButton"); button->setEnabled(false); connect(button, SIGNAL(clicked(bool)), this, SLOT(accept())); button = ui->dialogButtonBox->button(QDialogButtonBox::Cancel); button->setObjectName("cancelButton"); connect(button, SIGNAL(clicked(bool)), this, SLOT(cancel())); connect(TargetApplication::self(), SIGNAL(started()), this, SLOT(handleTargetApplicationStarted())); connect(TargetApplication::self(), SIGNAL(startFailed(TargetApplication::Error)), this, SLOT(cancel())); connect(TargetApplication::self(), SIGNAL(finished()), this, SLOT(handleTargetApplicationFinished())); if (TargetApplication::self()->remoteEditorSupport()) { handleTargetApplicationStarted(); } else { TargetApplicationView* targetApplicationView = new TargetApplicationView(TargetApplication::self(), this); targetApplicationView->start(); } }
GdbRemotePlainEngine::GdbRemotePlainEngine(const DebuggerStartParameters &startParameters) : GdbAbstractPlainEngine(startParameters), m_gdbProc(startParameters.connParams, this) { connect(&m_gdbProc, SIGNAL(started()), this, SLOT(handleGdbStarted())); connect(&m_gdbProc, SIGNAL(startFailed()), this, SLOT(handleGdbStartFailed1())); }
RemotePlainGdbAdapter::RemotePlainGdbAdapter(GdbEngine *engine, QObject *parent) : AbstractPlainGdbAdapter(engine, parent), m_gdbProc(engine->startParameters().connParams, this) { connect(&m_gdbProc, SIGNAL(started()), this, SLOT(handleGdbStarted())); connect(&m_gdbProc, SIGNAL(startFailed()), this, SLOT(handleGdbStartFailed())); }
void TutorialTester::testTutorial() { if (TargetApplication::self()->remoteEditorSupport()) { sendTutorialToTargetApplication(); } else { connect(TargetApplication::self(), SIGNAL(started()), this, SLOT(sendTutorialToTargetApplication())); connect(TargetApplication::self(), SIGNAL(startFailed(TargetApplication::Error)), this, SLOT(deleteLater())); TargetApplicationView* targetApplicationView = new TargetApplicationView(TargetApplication::self(), mTutorialEditor); targetApplicationView->start(); } }
void Connection::start() { profile.lastTime = QDateTime::currentDateTime(); //perform a latency test if the latency is unknown if (profile.latency == -3) { latencyTest(); } QSS::Profile qssprofile; qssprofile.server = profile.serverAddress; qssprofile.server_port = profile.serverPort; qssprofile.local_address = profile.localAddress; qssprofile.local_port = profile.localPort; qssprofile.method = profile.method; qssprofile.password = profile.password; qssprofile.timeout = profile.timeout; qssprofile.http_proxy = profile.httpMode; qssprofile.debug = profile.debug; if (controller) { controller->deleteLater(); } controller = new QSS::Controller(true, false, this); connect(controller, &QSS::Controller::runningStateChanged, [&](bool run){ running = run; emit stateChanged(run); }); connect(controller, &QSS::Controller::newBytesReceived, this, &Connection::onNewBytesTransmitted); connect(controller, &QSS::Controller::newBytesSent, this, &Connection::onNewBytesTransmitted); connect(controller, &QSS::Controller::info, this, &Connection::onNewLog); if (profile.debug) { connect(controller, &QSS::Controller::debug, this, &Connection::onNewLog); } controller->setup(qssprofile); if (!controller->start()) { emit startFailed(); } }