summaryrefslogtreecommitdiff
path: root/app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch')
-rw-r--r--app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch b/app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch
new file mode 100644
index 000000000000..232bd3894833
--- /dev/null
+++ b/app-editors/kile/files/kile-2.9.93-fix-crash-when-deleting-templates.patch
@@ -0,0 +1,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
+