Commit bbb731ca authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent dd12e11d
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
#include <MessageComposer/InsertTextFileJob> #include <MessageComposer/InsertTextFileJob>
#include <MessageComposer/ComposerLineEdit> #include <MessageComposer/ComposerLineEdit>
#include <MessageCore/AttachmentPart> #include <MessageCore/AttachmentPart>
#include "MessageCore/MessageCoreSettings" #include <MessageCore/MessageCoreSettings>
#include <templateparser.h> #include <templateparser.h>
#include <TemplateParser/TemplatesConfiguration> #include <TemplateParser/TemplatesConfiguration>
#include <MessageCore/NodeHelper> #include <MessageCore/NodeHelper>
...@@ -532,7 +532,6 @@ void KMComposerWin::send(int how) ...@@ -532,7 +532,6 @@ void KMComposerWin::send(int how)
void KMComposerWin::addAttachmentsAndSend(const QList<QUrl> &urls, const QString &comment, int how) void KMComposerWin::addAttachmentsAndSend(const QList<QUrl> &urls, const QString &comment, int how)
{ {
qCDebug(KMAIL_LOG) << "addAttachment and sending!";
const int nbUrl = urls.count(); const int nbUrl = urls.count();
for (int i = 0; i < nbUrl; ++i) { for (int i = 0; i < nbUrl; ++i) {
mComposerBase->addAttachment(urls.at(i), comment, true); mComposerBase->addAttachment(urls.at(i), comment, true);
...@@ -617,8 +616,7 @@ void KMComposerWin::writeConfig(void) ...@@ -617,8 +616,7 @@ void KMComposerWin::writeConfig(void)
KMailSettings::self()->setPreviousIdentity(mComposerBase->identityCombo()->currentIdentity()); KMailSettings::self()->setPreviousIdentity(mComposerBase->identityCombo()->currentIdentity());
KMailSettings::self()->setPreviousFcc(QString::number(mFccFolder->collection().id())); KMailSettings::self()->setPreviousFcc(QString::number(mFccFolder->collection().id()));
KMailSettings::self()->setPreviousDictionary(mComposerBase->dictionary()->currentDictionaryName()); KMailSettings::self()->setPreviousDictionary(mComposerBase->dictionary()->currentDictionaryName());
KMailSettings::self()->setAutoSpellChecking( KMailSettings::self()->setAutoSpellChecking(mAutoSpellCheckingAction->isChecked());
mAutoSpellCheckingAction->isChecked());
MessageViewer::MessageViewerSettings::self()->setUseFixedFont(mFixedFontAction->isChecked()); MessageViewer::MessageViewerSettings::self()->setUseFixedFont(mFixedFontAction->isChecked());
if (!mForceDisableHtml) { if (!mForceDisableHtml) {
KMailSettings::self()->setUseHtmlMarkup(mComposerBase->editor()->textMode() == MessageComposer::RichTextComposerNg::Rich); KMailSettings::self()->setUseHtmlMarkup(mComposerBase->editor()->textMode() == MessageComposer::RichTextComposerNg::Rich);
...@@ -876,6 +874,7 @@ QWidget *KMComposerWin::connectFocusMoving(QWidget *prev, QWidget *next) ...@@ -876,6 +874,7 @@ QWidget *KMComposerWin::connectFocusMoving(QWidget *prev, QWidget *next)
return next; return next;
} }
void KMComposerWin::rethinkHeaderLine(int aValue, int aMask, int &aRow, void KMComposerWin::rethinkHeaderLine(int aValue, int aMask, int &aRow,
QLabel *aLbl, QWidget *aCbx) QLabel *aLbl, QWidget *aCbx)
{ {
...@@ -1105,8 +1104,9 @@ void KMComposerWin::setupActions(void) ...@@ -1105,8 +1104,9 @@ void KMComposerWin::setupActions(void)
actionCollection()->addAction(QStringLiteral("addressbook"), action); actionCollection()->addAction(QStringLiteral("addressbook"), action);
if (QStandardPaths::findExecutable(QStringLiteral("kaddressbook")).isEmpty()) { if (QStandardPaths::findExecutable(QStringLiteral("kaddressbook")).isEmpty()) {
action->setEnabled(false); action->setEnabled(false);
} else {
connect(action, &QAction::triggered, this, &KMComposerWin::slotAddressBook);
} }
connect(action, &QAction::triggered, this, &KMComposerWin::slotAddressBook);
action = new QAction(QIcon::fromTheme(QStringLiteral("mail-message-new")), i18n("&New Composer"), this); action = new QAction(QIcon::fromTheme(QStringLiteral("mail-message-new")), i18n("&New Composer"), this);
actionCollection()->addAction(QStringLiteral("new_composer"), action); actionCollection()->addAction(QStringLiteral("new_composer"), action);
...@@ -1284,7 +1284,6 @@ void KMComposerWin::setupActions(void) ...@@ -1284,7 +1284,6 @@ void KMComposerWin::setupActions(void)
mCryptoModuleAction->setItems(listCryptoFormat); mCryptoModuleAction->setItems(listCryptoFormat);
mComposerBase->editor()->createActions(actionCollection()); mComposerBase->editor()->createActions(actionCollection());
//actionCollection()->addActions(mComposerBase->editor()->createActions());
mFollowUpToggleAction = new KToggleAction(i18n("Follow Up Mail..."), this); mFollowUpToggleAction = new KToggleAction(i18n("Follow Up Mail..."), this);
actionCollection()->addAction(QStringLiteral("follow_up_mail"), mFollowUpToggleAction); actionCollection()->addAction(QStringLiteral("follow_up_mail"), mFollowUpToggleAction);
......
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