当前位置: 首页>>代码示例>>C++>>正文


C++ processLog函数代码示例

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


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

示例1: processLog

bool CWizApi::uploadObjectData(const WIZOBJECTDATA& data)
{
    if (data.eObjectType == wizobjectDocument)
    {
        QString info = data.strDisplayName;
        Q_EMIT processLog(tr("uploading note: ") + info);
    }
    else if (data.eObjectType == wizobjectDocumentAttachment)
    {
        QString info = data.strDisplayName;
        Q_EMIT processLog(tr("uploading attachment: ") + info);
    }
    else
    {
        Q_ASSERT(false);
    }

    Q_ASSERT(!data.arrayData.isEmpty());

    m_currentObjectData = data;
    m_nCurrentObjectAllSize = data.arrayData.size();
    m_strCurrentObjectMD5 = ::WizMd5StringNoSpaceJava(m_currentObjectData.arrayData);

    return uploadNextPartData();
}
开发者ID:snjxiaojing,项目名称:WizQTClient,代码行数:25,代码来源:wizapi.cpp

示例2: double

void CWizApi::onDownloadDataPart(const WIZOBJECTPARTDATA& data)
{
    m_bDownloadingObject = false;

    // TODO: verify MD5 of data

    m_currentObjectData.arrayData.append(data.arrayData);

    double fPercent = 0;
    if (data.nObjectSize > 0)
        fPercent = 100.0 * m_currentObjectData.arrayData.size() / double(data.nObjectSize);

    m_nCurrentObjectAllSize = data.nObjectSize;

    //QString info = m_currentObjectData.strDisplayName;
    Q_EMIT processLog(tr("Downloaded : ") + QString::number((int)fPercent) + "%");
    Q_EMIT progressChanged(int(fPercent));

    if (data.bEOF)
    {
        onDownloadObjectDataCompleted(m_currentObjectData);
    }
    else
    {
        downloadNextPartData();
    }
}
开发者ID:snjxiaojing,项目名称:WizQTClient,代码行数:27,代码来源:wizapi.cpp

示例3: processLog

bool CWizDatabase::UpdateDocuments(const std::deque<WIZDOCUMENTDATAEX>& arrayDocument)
{
    if (arrayDocument.empty())
        return true;

    qint64 nVersion = -1;

    bool bHasError = false;
    std::deque<WIZDOCUMENTDATAEX>::const_iterator it;
    for (it = arrayDocument.begin(); it != arrayDocument.end(); it++) {
        const WIZDOCUMENTDATAEX& data = *it;

        Q_EMIT processLog("note: " + data.strTitle);

        if (!UpdateDocument(data)) {
            bHasError = true;
        }

        nVersion = qMax(nVersion, data.nVersion);
    }

    if (!bHasError) {
        SetObjectVersion(WIZDOCUMENTDATAEX::ObjectName(), nVersion);
    }

    return !bHasError;
}
开发者ID:runforprogram,项目名称:WizQTClient,代码行数:27,代码来源:wizDatabase.cpp

示例4: processLog

void CWizKbSync::startDownloadDeleteds()
{
    Q_EMIT processLog(tr("downloading deleted objects list"));

    Q_EMIT progressChanged(progressOnLogin);
    downloadNextDeleteds(m_db->GetObjectVersion(WIZDELETEDGUIDDATA::ObjectName()));
}
开发者ID:luxin6,项目名称:WizQTClient,代码行数:7,代码来源:wizKbSync.cpp

示例5: WIZDOCUMENTDATAEX

