Commit 6ea9ec8e authored by Laurent Montel's avatar Laurent Montel 😁

Remove unused method. Use static_cast

parent 066f7443
......@@ -51,15 +51,15 @@ public:
Private(AttachmentModel *qq);
~Private();
AttachmentModel *const q;
AttachmentPart::List parts;
QList<QTemporaryDir *> tempDirs;
AttachmentModel *const q;
bool modified = false;
bool encryptEnabled = false;
bool signEnabled = false;
bool encryptSelected = false;
bool signSelected = false;
bool autoDisplayEnabled = false;
QList<QTemporaryDir *> tempDirs;
};
AttachmentModel::Private::Private(AttachmentModel *qq)
......
......@@ -144,7 +144,7 @@ void RichTextComposerNgPrivate::fixHtmlFontSize(QString &cleanHtml)
const QString fontSizeStr = styleRegex.cap(1);
const int ptValue = fontSizeStr.toInt(&ok);
if (ok) {
double emValue = (double)ptValue / 12;
double emValue = static_cast<double>(ptValue) / 12;
const QString emValueStr = QString::number(emValue, 'g', 2);
cleanHtml.replace(styleRegex.pos(1), QString(fontSizeStr + QLatin1String("px")).length(), emValueStr + QLatin1String("em"));
}
......
......@@ -48,17 +48,6 @@ class MessageComposer::ComposerPrivate : public JobBasePrivate
public:
ComposerPrivate(Composer *qq)
: JobBasePrivate(qq)
, started(false)
, finished(false)
, sign(false)
, encrypt(false)
, noCrypto(false)
, autoSaving(false)
, globalPart(nullptr)
, infoPart(nullptr)
, textPart(nullptr)
, skeletonMessage(nullptr)
, resultContent(nullptr)
{
}
......@@ -73,32 +62,32 @@ public:
void attachmentsFinished(KJob *job); // slot
void composeFinalStep(KMime::Content *headers, KMime::Content *content);
bool started;
bool finished;
bool sign;
bool encrypt;
bool noCrypto;
bool autoSaving;
Kleo::CryptoMessageFormat format;
std::vector<GpgME::Key> signers;
QList<QPair<QStringList, std::vector<GpgME::Key> > > encData;
std::vector<GpgME::Key> signers;
AttachmentPart::List attachmentParts;
// attachments with different sign/encrypt settings from
// main message body. added at the end of the process
AttachmentPart::List lateAttachmentParts;
QList<KMime::Message::Ptr> resultMessages;
Kleo::CryptoMessageFormat format;
// Stuff that the application plays with.
GlobalPart *globalPart = nullptr;
InfoPart *infoPart = nullptr;
TextPart *textPart = nullptr;
AttachmentPart::List attachmentParts;
// attachments with different sign/encrypt settings from
// main message body. added at the end of the process
AttachmentPart::List lateAttachmentParts;
// Stuff that we play with.
KMime::Message *skeletonMessage = nullptr;
KMime::Content *resultContent = nullptr;
bool started = false;
bool finished = false;
bool sign = false;
bool encrypt = false;
bool noCrypto = false;
bool autoSaving = false;
Q_DECLARE_PUBLIC(Composer)
};
......
......@@ -113,11 +113,6 @@ CopyKeysAndEncryptionPreferences(const Kleo::KeyResolver::Item &oldItem, const K
return Kleo::KeyResolver::Item(oldItem.address, newItem.keys, newItem.pref, oldItem.signPref, oldItem.format);
}
static inline bool WithRespectToKeyID(const GpgME::Key &left, const GpgME::Key &right)
{
return qstrcmp(left.keyID(), right.keyID()) == 0;
}
static bool ValidOpenPGPEncryptionKey(const GpgME::Key &key)
{
if (key.protocol() != GpgME::OpenPGP) {
......@@ -226,21 +221,11 @@ static inline bool NotValidTrustedOpenPGPEncryptionKey(const GpgME::Key &key)
return !ValidTrustedOpenPGPEncryptionKey(key);
}
static inline bool NotValidOpenPGPEncryptionKey(const GpgME::Key &key)
{
return !ValidOpenPGPEncryptionKey(key);
}
static inline bool NotValidTrustedSMIMEEncryptionKey(const GpgME::Key &key)
{
return !ValidTrustedSMIMEEncryptionKey(key);
}
static inline bool NotValidSMIMEEncryptionKey(const GpgME::Key &key)
{
return !ValidSMIMEEncryptionKey(key);
}
static inline bool NotValidTrustedEncryptionKey(const GpgME::Key &key)
{
return !ValidTrustedEncryptionKey(key);
......@@ -251,11 +236,6 @@ static inline bool NotValidEncryptionKey(const GpgME::Key &key)
return !ValidEncryptionKey(key);
}
static inline bool NotValidSigningKey(const GpgME::Key &key)
{
return !ValidSigningKey(key);
}
static inline bool NotValidOpenPGPSigningKey(const GpgME::Key &key)
{
return !ValidOpenPGPSigningKey(key);
......
......@@ -954,7 +954,7 @@ uint MessageFactoryNG::identityUoid(const KMime::Message::Ptr &msg)
idString = hdr->asUnicodeString().trimmed();
}
bool ok = false;
int id = idString.toUInt(&ok);
uint id = idString.toUInt(&ok);
if (!ok || id == 0) {
id = m_identityManager->identityForAddress(msg->to()->asUnicodeString() + QLatin1String(", ") + msg->cc()->asUnicodeString()).uoid();
......
......@@ -48,10 +48,10 @@ public:
{
}
KMime::Content *content = nullptr;
QStringList recipients;
std::vector<GpgME::Key> keys;
Kleo::CryptoMessageFormat format;
QStringList recipients;
KMime::Content *content = nullptr;
// copied from messagecomposer.cpp
bool binaryHint(Kleo::CryptoMessageFormat f)
......
......@@ -49,12 +49,12 @@ public:
{
}
KMime::Content *content = nullptr;
std::vector<GpgME::Key> signers;
Kleo::CryptoMessageFormat format;
std::vector<GpgME::Key> encKeys;
QStringList recipients;
Kleo::CryptoMessageFormat format;
KMime::Content *content = nullptr;
// copied from messagecomposer.cpp
bool binaryHint(Kleo::CryptoMessageFormat f)
......
......@@ -51,10 +51,10 @@ public:
}
ActionType mActionType;
bool mSelectedText = false;
QWidget *mParentWidget = nullptr;
KPIMTextEdit::RichTextEditor *mRichTextEditor = nullptr;
PluginEditor *plugin = nullptr;
bool mSelectedText = false;
};
PluginEditorInterface::PluginEditorInterface(QObject *parent)
......
......@@ -40,8 +40,8 @@ public:
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
int order = 0;
PluginEditor *plugin = nullptr;
bool isEnabled = true;
PluginEditor *plugin = nullptr;
};
namespace {
......
......@@ -35,9 +35,9 @@ public:
{
}
PimCommon::PluginUtilData pluginData;
QString metaDataFileNameBaseName;
QString metaDataFileName;
PimCommon::PluginUtilData pluginData;
PluginEditorCheckBeforeSend *plugin = nullptr;
bool isEnabled = true;
};
......
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