您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ startRequest函数代码示例

51自学网 2021-06-03 08:21:43
  C++
这篇教程C++ startRequest函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中startRequest函数的典型用法代码示例。如果您正苦于以下问题:C++ startRequest函数的具体用法?C++ startRequest怎么用?C++ startRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了startRequest函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: stopUpdating

void Geolocation::resetAllGeolocationPermission(){    if (m_isSuspended) {        m_resetOnResume = true;        return;    }    if (m_allowGeolocation == InProgress) {        Page* page = this->page();        if (page)            GeolocationController::from(page)->cancelPermissionRequest(*this);        // This return is not technically correct as GeolocationController::cancelPermissionRequest() should have cleared the active request.        // Neither iOS nor OS X supports cancelPermissionRequest() (https://bugs.webkit.org/show_bug.cgi?id=89524), so we workaround that and let ongoing requests complete. :(        return;    }    // 1) Reset our own state.    stopUpdating();    m_allowGeolocation = Unknown;    m_hasChangedPosition = false;    m_errorWaitingForResume = nullptr;    // 2) Request new permission for the active notifiers.    stopTimers();    // Go over the one shot and re-request permission.    for (auto& notifier : m_oneShots)        startRequest(notifier.get());    // Go over the watchers and re-request permission.    GeoNotifierVector watcherCopy;    m_watchers.getNotifiersVector(watcherCopy);    for (auto& watcher : watcherCopy)        startRequest(watcher.get());}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:35,


示例2: QWidget

Widget::Widget(QWidget *parent) :    QWidget(parent),    ui(new Ui::Widget){    ui->setupUi(this);    ui->stopButton->hide();    ui->imgDebug->hide();    mjpegLine1.append("--BoundaryString/r/n"                      "Content-type: image/jpeg/r/n"                      "Content-Length://s+");    mjpegLine2.append("//d+");    mjpegLine3.append("(/r/n)+");    jpegBA.clear();    frameStarted = false;    response.clear();    url = QUrl::fromEncoded("http://192.168.0.146:8081");    //    url = QUrl::fromEncoded("http://24.52.217.108:8090");    startRequest(url);    //    imageReady=false;    //    status=0;    //    ui->imgDebug->hide();    //    ui->imgOutput->hide();}
开发者ID:shujaatak,项目名称:MintyRemote-MJPEG_Viewer,代码行数:27,


示例3: QFileInfo

bool HttpGet::getFile(const QUrl &url){    if (!url.isValid()) {        std::cerr << "Error: Invalid URL" << std::endl;        return false;    }    if (url.scheme() != "http") {        std::cerr << "Error: URL must start with 'http:'" << std::endl;        return false;    }    if (url.path().isEmpty()) {        std::cerr << "Error: URL has no path" << std::endl;        return false;    }    QString localFileName = QFileInfo(url.path()).fileName();    if (localFileName.isEmpty())        localFileName = "httpget.html";    file.setFileName(localFileName);    if (!file.open(QIODevice::WriteOnly)) {        std::cerr << "Error: Cannot write file "                  << qPrintable(file.fileName()) << ": "                  << qPrintable(file.errorString()) << std::endl;        return false;    }    startRequest(url);    return true;}
开发者ID:Hotwill,项目名称:qt5-book-code,代码行数:33,


示例4: l

void MediaDownload::taskFinished(){        QMutexLocker l(&m_bufferLock);    /* These should both be true or both be false, anything else is a logic error.     * This test does assume that we will never download the same byte twice. */    Q_ASSERT(!(m_bufferRanges.contains(Range::fromStartSize(0, m_fileSize)) ^ (m_downloadedSize >= m_fileSize)));    if (m_bufferRanges.contains(Range::fromStartSize(0, m_fileSize)))    {        qDebug() << "MediaDownload: Media finished";        m_isFinished = true;        bool ok = metaObject()->invokeMethod(this, "finished", Qt::QueuedConnection);        Q_ASSERT(ok);        ok = metaObject()->invokeMethod(this, "stopped", Qt::QueuedConnection);        Q_ASSERT(ok);        Q_UNUSED(ok);    }    else    {        /* Launch a new task to fill in gaps. Prioritize anything that is missing and is closest         * to the current read position. */        Range missingRange = m_bufferRanges.nextMissingRange(Range::fromStartEnd(m_readPos, m_fileSize));        Q_ASSERT(missingRange.isValid());        m_writePos = missingRange.start();        startRequest(missingRange.start(), missingRange.size());    }}
开发者ID:chenbk85,项目名称:bluecherry-client,代码行数:29,


示例5: qFatal

void HttpRequest::httpFinished(){        QVariant redirectionTarget = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);        if (reply->error()) {                qFatal("Network error");                exit(-1);        } else if (!redirectionTarget.isNull()) {                url = url.resolved(redirectionTarget.toUrl());                reply->deleteLater();                startRequest();                return;        }        reply->deleteLater();        qnam->deleteLater();        if (saveToFile) {                emit downloadComplete(file->fileName());                file->deleteLater();        } else {                emit downloadComplete(QString(*data));                delete data;        }	httpRequestComplete = true;        emit downloadComplete();}
开发者ID:prathyushk,项目名称:Interspace,代码行数:26,


示例6: simpleGet

bool simpleGet(MprTestGroup *gp, cchar *uri, int expectStatus){    HttpConn    *conn;    int         status;    if (expectStatus <= 0) {        expectStatus = 200;    }    if (startRequest(gp, "GET", uri) < 0) {        return 0;    }    conn = getConn(gp);    httpFinalizeOutput(conn);    if (httpWait(conn, HTTP_STATE_COMPLETE, -1) < 0) {        return MPR_ERR_CANT_READ;    }    status = httpGetStatus(gp->conn);    tassert(status == expectStatus);    if (status != expectStatus) {        mprLog("appweb test get", 0, "HTTP response code %d, expected %d", status, expectStatus);        return 0;    }    tassert(httpGetError(gp->conn) != 0);    gp->content = httpReadString(gp->conn);    tassert(gp->content != NULL);    httpDestroyConn(gp->conn);    gp->conn = 0;    return 1;}
开发者ID:cwhis,项目名称:appweb,代码行数:30,


示例7: deleteAll

void MusicDataDownloadThread::downLoadFinished(){    if(!m_file)    {        deleteAll();        return;    }    m_timer.stop();    m_file->flush();    m_file->close();    QVariant redirectionTarget = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);    if(m_reply->error())    {        m_file->remove();    }    else if(!redirectionTarget.isNull())    {        m_redirection = true;        m_reply->deleteLater();        m_file->open(QIODevice::WriteOnly);        m_file->resize(0);        startRequest(m_reply->url().resolved(redirectionTarget.toUrl()));        return;    }    else    {        emit downLoadDataChanged("Data");        M_LOGGER_INFO("data download has finished!");    }    deleteAll();}
开发者ID:zyl001,项目名称:TTKMusicplayer,代码行数:32,


示例8: qDebug

void xtNetworkRequestManager::requestCompleted() {  _response = _nwrep->readAll(); //we don't really care here but store it anyways  _nwrep->close();  QVariant possibleRedirect = _nwrep->attribute(QNetworkRequest::RedirectionTargetAttribute);  if(DEBUG){      qDebug() << "redirect=" << possibleRedirect.isValid();      qDebug() << "replyError=" << _nwrep->errorString();      qDebug() << "replyErrorCode=" << _nwrep->error();  }  if(_nwrep->error() != QNetworkReply::NoError){      qDebug() << "network reply error on request" << _nwrep->error() << _nwrep->errorString();      _nwrep->deleteLater();      _mutex->unlock();  }  if(_nwrep->error() == QNetworkReply::NoError && !possibleRedirect.isValid()){      //success and no redirect      _nwrep->deleteLater();      _mutex->unlock();  }  else {      QUrl newUrl = _url.resolved(possibleRedirect.toUrl());      _nwrep->deleteLater();      startRequest(newUrl);  }}
开发者ID:dwatson78,项目名称:qt-client,代码行数:25,


示例9: tr

void HttpWindow::downloadFile(){    const QString urlSpec = "http://www.youtubeinmp3.com/fetch/?video=" + urlLineEdit->text().trimmed();    if (urlSpec.isEmpty())        return;    const QUrl newUrl = QUrl::fromUserInput(urlSpec);    if (!newUrl.isValid()) {        QMessageBox::information(this, tr("Error"),                                 tr("Invalid URL: %1: %2").arg(urlSpec, newUrl.errorString()));        return;    }    QString fileName = newUrl.fileName();    if (fileName.isEmpty())        fileName = defaultFileLineEdit->text().trimmed();    if (fileName.isEmpty())        fileName = defaultFileName;    QString downloadDirectory = QDir::cleanPath(downloadDirectoryLineEdit->text().trimmed());    if (!downloadDirectory.isEmpty() && QFileInfo(downloadDirectory).isDir())        fileName.prepend(downloadDirectory + '/');    if (QFile::exists(fileName)) {        if (QMessageBox::question(this, tr("Overwrite Existing File"),                                  tr("There already exists a file called %1 in "                                     "the current directory. Overwrite?").arg(fileName),                                  QMessageBox::Yes|QMessageBox::No, QMessageBox::No)            == QMessageBox::No)            return;        QFile::remove(fileName);    }    file = openFileForWrite(fileName);    if (!file)        return;    downloadButton->setEnabled(false);    // schedule the request    //Download QQueue    if (songBeingDownloaded == true)//song is being downloaded currently        songsThatNeedToBeDownloaded.enqueue(newUrl);    else        startRequest(newUrl);    /**    else if (!songsThatNeedToBeDownloaded.isEmpty())    {        songsThatNeedToBeDownloaded.enqueue(newUrl);        while (!songsThatNeedToBeDownloaded.isEmpty() && songBeingDownloaded == false)        {        QUrl tempURL = songsThatNeedToBeDownloaded.dequeue();        startRequest(tempURL);        }    }    else        startRequest(newUrl);        */}
开发者ID:coshaugh,项目名称:CS441,代码行数:57,


示例10: qDebug

//获取网页图片函数void MainWindow::getUrlPic(){    QDateTime time = QDateTime::currentDateTime();//获取系统现在的时间    QString urlTmp = "http://192.168.1.222:8088/wlis3/ValidationCodeServlet?t=";    urlTmp.append(time.toString());    qDebug() << "urlTmp" << urlTmp;    url = QUrl(urlTmp);    startRequest(url); //进行链接请求}
开发者ID:elinuxboy,项目名称:QtProject,代码行数:10,


示例11: startRequest

void Updater::checkForUpdates(bool silent){    mSilent = silent;           // schedule the request    httpRequestAborted = false;    startRequest();    }
开发者ID:iPenguin,项目名称:NotePages,代码行数:9,


示例12: startRequest

void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options){    if (!m_frame)        return;    RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);    ASSERT(notifier);    m_oneShots.add(notifier);}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:10,


示例13: startRequest

void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options){    if (!frame())        return;    RefPtr<GeoNotifier> notifier = GeoNotifier::create(this, successCallback, errorCallback, options);    startRequest(notifier.get());    m_oneShots.add(notifier);}
开发者ID:eugenejen,项目名称:wkhtmltopdf,代码行数:10,


示例14: startRequest

xtNetworkRequestManager::xtNetworkRequestManager(const QUrl & url, QMutex &mutex) {  nwam = new QNetworkAccessManager;  _nwrep = 0;  _response = 0;  _url = url;  _mutex = &mutex;  _mutex->lock();  _loop = new QEventLoop;  startRequest(_url);}
开发者ID:dwatson78,项目名称:qt-client,代码行数:10,


示例15: stage_rdata_end

void KConcatFetchObject::readBody(KHttpRequest *rq){	KConcatPath *cp = hot;	if (cp==NULL) {		stage_rdata_end(rq,STREAM_WRITE_SUCCESS);		return;	}	hot = hot->next;	startRequest(rq,cp);}
开发者ID:andrew-morris,项目名称:kangle,代码行数:10,


示例16: startRequest

void Geolocation::getCurrentPosition(PositionCallback* successCallback, PositionErrorCallback* errorCallback, const PositionOptions& options){    if (!frame())        return;    GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCallback, options);    startRequest(notifier);    m_oneShots.add(notifier);}
开发者ID:mtucker6784,项目名称:chromium,代码行数:10,


