Commit ed6fd011 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent 9b240d11
......@@ -168,8 +168,7 @@ KContacts::Addressee::List VCardImportExportPluginInterface::parseVCard(const QB
return converter.parseVCards(data);
}
KContacts::Addressee::List VCardImportExportPluginInterface::filterContacts(const KContacts::Addressee::List &addrList,
KAddressBookImportExport::KAddressBookExportSelectionWidget::ExportFields exportFieldType) const
KContacts::Addressee::List VCardImportExportPluginInterface::filterContacts(const KContacts::Addressee::List &addrList, KAddressBookImportExport::KAddressBookExportSelectionWidget::ExportFields exportFieldType) const
{
KContacts::Addressee::List list;
......
......@@ -351,8 +351,7 @@ MergeContacts::ConflictInformations MergeContacts::requiresManualSelectionOfInfo
return result;
}
void MergeContacts::checkCustomValue(const KContacts::Addressee &address, const QString &variable, KContacts::Addressee &newContact, MergeContacts::ConflictInformations &result,
MergeContacts::ConflictInformation conflict)
void MergeContacts::checkCustomValue(const KContacts::Addressee &address, const QString &variable, KContacts::Addressee &newContact, MergeContacts::ConflictInformations &result, MergeContacts::ConflictInformation conflict)
{
const QString value = address.custom(QStringLiteral("KADDRESSBOOK"), variable);
if (!value.isEmpty()) {
......
......@@ -63,8 +63,7 @@ public:
void setItems(const Akonadi::Item::List &items);
private:
void mergeToContact(KContacts::Addressee &newAddress, const KContacts::Addressee &fromContact, bool excludeConflictPart);
void checkCustomValue(const KContacts::Addressee &address, const QString &variable, KContacts::Addressee &newContact, MergeContacts::ConflictInformations &result,
MergeContacts::ConflictInformation conflict);
void checkCustomValue(const KContacts::Addressee &address, const QString &variable, KContacts::Addressee &newContact, MergeContacts::ConflictInformations &result, MergeContacts::ConflictInformation conflict);
void mergeCustomValue(const KContacts::Addressee &fromContact, const QString &variable, KContacts::Addressee &newContact);
Akonadi::Item::List mListItem;
};
......
......@@ -47,4 +47,3 @@ void MarkdownConfigureWidgetTest::shouldHaveDefaultValue()
QVERIFY(mExtraDefinitionLists);
QVERIFY(!mExtraDefinitionLists->text().isEmpty());
}
......@@ -63,7 +63,6 @@ void MarkdownCreateImageWidgetTest::shouldHaveDefaultValue()
QVERIFY(mKeepOriginalSize);
QVERIFY(mKeepOriginalSize->isChecked());
QLabel *mLabWidth = w.findChild<QLabel *>(QStringLiteral("labwidth"));
QVERIFY(mLabWidth);
QVERIFY(!mLabWidth->text().isEmpty());
......@@ -139,7 +138,6 @@ void MarkdownCreateImageWidgetTest::shouldAddSize()
QCOMPARE(w.linkStr(), QStringLiteral("![TITLE](http://www.kde.org =45x70 \"alternate\")"));
mAlternateText->setText(QString());
QCOMPARE(w.linkStr(), QStringLiteral("![TITLE](http://www.kde.org =45x70)"));
}
void MarkdownCreateImageWidgetTest::shouldEmitSignal()
......
......@@ -25,7 +25,6 @@ QTEST_GUILESS_MAIN(MarkdownUtilTest)
MarkdownUtilTest::MarkdownUtilTest(QObject *parent)
: QObject(parent)
{
}
void MarkdownUtilTest::shouldConvert()
......
......@@ -52,6 +52,7 @@ external_codefmt(const char *src, int, void *)
QByteArray ba = result.toLatin1();
return qstrdup(ba.data());
}
#endif
MarkdownConverter::MarkdownConverter(QObject *parent)
......
......@@ -79,4 +79,3 @@ void MarkdownCreateImageDialog::readConfig()
resize(sizeDialog);
}
}
......@@ -46,7 +46,6 @@ MarkdownCreateImageWidget::MarkdownCreateImageWidget(QWidget *parent)
mAlternateText->setObjectName(QStringLiteral("alternatetext"));
mAlternateText->setClearButtonEnabled(true);
mainLayout->addRow(i18n("Title:"), mTitle);
mainLayout->addRow(i18n("Image Link:"), mImageUrl);
mainLayout->addRow(i18n("Alternate text:"), mAlternateText);
......
......@@ -40,7 +40,6 @@ MarkdownCreateLinkWidget::MarkdownCreateLinkWidget(QWidget *parent)
connect(mTitle, &QLineEdit::textChanged, this, &MarkdownCreateLinkWidget::slotEnableButton);
connect(mLink, &QLineEdit::textChanged, this, &MarkdownCreateLinkWidget::slotEnableButton);
mainLayout->addRow(i18n("Title:"), mTitle);
mainLayout->addRow(i18n("Link:"), mLink);
}
......
......@@ -30,7 +30,7 @@ QStringList MarkdownUtil::imagePaths(const QString &str)
while (i.hasNext()) {
QRegularExpressionMatch match = i.next();
if (match.hasMatch()) {
results.append(match.captured(1));
results.append(match.captured(1));
}
}
return results;
......
......@@ -22,9 +22,8 @@
#include <QStringList>
#include "libkmailmarkdown_export.h"
namespace MarkdownUtil
{
LIBKMAILMARKDOWN_EXPORT QStringList imagePaths(const QString &str);
namespace MarkdownUtil {
LIBKMAILMARKDOWN_EXPORT QStringList imagePaths(const QString &str);
}
#endif // MARKDOWNUTIL_H
......@@ -199,18 +199,17 @@ void MarkdownInterface::addEmbeddedImages(MessageComposer::TextPart *textPart, Q
imageNameToAdd = imageName + QString::number(imageNumber++);
} else {
imageNameToAdd = imageName.left(firstDot) + QString::number(imageNumber++)
+imageName.mid(firstDot);
+imageName.mid(firstDot);
}
}
QSharedPointer<KPIMTextEdit::EmbeddedImage> embeddedImage = richTextEditor()->composerControler()->composerImages()->createEmbeddedImage(image, imageNameToAdd);
lstEmbeddedImages.append(embeddedImage);
const QString newImageName = QLatin1String("cid:") + embeddedImage->contentID;
const QString quote(QStringLiteral("\""));
htmlVersion.replace(QString(quote + urlImage + quote),
QString(quote + newImageName + quote));
QString(quote + newImageName + quote));
textVersion.replace(urlImage, newImageName);
imageNameAdded << imageNameToAdd;
}
......@@ -238,7 +237,6 @@ MessageComposer::PluginEditorConvertTextInterface::ConvertTextStatus MarkdownInt
addEmbeddedImages(textPart, textVersion, result);
textPart->setCleanPlainText(textVersion);
textPart->setWrappedPlainText(textVersion);
textPart->setCleanHtml(result);
return MessageComposer::PluginEditorConvertTextInterface::ConvertTextStatus::Converted;
......
......@@ -65,7 +65,7 @@ LanguageToolConfigWidget::LanguageToolConfigWidget(QWidget *parent)
connect(mUseLocalInstance, &QCheckBox::clicked, this, [this](bool b) {
updateWidgets(b);
}
);
);
QHBoxLayout *languageLayout = new QHBoxLayout;
languageLayout->setObjectName(QStringLiteral("languagelayout"));
......
......@@ -662,8 +662,7 @@ public:
return true;
}
bool mail(Viewer *viewerInstance, const Incidence::Ptr &incidence, const QString &status, iTIPMethod method = iTIPReply, const QString &receiver = QString(),
const QString &to = QString(), MailType type = Answer) const
bool mail(Viewer *viewerInstance, const Incidence::Ptr &incidence, const QString &status, iTIPMethod method = iTIPReply, const QString &receiver = QString(), const QString &to = QString(), MailType type = Answer) const
{
//status is accepted/tentative/declined
ICalFormat format;
......
......@@ -64,7 +64,6 @@ void GrantleeHeaderStylePluginTest::initTestCase()
qDebug() << file << newPath;
QVERIFY(QFile(file.absoluteFilePath()).copy(newPath));
}
}
}
......
......@@ -207,7 +207,6 @@ AdBlockSubscription *AdblockManager::addSubscription(const QString &title, const
QString fileName = AdBlock::AdblockUtil::filterCharsFromFilename(title.toLower()) + QStringLiteral(".txt");
QString filePath = AdBlock::AdblockUtil::ensureUniqueFilename(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/adblock/") + fileName);
QByteArray data = QStringLiteral("Title: %1\nUrl: %2\n[Adblock Plus 1.1.1]").arg(title, url).toUtf8();
QSaveFile file(filePath);
......
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