Commit 6098510e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent 945db123
......@@ -137,7 +137,7 @@ KMime::Message::Ptr ReplyStrategyTest::makeReply(const KMime::Message::Ptr &orig
QSignalSpy spy {&factory, &MessageFactoryNG::createReplyDone};
factory.createReplyAsync();
KMime::Message::Ptr result {nullptr};
[&]{
[&] {
QVERIFY(spy.wait());
QCOMPARE(spy.count(), 1);
result = spy.at(0).at(0).value<MessageFactoryNG::MessageReply>().msg;
......
......@@ -216,10 +216,8 @@ void RichTextComposerNg::fillComposerTextPart(MessageComposer::TextPart *textPar
QString RichTextComposerNgPrivate::toCleanHtml() const
{
QString result = richtextComposer->toHtml();
static const QString EMPTYLINEHTML = QStringLiteral(
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \">&nbsp;</p>");
......
......@@ -37,7 +37,6 @@ ConvertSnippetVariableMenu::~ConvertSnippetVariableMenu()
void ConvertSnippetVariableMenu::initializeMenu(bool onlyMenuForCustomizeAttachmentFileName)
{
QMenu *dateTimeMenuVariable = nullptr;
if (!onlyMenuForCustomizeAttachmentFileName) {
mMenu = new QMenu(mParentWidget);
......
......@@ -411,7 +411,6 @@ void StringUtilTest::test_parseMailToWithUtf8Encoded()
QCOMPARE(data.at(i).second, QString::fromUtf8("Mi\u0142osz Vo <raco.cki@foo.com>"));
}
}
}
void StringUtilTest::test_parseMailToWithUtf8QuotedEncoded()
......@@ -425,7 +424,6 @@ void StringUtilTest::test_parseMailToWithUtf8QuotedEncoded()
QCOMPARE(data.at(i).second, QString::fromUtf8("foo Cen <bla.cete@kde.com>, Kile Debut <kile.debut@foo.com"));
}
}
}
void StringUtilTest::test_parseMailToBug366981()
......
......@@ -186,7 +186,6 @@ QVector<QPair<QString, QString> > parseMailtoUrl(const QUrl &url)
str = KCodecs::decodeRFC2047String(str);
const QUrl newUrl = QUrl::fromUserInput(str);
int indexTo = -1;
//Workaround line with # see bug 406208
const int indexOf = str.indexOf(QLatin1Char('?'));
......
......@@ -67,7 +67,7 @@ void SearchLineStatus::keyPressEvent(QKeyEvent *e)
} else {
Q_EMIT forceLostFocus();
}
} else if (e->key() == Qt::Key_Q && (e->modifiers().testFlag(Qt::ShiftModifier) && e->modifiers().testFlag(Qt::AltModifier))) {
} else if (e->key() == Qt::Key_Q && (e->modifiers().testFlag(Qt::ShiftModifier) && e->modifiers().testFlag(Qt::AltModifier))) {
mLockAction->trigger();
} else {
QLineEdit::keyPressEvent(e);
......
......@@ -264,7 +264,6 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
d->mActionMenu->addAction(action);
d->mActionMenu->addSeparator();
d->mMaxTabCreated = count();
for (int i = 1; i < 10 && i <= count(); ++i) {
d->addActivateTabAction(i);
......@@ -274,22 +273,18 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
QList<QKeySequence> prevShortcut;
QString nextIcon, prevIcon;
if (QApplication::isRightToLeft())
{
if (QApplication::isRightToLeft()) {
nextShortcut.append(KStandardShortcut::tabPrev());
prevShortcut.append(KStandardShortcut::tabNext());
nextIcon = QStringLiteral("go-previous-view");
prevIcon = QStringLiteral("go-next-view");
}
else
{
} else {
nextShortcut.append(KStandardShortcut::tabNext());
prevShortcut.append(KStandardShortcut::tabPrev());
nextIcon = QStringLiteral("go-next-view");
prevIcon = QStringLiteral("go-previous-view");
}
d->mActivateNextTabAction = new QAction(i18n("Activate Next Tab"), this);
d->mXmlGuiClient->actionCollection()->addAction(QStringLiteral("activate_next_tab"), d->mActivateNextTabAction);
d->mActivateNextTabAction->setEnabled(false);
......@@ -328,7 +323,6 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
});
d->mActionMenu->addAction(d->mMoveTabRightAction);
d->mActionMenu->addSeparator();
d->mCloseTabAction = new QAction(i18n("Close Tab"), this);
......@@ -339,8 +333,6 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
});
d->mActionMenu->addAction(d->mCloseTabAction);
d->mCloseTabAction->setEnabled(false);
}
}
......
......@@ -69,7 +69,6 @@ void MessageViewerUtilsTest::shouldContainsExternalReferences()
QCOMPARE(MessageViewer::Util::containsExternalReferences(html, extraHead), hasExternalReference);
}
void MessageViewerUtilsTest::shouldExtractHtml()
{
QFETCH(QString, input);
......@@ -93,8 +92,10 @@ void MessageViewerUtilsTest::shouldExtractHtml_data()
QString output = QStringLiteral("foo");
QTest::newRow("test1") << input << output;
input = QStringLiteral("That's interesting. I don't see new commits or anything relevant to it on the author's releases. I don't actually know why the author uses the other library as they do seem to have similar data... Maybe some other functions that are easier to use.<br><br><br>All the best,<br><br>C<br><br><br>-------- Original Message --------<br>On Mar 3, 2020, 09:56, foo wrote:<blockquote class=\"protonmail_quote\"><br><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\r\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\r\np, li { white-space: pre-wrap; }\r\n</style></head><body>\r\n<p>Hey bla,</p>\r\n<p>&nbsp;</p>\r\n<p>how are things going? Done your PhD?</p>\r\n<p>&nbsp;</p>\r\n<p>On a recent installation I had an issue with the Orthanc-Module, during initialization of the database:</p>\r\n<p><span style=\" font-family:'monospace';\"><br /> from .datetime import DateTime </span><span style=\" font-family:'monospace','Noto Sans';\"><br />'Something' as changed in the setup of timezone data (between December and now so to say).</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">To make the story short, this module pytzdata comes from the pypi-package pytzdata and contains basically the same stuff as pytz.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Except that pendulum and pytzdata is from the same author.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Do you have an idea why he not uses pytz, as everybody else?</span></p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>&nbsp;</p>\r\n<p>-- </p>\r\n<p>T: @coogor</p>\r\n<p>Matrix: @docb:matrix.org</p>\r\n<p>PGP Fingerprint: 2E7F 3A19 A4A4 844A 3D09 7656 822D EB64 A3BA 290D</p>\r\n<p>&nbsp;</p>\r\n<p>http://gnuhealth.ghf2020.org</p></body></html></div>");
output = QStringLiteral("That's interesting. I don't see new commits or anything relevant to it on the author's releases. I don't actually know why the author uses the other library as they do seem to have similar data... Maybe some other functions that are easier to use.<br><br><br>All the best,<br><br>C<br><br><br>-------- Original Message --------<br>On Mar 3, 2020, 09:56, foo wrote:<blockquote class=\"protonmail_quote\"><br><p>Hey bla,</p>\r\n<p>&nbsp;</p>\r\n<p>how are things going? Done your PhD?</p>\r\n<p>&nbsp;</p>\r\n<p>On a recent installation I had an issue with the Orthanc-Module, during initialization of the database:</p>\r\n<p><span style=\" font-family:'monospace';\"><br /> from .datetime import DateTime </span><span style=\" font-family:'monospace','Noto Sans';\"><br />'Something' as changed in the setup of timezone data (between December and now so to say).</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">To make the story short, this module pytzdata comes from the pypi-package pytzdata and contains basically the same stuff as pytz.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Except that pendulum and pytzdata is from the same author.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Do you have an idea why he not uses pytz, as everybody else?</span></p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>&nbsp;</p>\r\n<p>-- </p>\r\n<p>T: @coogor</p>\r\n<p>Matrix: @docb:matrix.org</p>\r\n<p>PGP Fingerprint: 2E7F 3A19 A4A4 844A 3D09 7656 822D EB64 A3BA 290D</p>\r\n<p>&nbsp;</p>\r\n<p>http://gnuhealth.ghf2020.org</p>");
input = QStringLiteral(
"That's interesting. I don't see new commits or anything relevant to it on the author's releases. I don't actually know why the author uses the other library as they do seem to have similar data... Maybe some other functions that are easier to use.<br><br><br>All the best,<br><br>C<br><br><br>-------- Original Message --------<br>On Mar 3, 2020, 09:56, foo wrote:<blockquote class=\"protonmail_quote\"><br><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\r\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\r\np, li { white-space: pre-wrap; }\r\n</style></head><body>\r\n<p>Hey bla,</p>\r\n<p>&nbsp;</p>\r\n<p>how are things going? Done your PhD?</p>\r\n<p>&nbsp;</p>\r\n<p>On a recent installation I had an issue with the Orthanc-Module, during initialization of the database:</p>\r\n<p><span style=\" font-family:'monospace';\"><br /> from .datetime import DateTime </span><span style=\" font-family:'monospace','Noto Sans';\"><br />'Something' as changed in the setup of timezone data (between December and now so to say).</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">To make the story short, this module pytzdata comes from the pypi-package pytzdata and contains basically the same stuff as pytz.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Except that pendulum and pytzdata is from the same author.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Do you have an idea why he not uses pytz, as everybody else?</span></p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>&nbsp;</p>\r\n<p>-- </p>\r\n<p>T: @coogor</p>\r\n<p>Matrix: @docb:matrix.org</p>\r\n<p>PGP Fingerprint: 2E7F 3A19 A4A4 844A 3D09 7656 822D EB64 A3BA 290D</p>\r\n<p>&nbsp;</p>\r\n<p>http://gnuhealth.ghf2020.org</p></body></html></div>");
output = QStringLiteral(
"That's interesting. I don't see new commits or anything relevant to it on the author's releases. I don't actually know why the author uses the other library as they do seem to have similar data... Maybe some other functions that are easier to use.<br><br><br>All the best,<br><br>C<br><br><br>-------- Original Message --------<br>On Mar 3, 2020, 09:56, foo wrote:<blockquote class=\"protonmail_quote\"><br><p>Hey bla,</p>\r\n<p>&nbsp;</p>\r\n<p>how are things going? Done your PhD?</p>\r\n<p>&nbsp;</p>\r\n<p>On a recent installation I had an issue with the Orthanc-Module, during initialization of the database:</p>\r\n<p><span style=\" font-family:'monospace';\"><br /> from .datetime import DateTime </span><span style=\" font-family:'monospace','Noto Sans';\"><br />'Something' as changed in the setup of timezone data (between December and now so to say).</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">To make the story short, this module pytzdata comes from the pypi-package pytzdata and contains basically the same stuff as pytz.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Except that pendulum and pytzdata is from the same author.</span></p>\r\n<p><span style=\" font-family:'monospace','Noto Sans';\">Do you have an idea why he not uses pytz, as everybody else?</span></p>\r\n<p>&nbsp;</p>\r\n<p>Thanks</p>\r\n<p>&nbsp;</p>\r\n<p>-- </p>\r\n<p>T: @coogor</p>\r\n<p>Matrix: @docb:matrix.org</p>\r\n<p>PGP Fingerprint: 2E7F 3A19 A4A4 844A 3D09 7656 822D EB64 A3BA 290D</p>\r\n<p>&nbsp;</p>\r\n<p>http://gnuhealth.ghf2020.org</p>");
QTest::newRow("bug418482") << input << output;
}
......
......@@ -741,7 +741,6 @@ QString Util::processHtml(const QString &htmlSource, QString &extraHead)
return s;
}
QByteArray Util::htmlCodec(const QByteArray &data, const QByteArray &codec)
{
QByteArray currentCodec = codec;
......@@ -749,8 +748,8 @@ QByteArray Util::htmlCodec(const QByteArray &data, const QByteArray &codec)
currentCodec = QByteArray("UTF-8");
}
if (data.contains("charset=\"utf-8\"")
|| data.contains("charset=\"UTF-8\"")
|| data.contains("charset=UTF-8")) {
|| data.contains("charset=\"UTF-8\"")
|| data.contains("charset=UTF-8")) {
currentCodec = QByteArray("UTF-8");
}
......
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