void CWizSync::startSync()
{
    if (m_bSyncStarted)
        return;

    m_bSyncStarted = true;
    m_error = false;

    m_bChained = false;

    m_arrayAllDeletedsNeedToBeUploaded.clear();
    m_arrayAllTagsNeedToBeUploaded.clear();
    m_arrayAllStylesNeedToBeUploaded.clear();

    m_arrayAllDocumentsNeedToBeDownloaded.clear();
    m_nDocumentMaxVersion = -1;
    m_bDocumentInfoError = false;

    m_arrayAllDocumentsNeedToBeUploaded.clear();
    m_currentUploadDocument = WIZDOCUMENTDATAEX();

    m_arrayAllAttachmentsNeedToBeUploaded.clear();
    m_currentUploadAttachment = WIZDOCUMENTATTACHMENTDATAEX();

    m_arrayAllObjectsNeedToBeDownloaded.clear();

    Q_EMIT syncStarted();
    Q_EMIT progressChanged(progressStart);
    Q_EMIT processLog(tr("begin syning"));

    callClientLogin(m_db.getUserId(), m_db.getPassword());
}
开发者ID:qqshow,项目名称:WizQTClient,代码行数:32,代码来源:wizsync.cpp

示例6: filterDocuments

void CWizKbSync::onDownloadDocumentsSimpleInfoCompleted()
{
    // save max version of document
    // if no error occured while downloading document full information
    // then update this version
    if (!m_arrayAllDocumentsNeedToBeDownloaded.empty()) {
        m_nDocumentMaxVersion = ::WizObjectsGetMaxVersion<WIZDOCUMENTDATABASE>(m_arrayAllDocumentsNeedToBeDownloaded);
    }

    // filter documents for getting document full information (not data)
    // if it's the first time user syncing triggered, filter is not needed.
    int nSize;
    m_db->GetAllDocumentsSize(nSize, true);

    if (nSize) {
        filterDocuments();
    }

    int nTotal = m_arrayAllDocumentsNeedToBeDownloaded.size();
    if (nTotal) {
        Q_EMIT processLog(WizFormatString1(tr("Total %1 documents need to be synchronized"), nTotal));
    }

    startDownloadDocumentsFullInfo();
}
开发者ID:Mybrc91,项目名称:WizQTClient,代码行数:25,代码来源:wizKbSync.cpp

示例7: processLog

void CWizSync::startDownloadObjectsData()
{
    Q_EMIT processLog(tr("downloading objects data"));
    Q_EMIT progressChanged(progressAttachmentUploaded);

    m_db.GetAllObjectsNeedToBeDownloaded(m_arrayAllObjectsNeedToBeDownloaded);

    if (!m_bDownloadAllNotesData)
    {
        COleDateTime tNow = ::WizGetCurrentTime();

        size_t count = m_arrayAllObjectsNeedToBeDownloaded.size();
        for (intptr_t i = count - 1; i >= 0; i--)
        {
            COleDateTime t = m_arrayAllObjectsNeedToBeDownloaded[i].tTime;
            t = t.addDays(7);
            if (t < tNow)
            {
                m_arrayAllObjectsNeedToBeDownloaded.erase(m_arrayAllObjectsNeedToBeDownloaded.begin() + i);
                continue;
            }

            if (m_arrayAllObjectsNeedToBeDownloaded[i].eObjectType == wizobjectDocumentAttachment)
            {
                m_arrayAllObjectsNeedToBeDownloaded.erase(m_arrayAllObjectsNeedToBeDownloaded.begin() + i);
                continue;
            }
        }
    }

    downloadNextObjectData();
}
开发者ID:qqshow,项目名称:WizQTClient,代码行数:32,代码来源:wizsync.cpp

示例8: onDownloadDocumentsFullInfoCompleted

void CWizKbSync::downloadNextDocumentFullInfo()
{
    if (m_arrayAllDocumentsNeedToBeDownloaded.empty()) {
        onDownloadDocumentsFullInfoCompleted();
    } else {
        WIZDOCUMENTDATABASE data = m_arrayAllDocumentsNeedToBeDownloaded[0];
        m_arrayAllDocumentsNeedToBeDownloaded.erase(m_arrayAllDocumentsNeedToBeDownloaded.begin());

        Q_EMIT processLog(tr("download document info: ") + data.strTitle);
        callDocumentGetData(data);
    }
}
开发者ID:luxin6,项目名称:WizQTClient,代码行数:12,代码来源:wizKbSync.cpp


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