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 b3e6a758 authored by Laurent Montel's avatar Laurent Montel 😁

Remove extra parameter

parent 578b6328
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.7.44")
set(PIM_VERSION "5.7.45")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -128,10 +128,11 @@ KMime::Content::List Util::allContents(const KMime::Content *message)
return result;
}
bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, QUrl &currentFolder, QList<QUrl> &urlList)
bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, QList<QUrl> &urlList)
{
QUrl url, dirUrl;
QString recentDirClass;
QUrl currentFolder;
const bool multiple = (contents.count() > 1);
if (multiple) {
// get the dir
......@@ -424,14 +425,14 @@ bool Util::saveContent(QWidget *parent, KMime::Content *content, const QUrl &url
return true;
}
bool Util::saveAttachments(const KMime::Content::List &contents, QWidget *parent, QUrl &currentFolder, QList<QUrl> &urlList)
bool Util::saveAttachments(const KMime::Content::List &contents, QWidget *parent, QList<QUrl> &urlList)
{
if (contents.isEmpty()) {
KMessageBox::information(parent, i18n("Found no attachments to save."));
return false;
}
return Util::saveContents(parent, contents, currentFolder, urlList);
return Util::saveContents(parent, contents, urlList);
}
bool Util::saveMessageInMbox(const Akonadi::Item::List &retrievedMsgs, QWidget *parent, bool appendMessages)
......
......@@ -61,7 +61,7 @@ namespace Util {
bool MESSAGEVIEWER_EXPORT checkOverwrite(const QUrl &url, QWidget *w);
MESSAGEVIEWER_EXPORT bool saveMessageInMbox(const Akonadi::Item::List &retrievedMsgs, QWidget *parent, bool appendMessages = false);
MESSAGEVIEWER_EXPORT bool saveAttachments(const KMime::Content::List &contents, QWidget *parent, QUrl &currentFolder, QList<QUrl> &saveUrl);
MESSAGEVIEWER_EXPORT bool saveAttachments(const KMime::Content::List &contents, QWidget *parent, QList<QUrl> &saveUrl);
MESSAGEVIEWER_EXPORT QAction *createAppAction(const KService::Ptr &service, bool singleOffer, QActionGroup *actionGroup, QObject *parent);
}
......
......@@ -52,7 +52,7 @@ bool handleUrlWithQDesktopServices(const QUrl &url);
KMime::Content::List allContents(const KMime::Content *message);
bool saveContents(QWidget *parent, const KMime::Content::List &contents, QUrl &currentFolder, QList<QUrl> &urlList);
bool saveContents(QWidget *parent, const KMime::Content::List &contents, QList<QUrl> &urlList);
bool saveContent(QWidget *parent, KMime::Content *content, const QUrl &url);
}
}
......
......@@ -730,9 +730,8 @@ bool AttachmentURLHandler::handleShiftClick(const QUrl &url, ViewerPrivate *wind
if (!window) {
return false;
}
QUrl currentUrl;
QList<QUrl> urlList;
if (Util::saveContents(window->viewer(), KMime::Content::List() << node, currentUrl, urlList)) {
if (Util::saveContents(window->viewer(), KMime::Content::List() << node, urlList)) {
window->viewer()->showOpenAttachmentFolderWidget(urlList);
}
......
......@@ -376,9 +376,8 @@ void ViewerPrivate::openAttachment(KMime::Content *node, const QUrl &url)
const int choice = dialog->exec();
delete dialog;
if (choice == AttachmentDialog::Save) {
QUrl currentUrl;
QList<QUrl> urlList;
if (Util::saveContents(mMainWindow, KMime::Content::List() << node, currentUrl, urlList)) {
if (Util::saveContents(mMainWindow, KMime::Content::List() << node, urlList)) {
showOpenAttachmentFolderWidget(urlList);
}
} else if (choice == AttachmentDialog::Open) { // Open
......@@ -2586,9 +2585,8 @@ void ViewerPrivate::slotActivatePlugin(ViewerPluginInterface *interface)
void ViewerPrivate::slotAttachmentSaveAs()
{
const auto contents = selectedContents();
QUrl currentUrl;
QList<QUrl> urlList;
if (Util::saveAttachments(contents, mMainWindow, currentUrl, urlList)) {
if (Util::saveAttachments(contents, mMainWindow, urlList)) {
showOpenAttachmentFolderWidget(urlList);
}
}
......@@ -2596,9 +2594,8 @@ void ViewerPrivate::slotAttachmentSaveAs()
void ViewerPrivate::slotAttachmentSaveAll()
{
const auto contents = mMessage->attachments();
QUrl currentUrl;
QList<QUrl> urlList;
if (Util::saveAttachments(contents, mMainWindow, currentUrl, urlList)) {
if (Util::saveAttachments(contents, mMainWindow, urlList)) {
showOpenAttachmentFolderWidget(urlList);
}
}
......@@ -2731,10 +2728,8 @@ void ViewerPrivate::slotHandleAttachment(int choice)
break;
case Viewer::Save:
{
QUrl currentUrl;
QList<QUrl> urlList;
if (Util::saveContents(mMainWindow, KMime::Content::List() << mCurrentContent,
currentUrl, urlList)) {
if (Util::saveContents(mMainWindow, KMime::Content::List() << mCurrentContent, urlList)) {
showOpenAttachmentFolderWidget(urlList);
}
break;
......
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