DebuggerPerlDBGP::DebuggerPerlDBGP(LanguageSettings* langs) : AbstractDebugger(langs), m_name("perldbgp"), m_isRunning(false), m_isJITActive(false), m_listenPort(-1), m_currentExecutionPoint(0), m_globalExecutionPoint(0), m_pdbgSettings(0), m_net(0) { m_pdbgSettings = new PerlDBGPSettings(Protoeditor::self()->settings()->configFile(), name(), label(), langSettings()); langSettings()->registerDebuggerSettings(name(), m_pdbgSettings); m_currentExecutionPoint = new DebuggerExecutionPoint(); m_globalExecutionPoint = new DebuggerExecutionPoint(); connect(Protoeditor::self()->settings(), SIGNAL(sigSettingsChanged()), this, SLOT(slotSettingsChanged())); m_net = new PerlDBGPNet(this); connect(m_net, SIGNAL(sigStarted()), this, SLOT(slotStarted())); connect(m_net, SIGNAL(sigClosed()), this, SLOT(slotStopped())); connect(m_net, SIGNAL(sigError(const QString&)), this, SIGNAL(sigInternalError(const QString&))); connect(m_net, SIGNAL(sigStepDone()), this, SLOT(slotStepDone())); connect(m_net, SIGNAL(sigNewConnection()), this, SLOT(slotNewConnection())); //connect(m_net, SIGNAL(sigBreakpoint()), this, SLOT(slotBreakpoint())); }
/****************************************************************************** * Check whether the alarm daemon has started yet, and if so, whether it is * ready to accept DCOP calls. */ void Daemon::updateRegisteredStatus(bool timeout) { if (!kapp->dcopClient()->isApplicationRegistered(DAEMON_APP_NAME)) { mStatus = STOPPED; mRegisterFailMsg = false; } else { switch (mStatus) { case STOPPED: // The daemon has newly been detected as registered with DCOP. // Wait for a short time to ensure that it is ready for DCOP calls. mStatus = RUNNING; QTimer::singleShot(startCheckInterval, mInstance, SLOT(slotStarted())); break; case RUNNING: if (timeout) { mStatus = READY; start(); } break; case READY: case REGISTERED: break; } } kdDebug(5950) << "Daemon::updateRegisteredStatus() -> " << mStatus << endl; }
void toEventQuery::start() { if ( Worker || Started || WorkDone ) throw tr("toEventQuery::start - can not restart already stared query"); Worker = new toEventQueryWorker(this, Connection, CancelCondition, SQL, Param); Worker->moveToThread(Thread); Thread->Slave = Worker; // Connect to Worker's API connect(Worker, SIGNAL(headers(toQColumnDescriptionList &, int)), // BG -> main this, SLOT(slotDesc(toQColumnDescriptionList &, int))); connect(Worker, SIGNAL(data(const ValuesList &)), // BG -> main this, SLOT(slotData(const ValuesList &))); connect(Worker, SIGNAL(error(const toConnection::exception &)), // BG -> main this, SLOT(slotError(const toConnection::exception &))); connect(Worker, SIGNAL(workDone()), // BG -> main this, SLOT(slotFinished())); connect(Worker, SIGNAL(rowsProcessed(unsigned long)), // BG -> main this, SLOT(slotRowsProcessed(unsigned long))); connect(this, SIGNAL(dataRequested()), Worker, SLOT(slotRead())); // main -> BG connect(this, SIGNAL(consumed()), Worker, SLOT(slotRead())); // main -> BG // Connect to QThread's API // error handling connect(Worker, SIGNAL(error(toConnection::exception const &)) // BG -> main , this, SLOT(slotError(toConnection::exception const &))); // initization connect(Thread, SIGNAL(started()), Worker, SLOT(init())); // main -> BG connect(Worker, SIGNAL(started()), this, SLOT(slotStarted()));// BG -> main // finish connect(Worker, SIGNAL(finished()), Thread, SLOT(quit())); // BG -> BG?? (quit event loop) connect(Worker, SIGNAL(finished()), Worker, SLOT(deleteLater())); // BG -> BG connect(Thread, SIGNAL(finished()), Thread, SLOT(deleteLater())); // BG -> main connect(Thread, SIGNAL(destroyed()), this, SLOT(slotThreadEnd())); // main -> main connect(this, SIGNAL(stopRequested()), Worker, SLOT(slotStop())); // main -> BG TLOG(7, toDecorator, __HERE__) << "toEventQuery start" << std::endl; // finally start the thread Thread->start(); }
OwncloudSetupWizard::OwncloudSetupWizard( FolderMan *folderMan, QObject *parent ) : QObject( parent ), _ocInfo(0), _folderMan(folderMan) { _process = new QProcess( this ); QObject::connect(_process, SIGNAL(readyReadStandardOutput()), SLOT(slotReadyReadStandardOutput())); QObject::connect(_process, SIGNAL(readyReadStandardError()), SLOT(slotReadyReadStandardError())); QObject::connect(_process, SIGNAL(stateChanged(QProcess::ProcessState)), SLOT(slotStateChanged(QProcess::ProcessState))); QObject::connect(_process, SIGNAL(error(QProcess::ProcessError)), SLOT(slotError(QProcess::ProcessError))); QObject::connect(_process, SIGNAL(started()), SLOT(slotStarted())); QObject::connect(_process, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(slotProcessFinished(int, QProcess::ExitStatus))); _ocWizard = new OwncloudWizard(); connect( _ocWizard, SIGNAL(connectToOCUrl( const QString& ) ), this, SLOT(slotConnectToOCUrl( const QString& ))); connect( _ocWizard, SIGNAL(installOCServer()), this, SLOT(slotInstallOCServer())); connect( _ocWizard, SIGNAL(installOCLocalhost()), this, SLOT(slotCreateOCLocalhost())); // in case of cancel, terminate the owncloud-admin script. connect( _ocWizard, SIGNAL(rejected()), _process, SLOT(terminate())); }