~ubuntu-branches/ubuntu/quantal/minitube/quantal

« back to all changes in this revision

Viewing changes to src/downloaditem.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jakob Haufe
  • Date: 2010-12-17 00:23:23 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20101217002323-vpwwfdqdp8ady29d
New upstream version (Closes: #606670)

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        emit statusChanged();
100
100
    }
101
101
 
102
 
    m_status = Downloading;
103
102
    if (-1 == m_file.write(m_reply->readAll())) {
104
103
        /*
105
104
        downloadInfoLabel->setText(tr("Error saving: %1")
108
107
        */
109
108
    } else {
110
109
        m_startedSaving = true;
111
 
        if (m_finishedDownloading)
 
110
        if (m_status != Downloading) {
 
111
            // m_status = Downloading;
 
112
            // emit statusChanged();
 
113
        } else if (m_finishedDownloading)
112
114
            requestFinished();
113
115
    }
114
116
}
157
159
        percent = bytesReceived * 100 / bytesTotal;
158
160
    }
159
161
 
 
162
    // qDebug() << bytesReceived << bytesTotal;
 
163
    if (m_status != Downloading
 
164
        && bytesReceived > 1024 * 512
 
165
        && bytesReceived > bytesTotal * .01) {
 
166
        m_status = Downloading;
 
167
        emit statusChanged();
 
168
    }
 
169
 
160
170
    emit progress(percent);
161
171
    // emit statusChanged();
162
172
}