Commit ef4a9325 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Clean up code

parent a67835b1
Pipeline #73064 passed with stage
in 40 minutes and 29 seconds
......@@ -354,9 +354,10 @@ void ComposerPrivate::contentJobFinished(KJob *job)
headers->assemble();
} else { // just use the saved headers from before
if (!encData.isEmpty()) {
qCDebug(MESSAGECOMPOSER_LOG) << "setting enc data:" << encData[0].first << "with num keys:" << encData[0].second.size();
keys = encData[0].second;
recipients = encData[0].first;
const auto firstElement = encData.at(0);
qCDebug(MESSAGECOMPOSER_LOG) << "setting enc data:" << firstElement.first << "with num keys:" << firstElement.second.size();
keys = firstElement.second;
recipients = firstElement.first;
}
headers = skeletonMessage;
......
......@@ -80,7 +80,10 @@ public:
FoundMissingAttachmentAndCancel
};
enum FailedType { Sending, AutoSave };
enum FailedType {
Sending,
AutoSave,
};
/**
* Set the message to be opened in the composer window, and set the internal data structures to
......@@ -279,7 +282,10 @@ private:
*/
void readyForSending();
enum RecipientExpansion { UseExpandedRecipients, UseUnExpandedRecipients };
enum RecipientExpansion {
UseExpandedRecipients,
UseUnExpandedRecipients,
};
Q_REQUIRED_RESULT QVector<MessageComposer::Composer *> generateCryptoMessages(bool &wasCanceled);
void fillGlobalPart(MessageComposer::GlobalPart *globalPart);
void fillInfoPart(MessageComposer::InfoPart *part, RecipientExpansion expansion);
......
......@@ -19,41 +19,6 @@ ComposerViewInterface::~ComposerViewInterface()
{
}
void ComposerViewInterface::setReplyTo(const QString &str)
{
if (mComposerView) {
// mComposerView->setReplyTo(str);
}
}
void ComposerViewInterface::setSubject(const QString &str)
{
if (mComposerView) {
// mComposerView->setSubject(str);
}
}
void ComposerViewInterface::setTo(const QStringList &lst)
{
if (mComposerView) {
// mComposerView->setTo(lst);
}
}
void ComposerViewInterface::setCc(const QStringList &lst)
{
if (mComposerView) {
// mComposerView->setCc(lst);
}
}
void ComposerViewInterface::setFrom(const QString &str)
{
if (mComposerView) {
// mComposerView->setFrom(str);
}
}
QString ComposerViewInterface::subject() const
{
if (mComposerView) {
......
......@@ -22,12 +22,6 @@ public:
explicit ComposerViewInterface(ComposerViewBase *composerView);
~ComposerViewInterface();
void setReplyTo(const QString &str);
void setSubject(const QString &str);
void setTo(const QStringList &lst);
void setCc(const QStringList &lst);
void setFrom(const QString &str);
Q_REQUIRED_RESULT QString subject() const;
Q_REQUIRED_RESULT QString to() const;
Q_REQUIRED_RESULT QString cc() const;
......
......@@ -27,31 +27,6 @@ void PluginComposerInterface::setComposerViewBase(ComposerViewBase *composerView
mComposerViewInterface = new MessageComposer::ComposerViewInterface(composerViewBase);
}
void PluginComposerInterface::setReplyTo(const QString &str)
{
mComposerViewInterface->setReplyTo(str);
}
void PluginComposerInterface::setSubject(const QString &str)
{
mComposerViewInterface->setSubject(str);
}
void PluginComposerInterface::setTo(const QStringList &lst)
{
mComposerViewInterface->setTo(lst);
}
void PluginComposerInterface::setCc(const QStringList &lst)
{
mComposerViewInterface->setCc(lst);
}
void PluginComposerInterface::setFrom(const QString &str)
{
mComposerViewInterface->setFrom(str);
}
QString PluginComposerInterface::subject() const
{
return mComposerViewInterface->subject();
......
......@@ -24,12 +24,6 @@ public:
~PluginComposerInterface();
void setComposerViewBase(ComposerViewBase *composerViewBase);
void setReplyTo(const QString &str);
void setSubject(const QString &str);
void setTo(const QStringList &lst);
void setCc(const QStringList &lst);
void setFrom(const QString &str);
Q_REQUIRED_RESULT QString replyTo() const;
Q_REQUIRED_RESULT QString subject() const;
Q_REQUIRED_RESULT QString to() const;
......
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