Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F26446275
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
6 KB
Subscribers
None
View Options
diff --git a/src/core/attachmentmodel.h b/src/core/attachmentmodel.h
index 8f24659..67745c7 100644
--- a/src/core/attachmentmodel.h
+++ b/src/core/attachmentmodel.h
@@ -1,67 +1,67 @@
// SPDX-FileCopyrightText: 2016 Sandro Knauß <knauss@kolabsys.com>
// SPDX-FileCopyCopyright: 2017 Christian Mollekopf <mollekopf@kolabsys.com>
// SPDX-License-Identifier: LGPL-2.0-or-later
#pragma once
#include "mimetreeparser_core_export.h"
#include "objecttreeparser.h"
#include <QAbstractTableModel>
#include <QModelIndex>
#include <memory>
namespace MimeTreeParser
{
class ObjectTreeParser;
}
class AttachmentModelPrivate;
class MIMETREEPARSER_CORE_EXPORT AttachmentModel : public QAbstractTableModel
{
Q_OBJECT
public:
AttachmentModel(std::shared_ptr<MimeTreeParser::ObjectTreeParser> parser);
- ~AttachmentModel();
+ ~AttachmentModel() override;
public:
enum Roles {
TypeRole = Qt::UserRole + 1,
IconRole,
NameRole,
SizeRole,
IsEncryptedRole,
IsSignedRole,
AttachmentPartRole,
};
enum Columns {
NameColumn = 0,
SizeColumn,
IsEncryptedColumn,
IsSignedColumn,
ColumnCount,
};
QHash<int, QByteArray> roleNames() const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Q_INVOKABLE bool openAttachment(const int row);
Q_INVOKABLE bool importPublicKey(const int row);
bool openAttachment(const MimeTreeParser::MessagePart::Ptr &message);
bool importPublicKey(const MimeTreeParser::MessagePart::Ptr &message);
Q_INVOKABLE QString saveAttachmentToPath(const int row, const QString &path);
QString saveAttachmentToPath(const MimeTreeParser::MessagePart::Ptr &part, const QString &path);
Q_SIGNALS:
void info(const QString &message);
void errorOccurred(const QString &message);
private:
std::unique_ptr<AttachmentModelPrivate> d;
};
diff --git a/src/core/partmodel.h b/src/core/partmodel.h
index b9ae077..935e753 100644
--- a/src/core/partmodel.h
+++ b/src/core/partmodel.h
@@ -1,132 +1,132 @@
// SPDX-FileCopyrightText: 2016 Christian Mollekopf <mollekopf@kolabsys.com>
// SPDX-License-Identifier: LGPL-2.0-or-later
#pragma once
#include <QAbstractItemModel>
#include <QModelIndex>
#include <gpgme++/decryptionresult.h>
#include <gpgme++/key.h>
#include "mimetreeparser_core_export.h"
#include <memory>
namespace QGpgME
{
class Protocol;
}
namespace MimeTreeParser
{
class ObjectTreeParser;
}
class PartModelPrivate;
class MIMETREEPARSER_CORE_EXPORT PartModel : public QAbstractItemModel
{
Q_OBJECT
Q_PROPERTY(bool showHtml READ showHtml WRITE setShowHtml NOTIFY showHtmlChanged)
Q_PROPERTY(bool containsHtml READ containsHtml NOTIFY containsHtmlChanged)
Q_PROPERTY(bool trimMail READ trimMail WRITE setTrimMail NOTIFY trimMailChanged)
Q_PROPERTY(bool isTrimmed READ isTrimmed NOTIFY trimMailChanged)
public:
PartModel(std::shared_ptr<MimeTreeParser::ObjectTreeParser> parser);
- ~PartModel();
+ ~PartModel() override;
static std::pair<QString, bool> trim(const QString &text);
public:
enum class Types : quint8 {
Error,
Encapsulated,
Ical,
Plain,
None,
Html,
};
Q_ENUM(Types);
enum Roles {
TypeRole = Qt::UserRole + 1,
ContentRole,
IsEmbeddedRole,
IsEncryptedRole,
IsSignedRole,
IsErrorRole,
SecurityLevelRole,
EncryptionSecurityLevelRole,
SignatureSecurityLevelRole,
SignatureDetails,
EncryptionDetails,
ErrorType,
ErrorString,
SenderRole,
DateRole
};
enum SecurityLevel {
Unknow,
Good,
NotSoGood,
Bad,
};
Q_ENUM(SecurityLevel);
QHash<int, QByteArray> roleNames() const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
void setShowHtml(bool html);
[[nodiscard]] bool showHtml() const;
[[nodiscard]] bool containsHtml() const;
void setTrimMail(bool trim);
[[nodiscard]] bool trimMail() const;
[[nodiscard]] bool isTrimmed() const;
Q_SIGNALS:
void showHtmlChanged();
void trimMailChanged();
void containsHtmlChanged();
private:
std::unique_ptr<PartModelPrivate> d;
};
class MIMETREEPARSER_CORE_EXPORT SignatureInfo
{
Q_GADGET
Q_PROPERTY(QByteArray keyId MEMBER keyId CONSTANT)
Q_PROPERTY(bool keyMissing MEMBER keyMissing CONSTANT)
Q_PROPERTY(bool keyRevoked MEMBER keyRevoked CONSTANT)
Q_PROPERTY(bool keyExpired MEMBER keyExpired CONSTANT)
Q_PROPERTY(bool sigExpired MEMBER sigExpired CONSTANT)
Q_PROPERTY(bool crlMissing MEMBER crlMissing CONSTANT)
Q_PROPERTY(bool crlTooOld MEMBER crlTooOld CONSTANT)
Q_PROPERTY(QString signer MEMBER signer CONSTANT)
Q_PROPERTY(QStringList signerMailAddresses MEMBER signerMailAddresses CONSTANT)
Q_PROPERTY(bool signatureIsGood MEMBER signatureIsGood CONSTANT)
Q_PROPERTY(bool isCompliant MEMBER isCompliant CONSTANT)
Q_PROPERTY(GpgME::Signature::Validity keyTrust MEMBER keyTrust CONSTANT)
public:
bool keyRevoked = false;
bool keyExpired = false;
bool sigExpired = false;
bool keyMissing = false;
bool crlMissing = false;
bool crlTooOld = false;
bool isCompliant = false;
GpgME::Signature::Validity keyTrust;
QByteArray keyId;
const QGpgME::Protocol *cryptoProto = nullptr;
std::vector<std::pair<GpgME::DecryptionResult::Recipient, GpgME::Key>> decryptRecipients;
QString signer;
QStringList signerMailAddresses;
bool signatureIsGood = false;
};
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jul 17, 12:50 AM (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
40/3f/8c8d9d692ed7eea099304a490077
Attached To
rMTP MIME Tree Parser
Event Timeline
Log In to Comment