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

GIT_SILENT: coding style

parent dea6e449
Pipeline #35345 canceled with stage
......@@ -14,8 +14,7 @@ class CSVImportExportPlugin : public KAddressBookImportExport::Plugin
{
Q_OBJECT
public:
explicit CSVImportExportPlugin(QObject *parent = nullptr, const QList<QVariant> & =
{
explicit CSVImportExportPlugin(QObject *parent = nullptr, const QList<QVariant> & = {
});
~CSVImportExportPlugin() override;
......
......@@ -15,12 +15,10 @@
ImportWindowContact::ImportWindowContact()
{
}
ImportWindowContact::~ImportWindowContact()
{
}
KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileName)
......@@ -57,7 +55,6 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
for (QDomElement addresses = emails.firstChildElement(); !addresses.isNull(); addresses = addresses.nextSiblingElement()) {
const QString addressesTag = addresses.tagName();
if (addressesTag == QLatin1String("c:Type")) {
} else if (addressesTag == QLatin1String("c:Address")) {
email.setEmail(addresses.text());
} else {
......@@ -245,7 +242,7 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
url.setUrl(QUrl::fromUserInput(urlInfo.text()));
contact.insertExtraUrl(url);
} else {
qCWarning(IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG) << " url info tag not supported yet " << urlInfoTag;
qCWarning(IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG) << " url info tag not supported yet " << urlInfoTag;
}
}
} else {
......@@ -269,7 +266,7 @@ bool ImportWindowContact::loadDomElement(QDomDocument &doc, QFile *file)
int errorCol;
if (!doc.setContent(file, &errorMsg, &errorRow, &errorCol)) {
qCWarning(IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG) << "Unable to load document.Parse error in line " << errorRow
<< ", col " << errorCol << ": " << errorMsg;
<< ", col " << errorCol << ": " << errorMsg;
return false;
}
return true;
......
......@@ -67,7 +67,6 @@ void MarkdownCreateImageWidgetTest::shouldHaveDefaultValue()
QCOMPARE(mHeight->maximum(), 999);
QVERIFY(!mHeight->isEnabled());
QWidget *sizeWidget = w.findChild<QWidget *>(QStringLiteral("sizeWidget"));
QVERIFY(sizeWidget);
......
......@@ -48,7 +48,6 @@ MarkdownCreateImageWidget::MarkdownCreateImageWidget(QWidget *parent)
sizeWidgetLayout->setContentsMargins({});
mainLayout->addRow(sizeWidget);
mLabWidth = new QLabel(i18n("Width:"), this);
mLabWidth->setObjectName(QStringLiteral("labwidth"));
mLabWidth->setEnabled(false);
......
......@@ -571,7 +571,7 @@ public:
attachCt->setCharset("utf-8");
attachCt->setName(QStringLiteral("cal.ics"), "utf-8");
attachCt->setParameter(QStringLiteral("method"),
QStringLiteral("reply"));
QStringLiteral("reply"));
attachMessage->setHeader(attachDisposition);
attachMessage->contentTransferEncoding()->setEncoding(KMime::Headers::CEquPr);
attachMessage->setBody(KMime::CRLFtoLF(iCal.toUtf8()));
......
......@@ -75,7 +75,7 @@ QVector<ItineraryMemento::TripData> ItineraryMemento::data()
RentalCarReservation,
TaxiReservation,
TrainReservation
>();
>();
validator.setAcceptOnlyCompleteElements(false);
auto postProcResult = m_postProc.result();
postProcResult.erase(std::remove_if(postProcResult.begin(), postProcResult.end(), [&validator](const auto &elem) {
......
......@@ -8,12 +8,10 @@
MarkdownAbstract::MarkdownAbstract()
{
}
MarkdownAbstract::~MarkdownAbstract()
{
}
void MarkdownAbstract::setText(const QString &str)
......
......@@ -12,12 +12,10 @@ extern "C" {
MarkdownDiscount::MarkdownDiscount()
{
}
MarkdownDiscount::~MarkdownDiscount()
{
}
QString MarkdownDiscount::toHtml() const
......
......@@ -10,12 +10,10 @@
MarkdownQTextDocument::MarkdownQTextDocument()
{
}
MarkdownQTextDocument::~MarkdownQTextDocument()
{
}
QString MarkdownQTextDocument::toHtml() const
......
......@@ -48,18 +48,18 @@ public:
c.insert(QStringLiteral("block"), msgPart.data());
c.insert(QStringLiteral("showOnlyOneMimePart"), context->showOnlyOneMimePart());
c.insert(QStringLiteral("content"), QVariant::fromValue<MessageViewer::GrantleeCallback>([=](Grantlee::OutputStream *) {
QString result;
QString result;
#ifdef USE_DISCOUNT_LIB
MarkdownDiscount engine;
engine.setText(msgPart->text());
result = engine.toHtml();
MarkdownDiscount engine;
engine.setText(msgPart->text());
result = engine.toHtml();
#else
MarkdownQTextDocument engine;
engine.setText(msgPart->text());
result = engine.toHtml();
MarkdownQTextDocument engine;
engine.setText(msgPart->text());
result = engine.toHtml();
#endif
(*htmlWriter->stream()) << result;
}));
(*htmlWriter->stream()) << result;
}));
auto t = MessageViewer::MessagePartRendererManager::self()->loadByName(QStringLiteral("textmessagepart.html"));
Grantlee::OutputStream s(htmlWriter->stream());
t->render(&s, &c);
......
......@@ -24,7 +24,6 @@ void DKIMAdvancedWidgetTest::shouldHaveDefaultValues()
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0));
QCheckBox *mCheckDKIMWhenOnlyTesting = w.findChild<QCheckBox *>(QStringLiteral("mCheckDKIMWhenOnlyTesting"));
QVERIFY(mCheckDKIMWhenOnlyTesting);
QVERIFY(!mCheckDKIMWhenOnlyTesting->text().isEmpty());
......
......@@ -13,7 +13,6 @@ QTEST_MAIN(DKIMAuthenticationVerifiedServerWidgetTest)
DKIMAuthenticationVerifiedServerWidgetTest::DKIMAuthenticationVerifiedServerWidgetTest(QObject *parent)
: QObject(parent)
{
}
void DKIMAuthenticationVerifiedServerWidgetTest::shouldHaveDefaultValues()
......@@ -23,7 +22,6 @@ void DKIMAuthenticationVerifiedServerWidgetTest::shouldHaveDefaultValues()
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), QMargins(0, 0, 0, 0));
DKIMAuthenticationVerifiedServerSelectorWidget *mSelector = w.findChild<DKIMAuthenticationVerifiedServerSelectorWidget *>(QStringLiteral("mSelector"));
QVERIFY(mSelector);
}
......@@ -36,7 +36,6 @@ void DKIMGeneralWidgetTest::shouldHaveDefaultValues()
QComboBox *mSaveKey = w.findChild<QComboBox *>(QStringLiteral("mSaveKey"));
QVERIFY(mSaveKey);
QCheckBox *mUseOnlyAuthenticationResult = w.findChild<QCheckBox *>(QStringLiteral("mUseOnlyAuthenticationResult"));
QVERIFY(mUseOnlyAuthenticationResult);
QVERIFY(!mUseOnlyAuthenticationResult->text().isEmpty());
......
......@@ -16,7 +16,6 @@ namespace {
static const char myConfigGroupName[] = "DKIMAuthenticationVerifiedServerDialog";
}
DKIMAuthenticationVerifiedServerDialog::DKIMAuthenticationVerifiedServerDialog(QWidget *parent)
: QDialog(parent)
{
......
......@@ -23,7 +23,6 @@ DKIMAuthenticationVerifiedServerWidget::DKIMAuthenticationVerifiedServerWidget(Q
DKIMAuthenticationVerifiedServerWidget::~DKIMAuthenticationVerifiedServerWidget()
{
}
void DKIMAuthenticationVerifiedServerWidget::loadSettings()
......@@ -40,11 +39,10 @@ void DKIMAuthenticationVerifiedServerWidget::saveSettings()
DKIMAuthenticationVerifiedServerSelectorWidget::DKIMAuthenticationVerifiedServerSelectorWidget(QWidget *parent)
: PimCommon::SimpleStringListEditor(parent)
{
setAddDialogLabel(i18n("New Server"));
setRemoveDialogLabel(i18n("Do you want to delete selected server name?"));
setAddDialogLabel(i18n("New Server"));
setRemoveDialogLabel(i18n("Do you want to delete selected server name?"));
}
DKIMAuthenticationVerifiedServerSelectorWidget::~DKIMAuthenticationVerifiedServerSelectorWidget()
{
}
......@@ -10,5 +10,4 @@ QTEST_MAIN(ExpireAccountTrashFolderConfigDialogTest)
ExpireAccountTrashFolderConfigDialogTest::ExpireAccountTrashFolderConfigDialogTest(QObject *parent)
: QObject(parent)
{
}
......@@ -11,7 +11,6 @@ QTEST_MAIN(ExpireAccountTrashFolderConfigWidgetTest)
ExpireAccountTrashFolderConfigWidgetTest::ExpireAccountTrashFolderConfigWidgetTest(QObject *parent)
: QObject(parent)
{
}
void ExpireAccountTrashFolderConfigWidgetTest::shouldHaveDefaultValues()
......
......@@ -57,4 +57,3 @@ void ExpireAccountTrashFolderConfigDialog::writeConfig()
grp.writeEntry("Size", size());
grp.sync();
}
......@@ -18,16 +18,14 @@ ExpireAccountTrashFolderConfigWidget::ExpireAccountTrashFolderConfigWidget(QWidg
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mainLayout->setContentsMargins(0, 0, 0, 0);
mCollectionExpiryWidget = new MailCommon::CollectionExpiryWidget(this);
mCollectionExpiryWidget->setObjectName(QStringLiteral("mCollectionExpiryWidget"));
connect(mCollectionExpiryWidget, &MailCommon::CollectionExpiryWidget::saveAndExpireRequested, this, &ExpireAccountTrashFolderConfigWidget::slotSaveAndExpireRequested);
mainLayout->addWidget(mCollectionExpiryWidget);
mCollectionExpiryWidget = new MailCommon::CollectionExpiryWidget(this);
mCollectionExpiryWidget->setObjectName(QStringLiteral("mCollectionExpiryWidget"));
connect(mCollectionExpiryWidget, &MailCommon::CollectionExpiryWidget::saveAndExpireRequested, this, &ExpireAccountTrashFolderConfigWidget::slotSaveAndExpireRequested);
mainLayout->addWidget(mCollectionExpiryWidget);
}
ExpireAccountTrashFolderConfigWidget::~ExpireAccountTrashFolderConfigWidget()
{
}
void ExpireAccountTrashFolderConfigWidget::save(bool saveSettings, bool expireNow)
......
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