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

USe const'ref

parent 68b8b00c
......@@ -87,7 +87,7 @@ public:
Private(AttachmentControllerBase *qq);
~Private();
void attachmentRemoved(AttachmentPart::Ptr part); // slot
void attachmentRemoved(const AttachmentPart::Ptr &part); // slot
void compressJobResult(KJob *job); // slot
void loadJobResult(KJob *job); // slot
void openSelectedAttachments(); // slot
......@@ -195,7 +195,7 @@ void AttachmentControllerBase::setSelectedParts(const AttachmentPart::List &sele
d->propertiesContextAction->setEnabled(selectedCount == 1);
}
void AttachmentControllerBase::Private::attachmentRemoved(AttachmentPart::Ptr part)
void AttachmentControllerBase::Private::attachmentRemoved(const AttachmentPart::Ptr &part)
{
uncompressedParts.remove(part);
}
......@@ -579,7 +579,7 @@ void AttachmentControllerBase::setSignEnabled(bool enabled)
d->signEnabled = enabled;
}
void AttachmentControllerBase::compressAttachment(AttachmentPart::Ptr part, bool compress)
void AttachmentControllerBase::compressAttachment(const AttachmentPart::Ptr &part, bool compress)
{
if (compress) {
qCDebug(MESSAGECOMPOSER_LOG) << "Compressing part.";
......@@ -704,7 +704,7 @@ void AttachmentControllerBase::openWith(const KService::Ptr &offer)
}
}
void AttachmentControllerBase::openAttachment(AttachmentPart::Ptr part)
void AttachmentControllerBase::openAttachment(const AttachmentPart::Ptr &part)
{
QTemporaryFile *tempFile = dumpAttachmentToTempFile(part);
if (!tempFile) {
......@@ -738,7 +738,7 @@ void AttachmentControllerBase::openAttachment(AttachmentPart::Ptr part)
}
}
void AttachmentControllerBase::viewAttachment(AttachmentPart::Ptr part)
void AttachmentControllerBase::viewAttachment(const AttachmentPart::Ptr &part)
{
MessageComposer::Composer *composer = new MessageComposer::Composer;
composer->globalPart()->setFallbackCharsetEnabled(true);
......@@ -803,12 +803,12 @@ void AttachmentControllerBase::editAttachment(AttachmentPart::Ptr part, MessageV
}
}
void AttachmentControllerBase::editAttachmentWith(AttachmentPart::Ptr part)
void AttachmentControllerBase::editAttachmentWith(const AttachmentPart::Ptr &part)
{
editAttachment(part, MessageViewer::EditorWatcher::OpenWithDialog);
}
void AttachmentControllerBase::saveAttachmentAs(AttachmentPart::Ptr part)
void AttachmentControllerBase::saveAttachmentAs(const AttachmentPart::Ptr &part)
{
QString pname = part->name();
if (pname.isEmpty()) {
......@@ -849,7 +849,7 @@ void AttachmentControllerBase::slotPutResult(KJob *job)
}
}
void AttachmentControllerBase::attachmentProperties(AttachmentPart::Ptr part)
void AttachmentControllerBase::attachmentProperties(const AttachmentPart::Ptr &part)
{
QPointer<AttachmentPropertiesDialog> dialog = new AttachmentPropertiesDialog(
part, false, d->wParent);
......@@ -936,7 +936,7 @@ void AttachmentControllerBase::showAddAttachmentFileDialog()
}
}
void AttachmentControllerBase::addAttachment(AttachmentPart::Ptr part)
void AttachmentControllerBase::addAttachment(const AttachmentPart::Ptr &part)
{
part->setEncrypted(d->model->isEncryptSelected());
part->setSigned(d->model->isSignSelected());
......
......@@ -62,18 +62,18 @@ public Q_SLOTS:
void setEncryptEnabled(bool enabled);
void setSignEnabled(bool enabled);
/// compression is async...
void compressAttachment(MessageCore::AttachmentPart::Ptr part, bool compress);
void compressAttachment(const MessageCore::AttachmentPart::Ptr &part, bool compress);
void showContextMenu();
void openAttachment(MessageCore::AttachmentPart::Ptr part);
void viewAttachment(MessageCore::AttachmentPart::Ptr part);
void openAttachment(const MessageCore::AttachmentPart::Ptr &part);
void viewAttachment(const MessageCore::AttachmentPart::Ptr &part);
void editAttachment(MessageCore::AttachmentPart::Ptr part, MessageViewer::EditorWatcher::OpenWithOption option = MessageViewer::EditorWatcher::NoOpenWithDialog);
void editAttachmentWith(MessageCore::AttachmentPart::Ptr part);
void saveAttachmentAs(MessageCore::AttachmentPart::Ptr part);
void attachmentProperties(MessageCore::AttachmentPart::Ptr part);
void editAttachmentWith(const MessageCore::AttachmentPart::Ptr &part);
void saveAttachmentAs(const MessageCore::AttachmentPart::Ptr &part);
void attachmentProperties(const MessageCore::AttachmentPart::Ptr &part);
void showAddAttachmentFileDialog();
void showAddAttachmentCompressedDirectoryDialog();
/// sets sign, encrypt, shows properties dialog if so configured
void addAttachment(MessageCore::AttachmentPart::Ptr part);
void addAttachment(const MessageCore::AttachmentPart::Ptr &part);
void addAttachment(const QUrl &url);
void addAttachmentUrlSync(const QUrl &url);
void addAttachments(const QList<QUrl> &urls);
......@@ -109,7 +109,7 @@ private:
class Private;
Private *const d;
Q_PRIVATE_SLOT(d, void attachmentRemoved(MessageCore::AttachmentPart::Ptr))
Q_PRIVATE_SLOT(d, void attachmentRemoved(const MessageCore::AttachmentPart::Ptr&))
Q_PRIVATE_SLOT(d, void compressJobResult(KJob *))
Q_PRIVATE_SLOT(d, void loadJobResult(KJob *))
Q_PRIVATE_SLOT(d, void openSelectedAttachments())
......
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