Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 20be1e68 authored by Laurent Montel's avatar Laurent Montel 😁

Remove broken code

parent 654f9baa
......@@ -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) {
......
......@@ -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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment