void DecoderIOFactoryUrl::replyFinished(QNetworkReply *reply) { if (reply->error() != QNetworkReply::NoError) { doFailed("Cannot retrieve remote file."); return; } QUrl possibleRedirectUrl = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); if (!possibleRedirectUrl.isEmpty() && (m_redirectedURL != possibleRedirectUrl)) { VERBOSE(VB_PLAYBACK, QString("DecoderIOFactory: Got redirected to %1").arg(possibleRedirectUrl)); m_redirectCount++; if (m_redirectCount > MaxRedirects) { doFailed("Too many redirects"); } else { setUrl(possibleRedirectUrl); m_redirectedURL = possibleRedirectUrl; start(); } return; } m_redirectedURL.clear(); if (!m_started) doStart(); }
// start game const unsigned int Game::startContest(const std::string& filename, const unsigned int startPlayer) { unsigned int loser = 0; // reset both players m_player[0].reset(); m_player[1].reset(); if ( ( 0 != startPlayer ) && ( 1 != startPlayer ) ) { std::cout << "Game::start() error: start player is not 0 or 1" << std::endl; } else { m_currentPlayer = startPlayer; // load field if ( m_field.readContest(filename) ) { loser = doStart(true); } } return loser; }
void Condition::setData(const QVariantMap& data) { doRestore(data); emit dataChanged(data); if(running()) doStart(); }
void MappingRequest::start() { if (QThread::currentThread() != thread()) { QMetaObject::invokeMethod(this, "start", Qt::AutoConnection); return; } doStart(); };
virtual void start() { ActivityTimer s(totalCycles, timeActivities); doStart(); eof = false; dataLinkStart(); }
UltraGridMainWindow::UltraGridMainWindow(QWidget *parent) { setupUi(this); // this sets up GUI started = false; history = settings.getHistory(); completer = new QCompleter(QStringList::fromSet(history), this); address->setCompleter(completer); address->completer()->setCompletionMode(QCompleter::PopupCompletion); // signals/slots connect( pushButton_start, SIGNAL( clicked() ), this, SLOT( doStart() ) ); connect( pushButton_advanced, SIGNAL( clicked() ), this, SLOT( doAdvanced() ) ); connect( pushButton_terminal, SIGNAL( clicked() ), this, SLOT( doTerminal() ) ); connect( actionAbout, SIGNAL( triggered() ), this, SLOT( about() ) ); connect( &process, SIGNAL( finished( int, QProcess::ExitStatus ) ), this, SLOT( UGHasFinished( int, QProcess::ExitStatus ) ) ); connect( &process, SIGNAL( readyReadStandardOutput () ), this, SLOT( outputAvailable ()) ); connect( &process, SIGNAL( readyReadStandardError () ), this, SLOT( outputAvailable ()) ); setStatusBar(&statusBar); terminal = new Terminal(this); }
void ConsoleApplication::start(void) { SerialExecutable::start(); // do stuff doStart(); emit (started()); }
void ResourceTask::onSessionRequested(qint64 requestId, KIMAP::Session *session, int errorCode, const QString &/*errorString*/) { if (requestId != m_sessionRequestId) { // Not for us, ignore return; } disconnect(m_pool, &SessionPool::sessionRequestDone, this, &ResourceTask::onSessionRequested); m_sessionRequestId = 0; if (errorCode != SessionPool::NoError) { switch (m_actionIfNoSession) { case CancelIfNoSession: qCDebug(IMAPRESOURCE_LOG) << "Cancelling this request. Probably there is no more session available."; m_resource->cancelTask(i18n("There is currently no session to the IMAP server available.")); break; case DeferIfNoSession: qCDebug(IMAPRESOURCE_LOG) << "Defering this request. Probably there is no more session available."; m_resource->deferTask(); break; } deleteLater(); return; } m_session = session; if (errorCode != SessionPool::NoError) { Trace() << "Error on: " << metaObject()->className(); switch (m_actionIfNoSession) { case CancelIfNoSession: qCDebug(IMAPRESOURCE_LOG) << "Cancelling this request. Probably there is no more session available."; m_resource->cancelTask(i18n("There is currently no session to the IMAP server available.")); break; case DeferIfNoSession: qCDebug(IMAPRESOURCE_LOG) << "Defering this request. Probably there is no more session available."; m_resource->deferTask(); break; } deleteLater(); return; } m_session = session; connect(m_pool, &SessionPool::connectionLost, this, &ResourceTask::onConnectionLost); connect(m_pool, &SessionPool::disconnectDone, this, &ResourceTask::onPoolDisconnect); Trace() << "starting: " << metaObject()->className(); doStart(m_session); }
void DecoderHandler::createPlaylistFromFile(const QUrl &url) { QString file = url.toLocalFile(); PlayListFile::parse(&m_playlist, file); doStart((m_playlist.size() > 0)); }
Publisher::Publisher(LampInfo &info1) :poller(NULL), client(NULL), group(NULL), running(false), info(info1) { serviceType = "_device._tcp"; txtDataDeviceName="deviceName="+info.getDeviceName(); txtDataSerialNumber="serialNumber="+info.getSerialNumber(); txtDataProviderClassName="providerClassName=mta.yos.zeroconf.providers.CppLampProvider"; doStart(); }
void IVtkAdaptorService::starting() throw(fwTools::Failed) { /// Install observation m_connections->connect(this->getObject(), this->getSptr(), this->getObjSrvConnections()); assert( m_renderService.lock() ); doStart(); requestRender(); }
void Action::timerEvent(QTimerEvent* event) { const int timerId(event->timerId()); if(timerId == mStartTimerId) { killTimer(mStartTimerId); mStartTimerId = 0; doStart(false); doExecute(mValue); mRunning = true; } }
void BlobResourceHandle::start() { if (!m_async) { doStart(); return; } // Finish this async call quickly and return. callOnMainThread([protectedThis = Ref<BlobResourceHandle>(*this)]() mutable { protectedThis->doStart(); }); }
int IODevice::start() { state_ = IODEV_ACTIVE; if(doStart() == MW_SUCCESS) { return MW_SUCCESS; } else return MW_FAILED; }
void DecoderHandler::createPlaylistForSingleFile(const QUrl &url) { PlayListFileEntry *entry = new PlayListFileEntry; if (url.scheme() == "file" || QFileInfo(url.toString()).isAbsolute()) entry->setFile(url.toLocalFile()); else entry->setFile(url.toString()); m_playlist.add(entry); doStart((m_playlist.size() > 0)); }
void BlobResourceHandle::start() { if (m_async) { // Keep BlobResourceHandle alive until delayedStartBlobResourceHandle runs. ref(); // Finish this async call quickly and return. callOnMainThread(delayedStartBlobResourceHandle, this); return; } doStart(); }
void DecoderIOFactoryUrl::readyRead(void) { int available = DecoderIOFactory::DefaultBufferSize - m_input->bytesAvailable(); QByteArray data = m_reply->read(available); m_bytesWritten += data.size(); m_input->writeData(data.data(), data.size()); if (!m_started && m_bytesWritten > DecoderIOFactory::DefaultPrebufferSize) { m_reply->setReadBufferSize(DecoderIOFactory::DefaultPrebufferSize); doStart(); } }
void BlobResourceHandle::start() { if (!m_async) { doStart(); return; } RefPtr<BlobResourceHandle> handle(this); // Finish this async call quickly and return. callOnMainThread([handle] { handle->doStart(); }); }
void Service::main() { mStatusHandle = RegisterServiceCtrlHandlerW( mName.c_str(), _serviceControlHandler ); if ( !mStatusHandle ) EXCEPT_WINAPI( L"Couldn't register service control handler" ); setState( SERVICE_START_PENDING, 0 ); doInitialize(); setState( SERVICE_START_PENDING, 1 ); doStart(); WaitForSingleObject( mRunEvent, INFINITE ); setState( SERVICE_RUNNING, 0 ); WaitForSingleObject( mStopEvent, INFINITE ); doCleanup(); }
void DecoderIOFactoryUrl::readyRead(void) { int available = DecoderIOFactory::DefaultBufferSize - m_input->bytesAvailable(); QByteArray data = m_reply->read(available); m_bytesWritten += data.size(); m_input->writeData(data.data(), data.size()); if (!m_started && m_bytesWritten > DecoderIOFactory::DefaultPrebufferSize) { m_reply->setReadBufferSize(DecoderIOFactory::DefaultPrebufferSize); doStart(); } // VERBOSE(VB_IMPORTANT, QString("DecoderIOFactoryUrl::readyRead file size: %1").arg(m_bytesWritten)); }
void Action::start(bool running) { doCancelRestore(); if(!mRunning && running) { doStart(true); doExecute(mValue); mRunning = true; } if(!mRunning && !mStartTimerId) { mStartTimerId = startTimer(mStartDelay); } }
// start game const unsigned int Game::start(const unsigned int startPlayer) { unsigned int loser = 0; if ( ( 0 != startPlayer ) && ( 1 != startPlayer ) ) { std::cout << "Game::start() error: start player is not 0 or 1" << std::endl; } else { m_currentPlayer = startPlayer; loser = doStart(false); } return loser; }
void ProcessManagerBase::Loop() { { std::lock_guard<std::mutex> lock(state_mtx_); if(state_ == STATE_RUNNING) return; else if(state_ != STATE_NULL) return; setupSignals(); VLOG(2) << _("ProcessManager: initializing."); if(!doStart()) { LOG(ERROR) << _("ProcessManager: initializing failed."); return; } state_ = STATE_RUNNING; } VLOG(2) << _("ProcessManager: starting main loop."); loop(); }
void Condition::start() { mRunning = true; doStart(); }
void UPowerSuspendJob::start() { QTimer::singleShot(0, this, SLOT(doStart())); }
RotationController::RotationController(): InputController(), m_factor(0.5) { setDataRate(&m_rotationSensor); doStart(); }
void SkXMLAnimatorWriter::onStartElementLen(const char name[], size_t length) { doStart(name, length); fParser->onStartElementLen(name, length); }
bool FriExampleAbstract::startHook(){ initializeCommand(); return doStart(); }
void HbSplashGenerator::start(bool forceRegen) { mForceRegen = forceRegen; QTimer::singleShot(5000, this, SLOT(doStart())); }
MagnetometerController::MagnetometerController(): m_width(View::m_imageWidth){ setDataRate(&m_magnetometer); m_magnetometer.setProperty("returnGeoValues", true); doStart(); }