xpam/updater.cpp
// Receives download progress from downloader
// We use a timer so we don't waste cycles

Receives download progress from downloader
We use a timer so we don't waste cycles
Receives download progress from downloader We use a timer so we don ' t waste cycles
void Updater::receiveProgress(qint64 bytesReceived, qint64 bytesTotal) {
    if (progressTime.elapsed() > 200 && bytesTotal != -1) {
        int percents = qRound((((float)bytesReceived/(float)bytesTotal)*100.0));
        emit modifyLastLine("("+QString::number(bytesReceived)+" Bytes / "+QString::number(bytesTotal)+" Bytes) -- "+QString::number(percents)+"%");
        progressTime.restart();
    }
}
void Updater :: receiveProgress ( qint64 bytesReceived , qint64 bytesTotal ) { if ( progressTime . elapsed ( ) > 200 && bytesTotal != -1 ) { int percents = qRound ( ( ( ( float ) bytesReceived / ( float ) bytesTotal ) * 100.0 ) ) ; emit modifyLastLine ( " " + QString :: number ( bytesReceived ) + " " + QString :: number ( bytesTotal ) + " " + QString :: number ( percents ) + " " ) ; progressTime . restart ( ) ; } }
Receives download progress from downloader
We use a timer so we don't waste cycles
Receives download progress from downloader We use a timer so we don ' t waste cycles
//emit sendLine("Slot activated "+QString::number(bytesReceived));