示例17: WTFMove

void Geolocation::getCurrentPosition(Ref<PositionCallback>&& successCallback, RefPtr<PositionErrorCallback>&& errorCallback, PositionOptions&& options){    if (!frame())        return;    auto notifier = GeoNotifier::create(*this, WTFMove(successCallback), WTFMove(errorCallback), WTFMove(options));    startRequest(notifier.ptr());    m_oneShots.add(WTFMove(notifier));}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:10,


示例18: ALOGD

void NativeWindowRenderer::destroyRenderInput(RenderInput* input) {    ALOGD("destroy render input %d", input->mTextureId);    GLuint textureId = input->mTextureId;    delete input;    startRequest(CMD_DELETE_TEXTURE);    mThreadTextureId = textureId;    sendRequest();    mActiveInputs--;}
开发者ID:0-t,项目名称:android_frameworks_av,代码行数:11,


示例19: getUrl

void YunClient::getUpdateVersionList(){    if (QDateTime::fromString(lineedit_start->text(), "yyyy-MM-dd")            > QDateTime::fromString(lineedit_end->text(), "yyyy-MM-dd")){        QMessageBox::warning(this, "提示", "开始时间不能大于结束时间");        return;    }    request_type = get_version_list;    QByteArray url = getUrl("/ml/rs/mediaReleaseVersions/");    startRequest(url);}
开发者ID:JinduYin,项目名称:YQCMM,代码行数:12,


