void CWizKbSync::onXmlRpcError(const QString& strMethodName, WizXmlRpcError errorType, int errorCode, const QString& errorMessage) { CWizApi::onXmlRpcError(strMethodName, errorType, errorCode, errorMessage); m_error = true; if (strMethodName == SyncMethod_ClientLogin || strMethodName == SyncMethod_ClientKeepAlive) { stopSync(); return; } if (errorType == errorNetwork && strMethodName != SyncMethod_ClientLogout) { stopSync(); } }
void CWizSync::onXmlRpcError(const QString& strMethodName, WizXmlRpcError err, int errorCode, const QString& errorMessage) { CWizApi::onXmlRpcError(strMethodName, err, errorCode, errorMessage); m_error = true; if (strMethodName != SyncMethod_ClientLogout) { stopSync(); } }
void CWizKbSync::onDownloadObjectsDataCompleted() { Q_EMIT progressChanged(progressObjectDownloaded); stopSync(); }
void CWizKbSync::onDownloadObjectsDataCompleted() { stopSync(); }
void xsync::run() { timeElapsed = 0; timeNow = 0; midiQuarterNote = midiEighthNote = midiSixteenthNote = 0; midiTicks = 0; /* async updates, like GUI */ if (updateAsync) { ((AsyncUpdater *)updateAsync)->triggerAsyncUpdate(); } /* sync updates, like midi manager */ sendChangeMessage (this); while (1) { timeNow = Time::getMillisecondCounter(); Time::waitForMillisecondCounter (timeNow + 3); timeElapsed = timeElapsed + (Time::getMillisecondCounter() - timeNow); if (timeElapsed >= timeMidiTick) { if (threadShouldExit()) { stopSync(); return; } if (midiTicks == 6 || midiTicks == 12 || midiTicks == 18 || midiTicks == 0) { midiSixteenthNote++; if (midiSixteenthNote == 2 || midiSixteenthNote == 4) { midiEighthNote++; if (midiEighthNote == 2 || midiEighthNote == 4) { midiQuarterNote++; if (midiQuarterNote == 4) { midiQuarterNote = 0; } if (midiEighthNote == 4) midiEighthNote = 0; } } if (midiSixteenthNote == 4) midiSixteenthNote = 0; /* async updates, like GUI */ if (updateAsync) { ((AsyncUpdater *)updateAsync)->triggerAsyncUpdate(); } /* sync updates, like midi manager */ sendChangeMessage (this); } timeElapsed = 0; midiTicks++; if (midiTicks == 23) midiTicks = 0; } if (threadShouldExit()) { stopSync(); return; } } }