1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From 483743aa9f194376a8b496ac4e58a946070a36af Mon Sep 17 00:00:00 2001
From: Michel Ludwig <michel.ludwig@kdemail.net>
Date: Sun, 1 Dec 2019 09:09:55 +0100
Subject: [PATCH] Don't crash when deleting templates
BUG: 413506
---
src/dialogs/managetemplatesdialog.cpp | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/src/dialogs/managetemplatesdialog.cpp b/src/dialogs/managetemplatesdialog.cpp
index fe6537ad..c5298b21 100644
--- a/src/dialogs/managetemplatesdialog.cpp
+++ b/src/dialogs/managetemplatesdialog.cpp
@@ -317,17 +317,6 @@ bool ManageTemplatesDialog::removeTemplate()
KileTemplate::Info templateInfo = templateItem->getTemplateInfo();
- KIO::StatJob* statJob = KIO::stat(QUrl::fromUserInput(templateInfo.path), KIO::StatJob::DestinationSide, 0);
- KIO::StatJob* statJob2 = KIO::stat(QUrl::fromUserInput(templateInfo.icon), KIO::StatJob::DestinationSide, 0);
- KJobWidgets::setWindow(statJob, this);
- KJobWidgets::setWindow(statJob2, this);
- statJob->exec();
- statJob2->exec();
- if ((statJob->error() && statJob2->error()) || !QFileInfo(templateInfo.icon).exists()) {
- KMessageBox::error(this, i18n("Sorry, but you do not have the necessary permissions to remove the selected template."));
- return false;
- }
-
if (KMessageBox::warningYesNo(this, i18n("You are about to remove the template \"%1\"; are you sure?", templateInfo.name)) == KMessageBox::No) {
return false;
}
--
GitLab
|