Changeset View
Changeset View
Standalone View
Standalone View
krusader/KViewer/lister.cpp
Show First 20 Lines • Show All 1354 Lines • ▼ Show 20 Line(s) | 1346 | } else { | |||
---|---|---|---|---|---|
1355 | 1355 | | |||
1356 | connect(downloadJob, &KIO::TransferJob::data, this, [=](KIO::Job*, QByteArray array) { | 1356 | connect(downloadJob, &KIO::TransferJob::data, this, [=](KIO::Job*, QByteArray array) { | ||
1357 | if (array.size() != 0) { | 1357 | if (array.size() != 0) { | ||
1358 | _tempFile->write(array); | 1358 | _tempFile->write(array); | ||
1359 | } }); | 1359 | } }); | ||
1360 | connect(downloadJob, &KIO::TransferJob::result, this, [=](KJob *job) { | 1360 | connect(downloadJob, &KIO::TransferJob::result, this, [=](KJob *job) { | ||
1361 | _tempFile->flush(); | 1361 | _tempFile->flush(); | ||
1362 | if (job->error()) { /* any error occurred? */ | 1362 | if (job->error()) { /* any error occurred? */ | ||
1363 | auto *kioJob = (KIO::TransferJob *)job; | 1363 | auto *kioJob = dynamic_cast<KIO::TransferJob *>(job); | ||
1364 | KMessageBox::error(_textArea, i18n("Error reading file %1.", kioJob->url().toDisplayString(QUrl::PreferLocalFile))); | 1364 | KMessageBox::error(_textArea, i18n("Error reading file %1.", kioJob->url().toDisplayString(QUrl::PreferLocalFile))); | ||
1365 | } | 1365 | } | ||
1366 | _downloading = false; | 1366 | _downloading = false; | ||
1367 | _downloadUpdateTimer.stop(); | 1367 | _downloadUpdateTimer.stop(); | ||
1368 | slotUpdate(); | 1368 | slotUpdate(); | ||
1369 | }); | 1369 | }); | ||
1370 | connect(&_downloadUpdateTimer, &QTimer::timeout, this, [&]() { | 1370 | connect(&_downloadUpdateTimer, &QTimer::timeout, this, [&]() { | ||
1371 | slotUpdate(); | 1371 | slotUpdate(); | ||
▲ Show 20 Lines • Show All 906 Lines • Show Last 20 Lines |