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

Const'ify. Clean up

parent d89a5337
......@@ -101,7 +101,7 @@ public:
void addAttachmentPart(AttachmentPart::Ptr part);
void attachVcardFromAddressBook(KJob *job); //slot
void selectedAllAttachment();
void createOpenWithMenu(QMenu *topMenu, AttachmentPart::Ptr part);
void createOpenWithMenu(QMenu *topMenu, const AttachmentPart::Ptr &part);
void reloadAttachment();
void updateJobResult(KJob *);
......@@ -317,7 +317,7 @@ void AttachmentControllerBase::Private::editDone(MessageViewer::EditorWatcher *w
// The watcher deletes itself.
}
void AttachmentControllerBase::Private::createOpenWithMenu(QMenu *topMenu, AttachmentPart::Ptr part)
void AttachmentControllerBase::Private::createOpenWithMenu(QMenu *topMenu, const AttachmentPart::Ptr &part)
{
const QString contentTypeStr = QString::fromLatin1(part->mimeType());
const KService::List offers = KFileItemActions::associatedApplications(QStringList() << contentTypeStr, QString());
......
......@@ -77,17 +77,6 @@ AttachmentModel::AttachmentModel(QObject *parent)
: QAbstractItemModel(parent)
, d(new Private(this))
{
QHash<int, QByteArray> names = roleNames();
names.insert(NameRole, "attachmentName");
names.insert(SizeRole, "attachmentSize");
names.insert(EncodingRole, "attachmentEncoding");
names.insert(MimeTypeRole, "attachmentMimeType");
names.insert(CompressRole, "attachmentIsCompressed");
names.insert(EncryptRole, "attachmentIsEncrypted");
names.insert(SignRole, "attachmentIsSigned");
names.insert(AutoDisplayRole, "attachmentIsAutoDiplayed");
setRoleNames(names);
}
AttachmentModel::~AttachmentModel()
......
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