@@ -48,13 +48,11 @@ QgsFileDownloader::~QgsFileDownloader()
48
48
{
49
49
mProgressDialog ->deleteLater ();
50
50
}
51
- qDebug () << " QgsFileDownloader instance deleted!" << this ;
52
51
}
53
52
54
53
55
54
void QgsFileDownloader::startDownload ()
56
55
{
57
- qDebug () << " QgsFileDownloader instance started!" << this << mUrl ;
58
56
QgsNetworkAccessManager* nam = QgsNetworkAccessManager::instance ();
59
57
60
58
QNetworkRequest request ( mUrl );
@@ -142,15 +140,13 @@ void QgsFileDownloader::onReadyRead()
142
140
143
141
void QgsFileDownloader::onFinished ()
144
142
{
145
- qDebug () << " QgsFileDownloader instance finished!" << this ;
146
143
// when canceled
147
144
if ( ! mErrors .isEmpty () || mDownloadCanceled )
148
145
{
149
146
mFile .close ();
150
147
mFile .remove ();
151
148
if ( mGuiNotificationsEnabled )
152
149
mProgressDialog ->hide ();
153
- qDebug () << " Deleting on error" ;
154
150
}
155
151
else
156
152
{
@@ -170,7 +166,6 @@ void QgsFileDownloader::onFinished()
170
166
else if ( !redirectionTarget.isNull () )
171
167
{
172
168
QUrl newUrl = mUrl .resolved ( redirectionTarget.toUrl () );
173
- qDebug ( ) << QString ( " Redirecting to: %1" ).arg ( newUrl.toString ( ) );
174
169
mUrl = newUrl;
175
170
mReply ->deleteLater ();
176
171
mFile .open ( QIODevice::WriteOnly );
@@ -180,24 +175,20 @@ void QgsFileDownloader::onFinished()
180
175
return ;
181
176
}
182
177
// All done
183
- qDebug ( ) << " Download completed successfully" ;
184
178
emit downloadCompleted ();
185
179
}
186
- qDebug ( ) << " Download exited" << this ;
187
180
emit downloadExited ();
188
181
this ->deleteLater ();
189
182
}
190
183
191
184
void QgsFileDownloader::onNetworkError ( QNetworkReply::NetworkError err )
192
185
{
193
186
Q_ASSERT ( mReply );
194
- qDebug ( ) << QString ( " Network error %1: %2" ).arg ( err ).arg ( mReply ->errorString () );
195
187
error ( QString ( " Network error %1: %2" ).arg ( err ).arg ( mReply ->errorString () ) );
196
188
}
197
189
198
190
void QgsFileDownloader::onDownloadProgress ( qint64 bytesReceived, qint64 bytesTotal )
199
191
{
200
- // qDebug() << QString("Downloading %1 of %2!").arg(bytesReceived).arg(bytesTotal);
201
192
if ( mDownloadCanceled )
202
193
{
203
194
return ;
0 commit comments