Commit 8de06195 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix clazy warning

parent 2a8bd530
......@@ -454,7 +454,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
applyMainWindowSettings(KMKernel::self()->config()->group("Composer"));
mUpdateWindowTitleConnection = connect(mEdtSubject, &PimCommon::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle);
mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, [this](uint val) {
mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, this, [this](uint val) {
slotIdentityChanged(val);
});
connect(kmkernel->identityManager(), qOverload<uint>(&KIdentityManagement::IdentityManager::changed), this, [this](uint val) {
......@@ -642,7 +642,7 @@ void KMComposerWin::addAttachmentsAndSend(const QList<QUrl> &urls, const QString
send(how);
}
void KMComposerWin::addAttachment(const QList<AttachmentInfo> &infos, bool showWarning)
void KMComposerWin::addAttachment(const QList<KMail::Composer::AttachmentInfo> &infos, bool showWarning)
{
QStringList lst;
for (const AttachmentInfo &info : infos) {
......@@ -1661,7 +1661,7 @@ void KMComposerWin::setMessage(const KMime::Message::Ptr &newMsg, bool lastSignS
// load the mId into the gui, sticky or not, without emitting
mComposerBase->identityCombo()->setCurrentIdentity(mId);
mIdentityConnection = connect(mComposerBase->identityCombo(), &KIdentityManagement::IdentityCombo::identityChanged, [this](uint val) {
mIdentityConnection = connect(mComposerBase->identityCombo(), &KIdentityManagement::IdentityCombo::identityChanged, this, [this](uint val) {
slotIdentityChanged(val);
});
......
......@@ -144,7 +144,7 @@ public Q_SLOTS:
void addAttachmentsAndSend(const QList<QUrl> &urls, const QString &comment, int how) override;
void addAttachment(const QList<AttachmentInfo> &infos, bool showWarning) override;
void addAttachment(const QList<KMail::Composer::AttachmentInfo> &infos, bool showWarning) override;
void addAttachment(const QString &name, KMime::Headers::contentEncoding cte, const QString &charset, const QByteArray &data, const QByteArray &mimeType) override;
......
......@@ -426,7 +426,8 @@ bool KMKernel::handleCommandLine(bool noArgsOpensReader, const QStringList &args
if (!calledWithSession) {
// only read additional command line arguments if kmail/kontact is
// not called with "-session foo"
for (const QString &arg : parser.positionalArguments()) {
const QStringList lstPositionalArguments = parser.positionalArguments();
for (const QString &arg : lstPositionalArguments) {
if (arg.startsWith(QLatin1String("mailto:"), Qt::CaseInsensitive)) {
const QUrl urlDecoded(QUrl::fromPercentEncoding(arg.toUtf8()));
const QVector<QPair<QString, QString> > values = MessageCore::StringUtil::parseMailtoUrl(urlDecoded);
......
......@@ -302,13 +302,13 @@ QString KMReaderWin::newFeaturesMD5()
void KMReaderWin::displaySplashPage(const QString &templateName, const QVariantHash &_data)
{
QVariantHash data = _data;
if (!data.contains(QLatin1String("icon"))) {
if (!data.contains(QStringLiteral("icon"))) {
data[QStringLiteral("icon")] = QStringLiteral("kmail");
}
if (!data.contains(QLatin1String("name"))) {
if (!data.contains(QStringLiteral("name"))) {
data[QStringLiteral("name")] = i18n("KMail");
}
if (!data.contains(QLatin1String("subtitle"))) {
if (!data.contains(QStringLiteral("subtitle"))) {
data[QStringLiteral("subtitle")] = i18n("The KDE Mail Client");
}
......
......@@ -109,9 +109,9 @@ static QString toolTip(const Akonadi::Item &item)
tip += htmlCodeForStandardRow.arg(i18n("Preview"), content.replace(QLatin1Char('\n'), QStringLiteral("<br>")));
}
} else {
tip += htmlCodeForStandardRow.arg(msg->from()->displayString()).arg(i18n("From"));
tip += htmlCodeForStandardRow.arg(msg->to()->displayString()).arg(i18nc("Receiver of the email", "To"));
tip += htmlCodeForStandardRow.arg(QLocale().toString(msg->date()->dateTime())).arg(i18n("Date"));
tip += htmlCodeForStandardRow.arg(msg->from()->displayString(), i18n("From"));
tip += htmlCodeForStandardRow.arg(msg->to()->displayString(), i18nc("Receiver of the email", "To"));
tip += htmlCodeForStandardRow.arg(QLocale().toString(msg->date()->dateTime()), i18n("Date"));
if (!content.isEmpty()) {
tip += htmlCodeForStandardRow.arg(content.replace(QLatin1Char('\n'), QStringLiteral("<br>")), i18n("Preview"));
}
......
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