summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2017-08-12 15:50:22 +0200
committerElvis Angelaccio <[email protected]>2017-08-12 15:52:41 +0200
commit92b71636c9fc00baf26c46454759c1fea5d6d7f1 (patch)
tree6f194f4e3c140b455f2f8f332838b3aeee02aa4b
parentc0697918cda0c6389e3932aa8322ba938e261981 (diff)
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
-rw-r--r--part/part.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/part/part.cpp b/part/part.cpp
index 2b27011..68933d2 100644
--- a/part/part.cpp
+++ b/part/part.cpp
@@ -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();
}