summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-10-02 08:54:47 +0200
committerMontel Laurent <[email protected]>2017-10-02 09:00:29 +0200
commit75ab18570480eb931b8bc9afd3c3db17b7ddc7b0 (patch)
tree0c957f3dd692e494bee6d81f55812dd1a43d8504
parentd89a533742bc45791abaeb87eaab00e3d58aad0a (diff)
Const'ify. Clean up
-rw-r--r--messagecomposer/src/attachment/attachmentcontrollerbase.cpp4
-rw-r--r--messagecomposer/src/attachment/attachmentmodel.cpp11
2 files changed, 2 insertions, 13 deletions
diff --git a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp b/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
index 40d209f..22a332d 100644
--- a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
+++ b/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
@@ -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());
diff --git a/messagecomposer/src/attachment/attachmentmodel.cpp b/messagecomposer/src/attachment/attachmentmodel.cpp
index c09b6ce..f0b99a6 100644
--- a/messagecomposer/src/attachment/attachmentmodel.cpp
+++ b/messagecomposer/src/attachment/attachmentmodel.cpp
@@ -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()