summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-02-27 13:49:32 +0100
committerLaurent Montel <[email protected]>2018-02-27 13:49:32 +0100
commit20be1e6803f535687105f03e7cd546564b447e14 (patch)
tree3c7cbe5f1be4fd509d0ea134f69f119cdfc8c273
parent654f9baabc7ab4340bdd0e1850381cdac5921e3c (diff)
Remove broken code
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp26
-rw-r--r--messageviewer/src/viewer/viewer_p.h3
2 files changed, 3 insertions, 26 deletions
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index 759a522..8c609c0 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -1753,7 +1753,7 @@ void ViewerPrivate::createActions()
ac->setDefaultShortcut(mFindInMessageAction, KStandardShortcut::find().first());
}
-void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos, bool allowToDelete)
+void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos)
{
#ifndef QT_NO_TREEVIEW
if (!content) {
@@ -1801,11 +1801,6 @@ void ViewerPrivate::showContextMenu(KMime::Content *content, const QPoint &pos,
if (isAttachment) {
popup.addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("Copy"),
this, &ViewerPrivate::slotAttachmentCopy);
- if (allowToDelete) {
- //FIXME Laurent Comment for the moment it crash see Bug 287177
- popup.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18n("Delete Attachment"),
- this, &ViewerPrivate::slotAttachmentDelete);
- }
}
if (!content->isTopLevel()) {
@@ -2513,7 +2508,7 @@ void ViewerPrivate::slotMimeTreeContextMenuRequested(const QPoint &pos)
QModelIndex index = mMimePartTree->indexAt(pos);
if (index.isValid()) {
KMime::Content *content = static_cast<KMime::Content *>(index.internalPointer());
- showContextMenu(content, pos, false);
+ showContextMenu(content, pos);
}
#endif
}
@@ -2667,23 +2662,6 @@ void ViewerPrivate::attachmentCopy(const KMime::Content::List &contents)
#endif
}
-void ViewerPrivate::slotAttachmentDelete()
-{
- const auto contents = selectedContents();
- if (contents.isEmpty()) {
- return;
- }
-
- bool showWarning = true;
- for (KMime::Content *content : contents) {
- if (!deleteAttachment(content, showWarning)) {
- return;
- }
- showWarning = false;
- }
- update(MimeTreeParser::Force);
-}
-
void ViewerPrivate::slotLevelQuote(int l)
{
if (mLevelQuote != l) {
diff --git a/messageviewer/src/viewer/viewer_p.h b/messageviewer/src/viewer/viewer_p.h
index 27b9b66..dfdae72 100644
--- a/messageviewer/src/viewer/viewer_p.h
+++ b/messageviewer/src/viewer/viewer_p.h
@@ -343,7 +343,7 @@ public:
void createWidgets();
void createActions();
- void showContextMenu(KMime::Content *content, const QPoint &point, bool allowToDelete = true);
+ void showContextMenu(KMime::Content *content, const QPoint &point);
KToggleAction *actionForAttachmentStrategy(const AttachmentStrategy *);
/** Read override codec from configuration */
@@ -523,7 +523,6 @@ public Q_SLOTS:
void slotAttachmentView();
void slotAttachmentProperties();
void slotAttachmentCopy();
- void slotAttachmentDelete();
void slotLevelQuote(int l);
/** Toggle display mode between HTML and plain text. */