You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.4 KiB
36 lines
1.4 KiB
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
|
|
|