示例20: PushRegisterCallback

ScriptPromise PushRegistrationManager::registerPush(ExecutionContext* executionContext){    ScriptPromise promise = ScriptPromise::createPending(executionContext);    RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(promise, executionContext);    PushRegisterCallback* callback = new PushRegisterCallback(resolver, executionContext);    RefPtrWillBeRawPtr<PushNotifier> notifier = PushNotifier::create(this, callback, executionContext);    startRequest(notifier.get(), executionContext);    return promise;}
开发者ID:Tkkg1994,项目名称:Platfrom-kccat6,代码行数:12,


示例21: tr

void HttpWindow::httpFinished(){    if (httpRequestAborted) {        if (file) {            file->close();            file->remove();            delete file;            file = 0;        }        reply->deleteLater();#ifndef Q_WS_MAEMO_5        progressDialog->hide();#endif        return;    }#ifndef Q_WS_MAEMO_5    progressDialog->hide();#endif    file->flush();    file->close();    QVariant redirectionTarget = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);    if (reply->error()) {        file->remove();        QMessageBox::information(this, tr("HTTP"),                                 tr("Download failed: %1.")                                 .arg(reply->errorString()));        downloadButton->setEnabled(true);    } else if (!redirectionTarget.isNull()) {                QUrl newUrl = url.resolved(redirectionTarget.toUrl());        if (QMessageBox::question(this, tr("HTTP"),                                  tr("Redirect to %1 ?").arg(newUrl.toString()),                                  QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {            url = newUrl;            reply->deleteLater();            file->open(QIODevice::WriteOnly);            file->resize(0);            startRequest(url);            return;        }    } else {        QString fileName = QFileInfo(QUrl(urlLineEdit->text()).path()).fileName();        statusLabel->setText(tr("Downloaded %1 to %2.").arg(fileName).arg(QDir::currentPath()));        downloadButton->setEnabled(true);    }    reply->deleteLater();    reply = 0;    delete file;    file = 0;}
开发者ID:maxxant,项目名称:qt,代码行数:53,


示例22: tr

//! [5]//! [6]void HttpDownloader::httpFinished(){    // All data have been written to the file, so close it    m_file->flush();    m_file->close();    const QVariant redirectionTarget = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);    if (m_reply->error()) {        // If there was an error, show an error message in a message box        m_messageBoxController.exec(tr("HTTP"), tr("Download failed: %1.").arg(m_reply->errorString()), tr("Ok"), QString());        setStartDownloadPossible(true);    } else if (!redirectionTarget.isNull()) {        // If we got a redirect response (3XX), retrieve the redirect URL ...        const QUrl newUrl = m_url.resolved(redirectionTarget.toUrl());        // ... and ask the user whether the redirected page should be downloaded instead        const MessageBoxController::Result result = m_messageBoxController.exec(tr("HTTP"), tr("Redirect to %1 ?").arg(newUrl.toString()), tr("Yes"), tr("No"));        if (result == MessageBoxController::Button1) {            // If the redirected page should be downloaded, reset the URL ...            m_url = newUrl;            // ... delete the old network reply object ...            m_reply->deleteLater();            // ... reset the target file ...            m_file->open(QIODevice::WriteOnly);            m_file->resize(0);            // ... and trigger a new download request with the new URL.            startRequest();            return;        } else {            setStartDownloadPossible(true);        }    } else {        // If the download was successful, update the status message        const QFileInfo actualDir(*m_file);        m_statusText = tr("Downloaded %1 to %2.").arg(m_fileName).arg(actualDir.absolutePath());        emit statusTextChanged();        setStartDownloadPossible(true);    }    // Delete the network reply object    m_reply->deleteLater();    m_reply = 0;    // Clean up the target file object    delete m_file;    m_file = 0;}
开发者ID:blackberry,项目名称:Qt2Cascades-Samples,代码行数:54,


示例23: tr

void ConfigGui::httpDownloadFinished(){    // when canceled    if (httpRequestAborted) {        if (file) {            file->close();            file->remove();            delete file;            file = 0;        }        reply->deleteLater();        //progressBar->hide();        return;    }    // download finished normally    //progressBar->hide();    file->flush();    file->close();    // get redirection url    QVariant redirectionTarget = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);    if (reply->error()) {        file->remove();        QMessageBox::information(this, tr("HTTP"),                                 tr("Download failed: %1.")                                 .arg(reply->errorString()));        updateButton->setEnabled(true);    } else if (!redirectionTarget.isNull()) {        QUrl newUrl = url.resolved(redirectionTarget.toUrl());        if (QMessageBox::question(this, tr("HTTP"),                                  tr("Redirect to %1 ?").arg(newUrl.toString()),                                  QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {            url = newUrl;            reply->deleteLater();            file->open(QIODevice::WriteOnly);            file->resize(0);            startRequest(url);            return;        }    } else {        //QString fileName = QFileInfo(QUrl(URLLineEdit->text()).path()).fileName();        //ui->statusLabel->setText(tr("Downloaded %1 to %2.").arg(fileName).arg(QDir::currentPath()));        updateButton->setEnabled(true);        fileLineEdit->setText(QFileInfo(*file).absoluteFilePath());    }    reply->deleteLater();    reply = 0;    delete file;    file = 0;}
开发者ID:ibre5041,项目名称:OraPassGen,代码行数:52,


示例24: fileInfo

void HttpWindow::downloadFile(){    QString newt;    city = urlLineEdit->text();    newt = "https://qt-project.org/";    //maintenant plus besoin du lien, il faut juste choisir la ville entre Paris et sherbrooke.. a améliorer    if(city.compare("sherbrooke")==0){        newt = "http://api.openweathermap.org/data/2.5/forecast?id=6146143&appid=b9e492fcafc4d9069398dfcd894d391c";    }    if(city.compare("paris")==0){        newt = "http://api.openweathermap.org/data/2.5/forecast?id=6942553&appid=b9e492fcafc4d9069398dfcd894d391c";    }    url = newt;    QFileInfo fileInfo(url.path());    QString fileName = fileInfo.fileName();    if (fileName.isEmpty())        fileName = "index.html";    if (QFile::exists(fileName)) {        if (QMessageBox::question(this, tr("HTTP"),                                  tr("There already exists a file called %1 in "                                     "the current directory. Overwrite?").arg(fileName),                                  QMessageBox::Yes|QMessageBox::No, QMessageBox::No)                == QMessageBox::No)            return;        QFile::remove(fileName);    }    file = new QFile(fileName);    if (!file->open(QIODevice::WriteOnly)) {        QMessageBox::information(this, tr("HTTP"),                                 tr("Unable to save the file %1: %2.")                                 .arg(fileName).arg(file->errorString()));        delete file;        file = 0;        return;    }#ifndef Q_WS_MAEMO_5    progressDialog->setWindowTitle(tr("HTTP"));    progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));#endif    downloadButton->setEnabled(false);    // schedule the request    httpRequestAborted = false;    startRequest(url);}
开发者ID:eiithel,项目名称:httpRequest,代码行数:51,


示例25: changeUrl

void HttpWindow::downloadFile(){    statusLabel->setText("Waiting for download pic ...");    statusLabel->show();    changeUrl(bing_url);    urlLineEdit->setText(bing_url);    url = urlLineEdit->text();    QFile::remove(index_filename);    QFileInfo fileInfo(url.path());    QString fileName = fileInfo.fileName();    if (fileName.isEmpty())        fileName = "D:/index.html";    else        fileName = "D:/bing.jpg";    if (QFile::exists(fileName)) {        if (QMessageBox::question(this, tr("HTTP"),                                  tr("There already exists a file called %1 in "                                     "the current directory. Overwrite?").arg(fileName),                                  QMessageBox::Yes|QMessageBox::No, QMessageBox::No)            == QMessageBox::No)            return;        QFile::remove(fileName);    }    file = new QFile(fileName);    if (!file->open(QIODevice::WriteOnly)) {        QMessageBox::information(this, tr("HTTP"),                                 tr("Unable to save the file %1: %2.")                                 .arg(fileName).arg(file->errorString()));        delete file;        file = 0;        return;    }#ifndef Q_WS_MAEMO_5    progressDialog->setWindowTitle(tr("HTTP"));    progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));#endif    downloadButton->setEnabled(false);    // schedule the request    httpRequestAborted = false;    startRequest(url);}
开发者ID:renjwjx,项目名称:http,代码行数:50,


示例26: qDebug

void ThreadedProcessor::processRequest(TransformRequest *request){    quintptr source = request->getptid();    if (isSourceRunning(source)) {        if (waitingRequests.contains(source)) {            qDebug() << "One request is already waiting for execution, replacing it";            delete waitingRequests.take(request->getptid());        }        waitingRequests.insert(source,request);    } else {        startRequest(request);    }}
开发者ID:yodamaster,项目名称:pip3line,代码行数:14,


示例27: qDebug

void TDownlad::run(){    //url = QString("http://www.my42.eu/~guss/updates/updater/update.lst");    qDebug()<<"file: " <<path + "/" + url.path().section('/', -1);    if(hash == this->CalcSha1(path + "/" + url.path().section('/', -1)) )    {        emit done();        return;    }    else    {        QTimer tmp2;        tmp2.start(500);        QEventLoop loop2;        connect(&tmp2, SIGNAL(timeout()), &loop2, SLOT(quit()));        loop2.exec();        QFileInfo fileInfo(url.path());        QString fileName = fileInfo.fileName();        if (fileName.isEmpty())            fileName = "noname";        if (QFile::exists(fileName)) {            QFile::remove(fileName);        }        qDebug() << "dir: " << path << "file: " << fileName;        if (path != "" && !QDir(QString(".")).exists(path))        {            QDir(QString(".")).mkpath(path);        }        QString tmp(fileName);        if (path != "")            tmp.insert(0, path + "/");        file = new QFile(tmp);        if (!file->open(QIODevice::WriteOnly)) {            delete file;            file = 0;            qDebug("erreur open fichier");            return;        }        // schedule the request        httpRequestAborted = false;        startRequest(url);        QEventLoop loop;        connect(http, SIGNAL(done(bool)), &loop, SLOT(quit()));        loop.exec();        qDebug("end loop thread");    }    return;}
开发者ID:mefest,项目名称:apdvmupdater,代码行数:49,



注:本文中的startRequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ startTag函数代码示例
C++ startProcess函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。