Commit 92b71636 authored by Elvis Angelaccio's avatar Elvis Angelaccio

part: drop no longer needed check

We don't start any job when we are creating a new archive, so there is
no way we can end up in `slotLoadingFinished()`.
Which means this check is no longer needed.

Task: T6575
parent c0697918
......@@ -881,26 +881,24 @@ void Part::slotLoadingStarted()
void Part::slotLoadingFinished(KJob *job)
{
if (job->error()) {
if (!isCreatingNewArchive()) {
if (job->error() != KJob::KilledJobError) {
displayMsgWidget(KMessageWidget::Error, xi18nc("@info", "Loading the archive <filename>%1</filename> failed with the following error:<nl/><message>%2</message>",
localFilePath(),
job->errorString()));
}
if (job->error() != KJob::KilledJobError) {
displayMsgWidget(KMessageWidget::Error, xi18nc("@info", "Loading the archive <filename>%1</filename> failed with the following error:<nl/><message>%2</message>",
localFilePath(),
job->errorString()));
}
// The file failed to open, so reset the open archive, info panel and caption.
m_model->reset();
m_infoPanel->setPrettyFileName(QString());
m_infoPanel->updateWithDefaults();
// The file failed to open, so reset the open archive, info panel and caption.
m_model->reset();
m_infoPanel->setPrettyFileName(QString());
m_infoPanel->updateWithDefaults();
emit setWindowCaption(QString());
emit setWindowCaption(QString());
#if KPARTS_VERSION >= QT_VERSION_CHECK(5, 37, 0)
// See https://phabricator.kde.org/D6856
closeUrl();
// See https://phabricator.kde.org/D6856
closeUrl();
#else
setUrl(QUrl());
setUrl(QUrl());
#endif
}
} else {
emit completed();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment