本文整理汇总了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();
}
示例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();
}
}
示例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;
}
示例4: processLog
void CWizKbSync::startDownloadDeleteds()
{
Q_EMIT processLog(tr("downloading deleted objects list"));
Q_EMIT progressChanged(progressOnLogin);
downloadNextDeleteds(m_db->GetObjectVersion(WIZDELETEDGUIDDATA::ObjectName()));
}
示例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());
}
示例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();
}
示例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();
}
示例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);
}
}