void WriterNodeVisitor::apply( osg::Geode &node ) { pushStateSet(node.getStateSet()); //_nameStack.push_back(node.getName()); unsigned int count = node.getNumDrawables(); ListTriangle listTriangles; bool texcoords = false; for ( unsigned int i = 0; i < count; i++ ) { osg::Geometry *g = node.getDrawable( i )->asGeometry(); if ( g != NULL ) { pushStateSet(g->getStateSet()); createListTriangle(g, listTriangles, texcoords, i); // May set _succeded to false popStateSet(g->getStateSet()); if (!succeeded()) break; } } if (succeeded() && count > 0) { #if DISABLE_3DS_ANIMATION osg::Matrix mat( osg::computeLocalToWorld(getNodePath()) ); buildFaces(node, mat, listTriangles, texcoords); // May set _succeded to false #else buildFaces(node, osg::Matrix(), listTriangles, texcoords); // May set _succeded to false #endif } popStateSet(node.getStateSet()); //_nameStack.pop_back(); if (succeeded()) traverse(node); }
result_t load_file(editor_t *ed, handle_t stream) { uint16_t length; int f; result_t result; if(failed(result = stream_length(stream, &length))) return result; ed->stream = stream; ed->start = (char *) neutron_malloc(length + MINEXTEND); if (!ed->start) return e_no_space; if(succeeded(result = stream_setpos(stream, 0)) && succeeded(result = stream_read(stream, ed->start, length, 0))) { ed->gap = ed->start + length; ed->rest = ed->end = ed->gap + MINEXTEND; ed->anchor = -1; } if (failed(result) && ed->start) { neutron_free(ed->start); ed->start = 0; } return result; }
void AttachmentView::slotOpenAttachment() { m_openAttachment->setEnabled(false); Imap::Network::FileDownloadManager *manager = new Imap::Network::FileDownloadManager(this, m_netAccess, m_partIndex); connect(manager, SIGNAL(fileNameRequested(QString*)), this, SLOT(slotFileNameRequestedOnOpen(QString*))); connect(manager, SIGNAL(transferError(QString)), m_messageView, SIGNAL(transferError(QString))); connect(manager, SIGNAL(transferError(QString)), this, SLOT(onOpenFailed())); connect(manager, SIGNAL(transferError(QString)), manager, SLOT(deleteLater())); // we aren't connecting to cancelled() as it cannot really happen -- the filename is never empty connect(manager, SIGNAL(succeeded()), this, SLOT(openDownloadedAttachment())); connect(manager, SIGNAL(succeeded()), manager, SLOT(deleteLater())); manager->downloadPart(); }
bool REIXSXASScanController::customInitializeImplementation() { // remember the state of the beamline at the beginning of the scan. AMControlInfoList positions(REIXSBeamline::bl()->allControlsSet()->toInfoList()); scan_->scanInitialConditions()->setValuesFrom(positions); // Need to move the mono, epu, or exit slit into position? if(config_->applyMonoGrating() || config_->applyMonoMirror() || config_->applyPolarization() || config_->applySlitWidth()) { initialMoveAction_ = new AMListAction(new AMActionInfo("REIXS XAS Initial Move"), AMListAction::ParallelMode); if(config_->applyMonoGrating()) initialMoveAction_->addSubAction(new AMInternalControlMoveAction(REIXSBeamline::bl()->photonSource()->monoGratingSelector(), config_->monoGrating())); if(config_->applyMonoMirror()) initialMoveAction_->addSubAction(new AMInternalControlMoveAction(REIXSBeamline::bl()->photonSource()->monoMirrorSelector(), config_->monoMirror())); if(config_->applySlitWidth()) initialMoveAction_->addSubAction(new AMInternalControlMoveAction(REIXSBeamline::bl()->photonSource()->monoSlit(), config_->slitWidth())); if(config_->applyPolarization()) { initialMoveAction_->addSubAction(new AMInternalControlMoveAction(REIXSBeamline::bl()->photonSource()->epuPolarization(), config_->polarization())); if(config_->polarization() == 5) initialMoveAction_->addSubAction(new AMInternalControlMoveAction(REIXSBeamline::bl()->photonSource()->epuPolarizationAngle(), config_->polarizationAngle())); } connect(initialMoveAction_, SIGNAL(succeeded()), this, SLOT(onInitializationMoveSucceeded())); connect(initialMoveAction_, SIGNAL(failed()), this, SLOT(onInitializationMoveFailed())); initialMoveAction_->start(); } else { setCustomInitializationFinished(true); } return true; }
// Handles the Accounting-Control-Answer from the CCF, parsing out the data the SessionManager needs. void RalfTransaction::on_response(Diameter::Message& rsp) { int result_code = 0; int interim_interval = 0; std::string session_id = "<value not found in Diameter message>"; rsp.result_code(result_code); rsp.get_str_from_avp(_dict->SESSION_ID, session_id); // This isn't a mandatory AVP. If it's missing, the interim interval is // set to 0. rsp.get_i32_from_avp(_dict->ACCT_INTERIM_INTERVAL, interim_interval); if (result_code == 2001) { SAS::Event succeeded(_msg->trail, SASEvent::BILLING_REQUEST_SUCCEEDED, 0); succeeded.add_var_param(session_id); SAS::report_event(succeeded); } else { SAS::Event rejected(_msg->trail, SASEvent::BILLING_REQUEST_REJECTED, 0); rejected.add_var_param(session_id); SAS::report_event(rejected); } _peer_sender->send_cb(result_code, interim_interval, session_id); }
void VESPERSEnergyDacqScanController::cleanup() { buildCleanupAction(true); connect(cleanupAction_, SIGNAL(succeeded()), this, SLOT(onCleanupFinished())); connect(cleanupAction_, SIGNAL(failed(int)), this, SLOT(onCleanupFinished())); cleanupAction_->start(); }
void MainWindow::startTask(Task *task) { connect(task, SIGNAL(started()), SLOT(taskStart())); connect(task, SIGNAL(succeeded()), SLOT(taskEnd())); connect(task, SIGNAL(failed(QString)), SLOT(taskEnd())); task->start(); }
void AsyncTaskInitBusinessLayer::callback( ModelEventListener* eventSink ) { if ( succeeded( m_taskSubmission.get(), eventSink ) ) { eventSink->notify( MODEL_EVENT::APPLICATION_INITIALISED ); } }
void KCheckPass::reapVerify() { m_notifier->setEnabled( false ); m_notifier->deleteLater(); m_notifier = nullptr; ::close( m_fd ); int status; while (::waitpid( m_pid, &status, 0 ) < 0) if (errno != EINTR) { // This should not happen ... cantCheck(); return; } if (WIFEXITED(status)) switch (WEXITSTATUS(status)) { case AuthOk: emit succeeded(); return; case AuthBad: emit failed(); return; case AuthAbort: return; } cantCheck(); }
void SXRMBPersistentView::onBeamOffActionFinished(){ disconnect(beamOffAction_, SIGNAL(succeeded()), this, SLOT(onBeamOffActionFinished())); disconnect(beamOffAction_, SIGNAL(failed()), this, SLOT(onBeamOffActionFinished())); beamOffAction_->deleteLater(); beamOffAction_ = 0; //NULL }
/** * Check if a test has returned true. * @param file Source file containing the test. * @param line Line in the source file of the test. * @param text Explanation about the test. * @param result Result of the test. */ void TestCase::check(CString file, int line, CString text, bool result) { test(file, line, text); if(result) succeeded(); else failed(); }
// Called in Aspect Thread context (not a Qt3D AspectJob) // We are sure that when this is called, no AspectJob are running void MeshDownloadRequest::onCompleted() { if (cancelled() || !succeeded()) return; if (!m_nodeManagers) return; Render::GeometryRenderer *renderer = m_nodeManagers->geometryRendererManager()->lookupResource(m_mesh); if (!renderer) return; QGeometryFactoryPtr geometryFactory = renderer->geometryFactory(); if (!geometryFactory.isNull() && geometryFactory->id() == Qt3DRender::functorTypeId<MeshLoaderFunctor>()) { QSharedPointer<MeshLoaderFunctor> functor = qSharedPointerCast<MeshLoaderFunctor>(geometryFactory); // We make sure we are setting the result for the right request // (the functor for the mesh could have changed in the meantime) if (m_url == functor->sourcePath()) { functor->setSourceData(m_data); // mark the component as dirty so that the functor runs again in the correct job m_nodeManagers->geometryRendererManager()->addDirtyGeometryRenderer(m_mesh); } } }
void Endpoint_v1::TicketRequest::onRequestFinished() { QByteArray respbytes = reply->readAll(); reply->deleteLater(); std::string response ( respbytes.begin(), respbytes.end() ); JSONNode respnode = libJSON::parse ( response ); JSONNode errnode = respnode.at ( "error" ); if (errnode.as_string() != "") { emit failed(QString("server_failure"), QString(errnode.as_string().c_str())); return; } available = FHttpApi::Data_GetTicketDefault; JSONNode subnode = respnode.at ("ticket"); ticket = new Ticket(); ticket->ticket = subnode.as_string().c_str(); ticket->name = _un; ticket->password = _p; subnode = respnode.at("default_character"); defaultCharacter = subnode.as_string().c_str(); subnode = respnode.at("characters"); qslFromJsonArray(subnode, characters); subnode = respnode.at("bookmarks"); qslFromJsonArray(subnode, bookmarks); emit succeeded(); }
void AMDetectorDwellTimeAction::startImplementation(){ // If you still don't have a detector, check the exposed detectors one last time. //if(!detector_) // detector_ = AMBeamline::bl()->exposedDetectorByInfo(*(detectorDwellTimeInfo()->detectorInfo())); if(!detector_ && AMBeamlineSupport::beamlineDetectorAPI()) detector_ = AMBeamlineSupport::beamlineDetectorAPI()->exposedDetectorByInfo(*(detectorDwellTimeInfo()->detectorInfo())); if(!detector_) { AMErrorMon::alert(this, AMDETECTORDWELLTIMEACTION_NO_VALID_DETECTOR, QString("There was an error setting the dwell time for detector '%1', because the detector was not found. Please report this problem to the Acquaman developers.").arg(detectorDwellTimeInfo()->name())); setFailed(); return; } if( detectorDwellTimeInfo()->dwellSeconds() <= 0){ AMErrorMon::alert(this, AMDETECTORDWELLTIMEACTION_NOT_VALID_DWELL, QString("There was an error setting the dwell time for detector '%1', because the requested dwell time was invalid (%2). Please report this problem to the Acquaman developers.").arg(detectorDwellTimeInfo()->name()).arg(detectorDwellTimeInfo()->dwellSeconds())); setFailed(); return; } if(detector_->detectorDwellTimeSource()){ dwellTimeSource_ = detector_->detectorDwellTimeSource(); connect(dwellTimeSource_, SIGNAL(setDwellTime(double)), this, SLOT(onDwellSetStarted(double))); connect(dwellTimeSource_, SIGNAL(succeeded()), this, SLOT(onDwellSetSucceeded())); connect(dwellTimeSource_, SIGNAL(failed()), this, SLOT(onDwellSetFailed())); detectorDwellTimeInfo()->setShortDescription(QString("Set %1 Dwell Time to %2").arg(dwellTimeSource_->name()).arg(detectorDwellTimeInfo()->dwellSeconds())); detectorDwellTimeInfo()->setLongDescription(QString("Set %1 Dwell Time to %2").arg(dwellTimeSource_->name()).arg(detectorDwellTimeInfo()->dwellSeconds())); dwellTimeSource_->requestSetDwellTime(detectorDwellTimeInfo()->dwellSeconds()); }
void CacheDownload::start() { if (!m_entry->stale) { emit succeeded(index_within_job); return; } m_output_file.setFileName(m_target_path); // if there already is a file and md5 checking is in effect and it can be opened if (!ensureFilePathExists(m_target_path)) { emit failed(index_within_job); return; } QLOG_INFO() << "Downloading " << m_url.toString(); QNetworkRequest request(m_url); if (m_entry->remote_changed_timestamp.size()) request.setRawHeader(QString("If-Modified-Since").toLatin1(), m_entry->remote_changed_timestamp.toLatin1()); if (m_entry->etag.size()) request.setRawHeader(QString("If-None-Match").toLatin1(), m_entry->etag.toLatin1()); request.setHeader(QNetworkRequest::UserAgentHeader, "MultiMC/5.0 (Cached)"); auto worker = MMC->qnam(); QNetworkReply *rep = worker->get(request); m_reply = std::shared_ptr<QNetworkReply>(rep); connect(rep, SIGNAL(downloadProgress(qint64, qint64)), SLOT(downloadProgress(qint64, qint64))); connect(rep, SIGNAL(finished()), SLOT(downloadFinished())); connect(rep, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(downloadError(QNetworkReply::NetworkError))); connect(rep, SIGNAL(readyRead()), SLOT(downloadReadyRead())); }
void AllocatorCheck() { unsigned char *pdata = (unsigned char *)os_malloc(1024, 0, "alloc"); if (!pdata) failed("os_malloc"); else { succeeded("os_malloc"); int i; char fail = 0; for (i=0;i<1024;i++) { pdata[i] = i % 255; if (pdata[i] != i % 255) { fail = 1; } } TEST_OK("os_malloc : mem read/write check", fail); TEST_OK("os_free check", os_free(pdata)); } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); ui->serverList->setScrollData(ui->serverScroller, ui->serverScroller->viewport()); ui->serverScroller->setServerList(ui->serverList); // scale the toolbar on hidpi ui->serverToolbar->setFixedHeight(dpiScale(32)+8); SetToolButtonSize(ui->servers_update, dpiScale(32)+4); SetToolButtonSize(ui->servers_updateShown, dpiScale(32)+4); SetToolButtonSize(ui->servers_updateCurrent, dpiScale(32)+4); SetToolButtonSize(ui->servers_setupFilters, dpiScale(32)+4); svupdater = new ServerUpdater(0, ui->serverList); connect(svupdater, SIGNAL(started()), this, SLOT(sUpdateStarted())); connect(svupdater, SIGNAL(succeeded()), this, SLOT(sUpdateSucceeded())); connect(svupdater, SIGNAL(masterSucceeded()), this, SLOT(sUpdateSucceededMaster())); connect(svupdater, SIGNAL(failed(int)), this, SLOT(sUpdateFailed(int))); connect(ui->serverList, SIGNAL(updateRequested(quint32,quint16)), this, SLOT(sUpdateRequested(quint32,quint16))); initOptionsTab(); setMinimumWidth(1024); setMinimumHeight(480); }
int ApplicationUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 16) qt_static_metacall(this, _c, _id, _a); _id -= 16; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = companyname(); break; case 1: *reinterpret_cast< QString*>(_v) = hr(); break; case 2: *reinterpret_cast< QString*>(_v) = emailid(); break; case 3: *reinterpret_cast< QString*>(_v) = address(); break; case 4: *reinterpret_cast< QString*>(_v) = phoneno(); break; case 5: *reinterpret_cast< QString*>(_v) = password(); break; case 6: *reinterpret_cast< QString*>(_v) = vnumber(); break; case 7: *reinterpret_cast< QString*>(_v) = vmodel(); break; case 8: *reinterpret_cast< QString*>(_v) = urllink(); break; case 9: *reinterpret_cast< QString*>(_v) = urlResult(); break; case 10: *reinterpret_cast< bool*>(_v) = succeeded(); break; case 11: *reinterpret_cast< bool*>(_v) = active(); break; } _id -= 12; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setcompanyname(*reinterpret_cast< QString*>(_v)); break; case 1: sethr(*reinterpret_cast< QString*>(_v)); break; case 2: setemailid(*reinterpret_cast< QString*>(_v)); break; case 3: setaddress(*reinterpret_cast< QString*>(_v)); break; case 4: setphoneno(*reinterpret_cast< QString*>(_v)); break; case 5: setpassword(*reinterpret_cast< QString*>(_v)); break; case 6: setvnumber(*reinterpret_cast< QString*>(_v)); break; case 7: setvmodel(*reinterpret_cast< QString*>(_v)); break; case 8: seturllink(*reinterpret_cast< QString*>(_v)); break; case 9: seturlResult(*reinterpret_cast< QString*>(_v)); break; } _id -= 12; } else if (_c == QMetaObject::ResetProperty) { _id -= 12; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 12; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 12; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 12; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 12; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 12; } #endif // QT_NO_PROPERTIES return _id; }
void WriterNodeVisitor::apply( osg::Billboard &node ) { // TODO Does not handle Billboards' points yet pushStateSet(node.getStateSet()); Lib3dsMeshInstanceNode * parent = _cur3dsNode; unsigned int count = node.getNumDrawables(); ListTriangle listTriangles; bool texcoords = false; OSG_NOTICE << "Warning: 3DS writer is incomplete for Billboards (rotation not implemented)." << std::endl; #if DISABLE_3DS_ANIMATION osg::Matrix m( osg::computeLocalToWorld(getNodePath()) ); #endif for ( unsigned int i = 0; i < count; i++ ) { osg::Geometry *g = node.getDrawable( i )->asGeometry(); if ( g != NULL ) { listTriangles.clear(); _cur3dsNode = parent; pushStateSet(g->getStateSet()); createListTriangle(g, listTriangles, texcoords, i); popStateSet(g->getStateSet()); // May set _succeded to false if (!succeeded()) break; osg::Matrix pointLocalMat(osg::Matrix::translate(node.getPosition(i))); // TODO handle rotation #if DISABLE_3DS_ANIMATION osg::Matrix currentBillboardWorldMat(pointLocalMat * m); apply3DSMatrixNode(node, &pointLocalMat, "bil"); // Add a 3DS matrix node (with local matrix) buildFaces(node, currentBillboardWorldMat, listTriangles, texcoords); // May set _succeded to false #else apply3DSMatrixNode(node, &pointLocalMat, "bil"); // Add a 3DS matrix node (with local matrix) buildFaces(node, osg::Matrix(), listTriangles, texcoords); // May set _succeded to false #endif if (!succeeded()) break; } } if (succeeded()) traverse(node); _cur3dsNode = parent; popStateSet(node.getStateSet()); }
void Background_ClientInstaller::run() { Q_EMIT installPercentage(0); // first: get admin rights and set required permissions (it's an issue with the AppWhirr v0.9.15's installer) #ifdef Q_OS_MAC DLog("Client root path: ") << _clientRootPath; QString asToExecute = QString("do shell script \"chmod -R 777 %1\" with administrator privileges").arg(_clientRootPath); Mac_AppleScriptExecutor::executeAppleScript(asToExecute); #endif Q_EMIT installPercentage(10); if(this->_lastStepDone == DoFromTheBeginning) { if(!this->tryToBackup()) { Q_EMIT failedWithErrorMessage(tr("Cannot backup the old version"), DoFromTheBeginning); return; } else { this->_lastStepDone = BackupFinished; } } Q_EMIT installPercentage(25); if(this->_lastStepDone == BackupFinished) { if(!this->tryToRemoveOldVersion()) { Q_EMIT failedWithErrorMessage(tr("Cannot remove the old version. Probably it's still running"), BackupFinished); return; } else { this->_lastStepDone = OldVersionRemoved; } } Q_EMIT installPercentage(50); if(this->_lastStepDone == OldVersionRemoved) { if(!this->copyNewVersion()) { // try to restore from backup - but if the copy of the new version failed this one will as well... PathHelper::copyWholeDirectory(AppSpecificPathHelper::getTmp_ClientSelfUpdate_OldVersionBackupFolder(), this->_clientRootPath, true, PathHelper::SHM_UseAsFile); Q_EMIT failedWithErrorMessage(tr("Cannot install the new version"), OldVersionRemoved); return; } else { this->_lastStepDone = NewVersionCopiedToItsFinalPlace; } } Q_EMIT installPercentage(75); if(this->_lastStepDone == NewVersionCopiedToItsFinalPlace) { if(!this->setRequiredPermissionsForTheNewVersion()) { Q_EMIT failedWithErrorMessage(tr("Cannot set required permissions for the new version"), NewVersionCopiedToItsFinalPlace); return; } else { Q_EMIT installPercentage(100); Q_EMIT succeeded(); } } }
void GenericScanManager::slotSucceeded() { { QMutexLocker locker( &m_mutex ); m_scannerJob = 0; } emit succeeded(); }
void AMSamplePlatePre2013MoveAction::onMoveListCancelled(){ disconnect(moveListAction_, SIGNAL(started()), this, SLOT(onMoveListStarted())); disconnect(moveListAction_, SIGNAL(failed()), this, SLOT(onMoveListFailed())); disconnect(moveListAction_, SIGNAL(succeeded()), this, SLOT(onMoveListSucceeded())); disconnect(moveListAction_, SIGNAL(cancelled()), this, SLOT(onMoveListCancelled())); disconnect(moveListAction_, SIGNAL(progressChanged(double,double)), this, SIGNAL(progressChanged(double,double))); setCancelled(); }
void AMSamplePlatePre2013MoveAction::onMoveListFailed(){ disconnect(moveListAction_, SIGNAL(started()), this, SLOT(onMoveListStarted())); disconnect(moveListAction_, SIGNAL(failed()), this, SLOT(onMoveListFailed())); disconnect(moveListAction_, SIGNAL(succeeded()), this, SLOT(onMoveListSucceeded())); disconnect(moveListAction_, SIGNAL(cancelled()), this, SLOT(onMoveListCancelled())); disconnect(moveListAction_, SIGNAL(progressChanged(double,double)), this, SIGNAL(progressChanged(double,double))); AMErrorMon::alert(this, AMSAMPLEPLATEPRE2013MOVEACTION_MOVELIST_FAILED, QString("There was an error moving one or more motors after start was called.")); setFailed(); }
static void show_key(handle_t dest, memid_t key, bool full_path, bool recursive, uint16_t *indent) { char name[REG_NAME_MAX + 1]; const char * path; if(full_path) path = get_full_path(key); else { reg_query_memid(key, 0, name, 0, 0); path = (char *)neutron_malloc(strlen(name)+1); strcpy((char *)path, name); } field_datatype type = 0; // must be 0 on first call memid_t child = 0; result_t result; while(succeeded(result = reg_enum_key(key, &type, 0, 0, REG_NAME_MAX + 1, name, &child)) && child != 0) { if (type > field_key) show_value(dest, key, type, name, indent, 0); // field_datatype has the field type, name is the child name type = 0; } type = field_key; child = 0; while(succeeded(result = reg_enum_key(key, &type, 0, 0, REG_NAME_MAX + 1, name, &child))) { do_indent(dest, *indent); stream_printf(dest, "dir %s\r\n", name); *indent += 2; if(recursive) show_key(dest, child, false, true, indent); *indent -= 2; type = field_key; } }
void FAccount::loginStart() { debugMessage("account->loginStart()"); ticketvalid = false; loginReply = fapi->getTicket(username, password); connect(loginReply, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(loginSslErrors(QList<QSslError>))); connect(loginReply, SIGNAL(failed(QString,QString)), this, SLOT(onLoginError(QString, QString))); connect(loginReply, SIGNAL(succeeded()), this, SLOT(loginHandle())); }
WebViewDownloadItem::WebViewDownloadItem(QObject *downloaditem, QObject *parent): AbstractDownloadItem(QUrl(), parent), _downloaditem(downloaditem) { this->setUrl(this->getProperty(downloaditem, "url").toUrl()); this->setFileName(this->getProperty(downloaditem, "suggestedFilename").toString()); this->setProgressTotal(this->getProperty(downloaditem, "expectedContentLength").value<qint64>()); this->setProperty(downloaditem, "destinationPath", QString("%1%2%3").arg(this->downloadPath(), QDir::separator(), this->fileName())); connect(downloaditem, SIGNAL(totalBytesReceivedChanged(quint64)), this, SLOT(onByteReceivedChanged(quint64))); connect(downloaditem, SIGNAL(succeeded()), this, SLOT(onDownloadSucceeded())); connect(downloaditem, SIGNAL(failed(QWebDownloadItem::DownloadError,const QUrl&,const QString&)), this, SLOT(onDownloadFailed(QWebDownloadItem::DownloadError,const QUrl&,const QString&))); }
static enum piglit_result test_stipple(int offby) { GLubyte pattern[4*32]; GLsizei bufSize = offby + (int)(sizeof pattern); unsigned i; for (i = 0; i < sizeof pattern; i++) pattern[i] = 0x55; glPolygonStipple(pattern); if (!succeeded(0)) return PIGLIT_FAIL; glGetnPolygonStippleARB(bufSize, pattern); if (!succeeded(offby)) return PIGLIT_FAIL; return PIGLIT_PASS; }
bool motion_planner_t::execute() { PRX_ASSERT(input_specification != NULL); do { // PRX_INFO_S("EXECUTE FROM MOTION PLANNER"); step(); } while( !input_specification->get_stopping_criterion()->satisfied() ); return succeeded(); }
void CLSSIS3820Scaler::measureDarkCurrent(int secondsDwell) { AMAction3 *action = createMeasureDarkCurrentAction(secondsDwell); if (action) { connect( action, SIGNAL(cancelled()), action, SLOT(deleteLater()) ); connect( action, SIGNAL(failed()), action, SLOT(deleteLater()) ); connect( action, SIGNAL(succeeded()), action, SLOT(deleteLater()) ); action->start(); } }
LocalError::LocalError(const LocalError &error): m_errorType(error.m_errorType), m_errorCode(error.m_errorCode) { // If the incoming error is a success, but it didn't down-convert into // a success in this error condition object, then we need to cast it to // a LocalError success. if (error.succeeded() && !succeeded()) { m_errorType = etLocalError; m_errorCode = ecSuccess; } }