Commit 252ee78c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QVector

parent 25b7d73e
......@@ -365,7 +365,7 @@ void CryptoComposerTest::testBCCEncrypt()
std::vector< GpgME::Key > skeys;
skeys.push_back(keys[2]);
QList<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
QVector<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
encKeys.append(QPair<QStringList, std::vector<GpgME::Key> >(primRecipients, pkeys));
encKeys.append(QPair<QStringList, std::vector<GpgME::Key> >(secondRecipients, skeys));
......@@ -556,7 +556,7 @@ void CryptoComposerTest::fillComposerCryptoData(Composer *composer)
QStringList recipients;
recipients << QString::fromLocal8Bit("you@you.you");
QList<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
QVector<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
encKeys.append(QPair<QStringList, std::vector<GpgME::Key> >(recipients, keys));
composer->setEncryptionKeys(encKeys);
......@@ -576,7 +576,7 @@ void CryptoComposerTest::runSMIMETest(bool sign, bool enc, bool opaque)
std::vector<GpgME::Key> keys = MessageComposer::Test::getKeys(true);
QStringList recipients;
recipients << QString::fromLocal8Bit("you@you.you");
QList<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
QVector<QPair<QStringList, std::vector<GpgME::Key> > > encKeys;
encKeys.append(QPair<QStringList, std::vector<GpgME::Key> >(recipients, keys));
composer->setEncryptionKeys(encKeys);
composer->setSigningKeys(keys);
......
......@@ -63,7 +63,7 @@ public:
void composeFinalStep(KMime::Content *headers, KMime::Content *content);
QList<QPair<QStringList, std::vector<GpgME::Key> > > encData;
QVector<QPair<QStringList, std::vector<GpgME::Key> > > encData;
std::vector<GpgME::Key> signers;
AttachmentPart::List attachmentParts;
// attachments with different sign/encrypt settings from
......@@ -552,7 +552,7 @@ void Composer::setSigningKeys(std::vector<GpgME::Key> &signers)
d->signers = signers;
}
void Composer::setEncryptionKeys(const QList<QPair<QStringList, std::vector<GpgME::Key> > > &encData)
void Composer::setEncryptionKeys(const QVector<QPair<QStringList, std::vector<GpgME::Key> > > &encData)
{
Q_D(Composer);
......
......@@ -65,7 +65,7 @@ public:
void setSignAndEncrypt(const bool doSign, const bool doEncrypt);
void setMessageCryptoFormat(Kleo::CryptoMessageFormat format);
void setSigningKeys(std::vector<GpgME::Key> &signers);
void setEncryptionKeys(const QList<QPair<QStringList, std::vector<GpgME::Key> > > &data);
void setEncryptionKeys(const QVector<QPair<QStringList, std::vector<GpgME::Key> > > &data);
/// Sets if this message being composed is an auto-saved message
/// if so, might need different handling, such as no crypto attachments.
......
......@@ -758,7 +758,7 @@ QList< MessageComposer::Composer * > ComposerViewBase::generateCryptoMessages(bo
std::vector<Kleo::KeyResolver::SplitInfo> encData = keyResolver->encryptionItems(concreteFormat);
std::vector<Kleo::KeyResolver::SplitInfo>::iterator it;
std::vector<Kleo::KeyResolver::SplitInfo>::iterator end(encData.end());
QList<QPair<QStringList, std::vector<GpgME::Key> > > data;
QVector<QPair<QStringList, std::vector<GpgME::Key> > > data;
data.reserve(encData.size());
for (it = encData.begin(); it != end; ++it) {
QPair<QStringList, std::vector<GpgME::Key> > p(it->recipients, it->keys);
......
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