typo
This commit is contained in:
parent
c004504a9d
commit
4a57343a40
|
@ -38,40 +38,40 @@ void benchmarkUtilsToPlain();
|
|||
void SnoreBenchmark::benchmarkUtilsToHtml(){
|
||||
|
||||
|
||||
QCOMPARE(Utils::normaliseMarkup(htmlTestString, Utils::NO_MARKUP), QString("Italic A\n"
|
||||
QCOMPARE(Utils::normalizeMarkup(htmlTestString, Utils::NO_MARKUP), QString("Italic A\n"
|
||||
"Italic B\n"
|
||||
"Bold\n"
|
||||
"Underline\n"
|
||||
"Font\n"
|
||||
"<&>\n"
|
||||
"Website\n"));
|
||||
QCOMPARE(Utils::normaliseMarkup(htmlTestString, Utils::HREF), QString("Italic A\n"
|
||||
QCOMPARE(Utils::normalizeMarkup(htmlTestString, Utils::HREF), QString("Italic A\n"
|
||||
"Italic B\n"
|
||||
"Bold\n"
|
||||
"Underline\n"
|
||||
"Font\n"
|
||||
"<&>\n"
|
||||
"<a href=\"https://github.com/Snorenotify/Snorenotify\">Website</a>\n"));
|
||||
QCOMPARE(Utils::normaliseMarkup(htmlTestString, Utils::HREF | Utils::BOLD | Utils::BREAK |
|
||||
QCOMPARE(Utils::normalizeMarkup(htmlTestString, Utils::HREF | Utils::BOLD | Utils::BREAK |
|
||||
Utils::UNDERLINE | Utils::FONT | Utils::ITALIC), htmlTestString);
|
||||
QBENCHMARK{
|
||||
Utils::normaliseMarkup(htmlTestString, Utils::HREF);
|
||||
Utils::normalizeMarkup(htmlTestString, Utils::HREF);
|
||||
}
|
||||
}
|
||||
|
||||
void SnoreBenchmark::benchmarkUtilsToHtmlAllMarkup()
|
||||
{
|
||||
QCOMPARE(Utils::normaliseMarkup(htmlTestString, Utils::ALL_MARKUP), htmlTestString);
|
||||
QCOMPARE(Utils::normalizeMarkup(htmlTestString, Utils::ALL_MARKUP), htmlTestString);
|
||||
|
||||
QBENCHMARK{
|
||||
Utils::normaliseMarkup(htmlTestString, Utils::ALL_MARKUP);
|
||||
Utils::normalizeMarkup(htmlTestString, Utils::ALL_MARKUP);
|
||||
}
|
||||
}
|
||||
|
||||
void SnoreBenchmark::benchmarkUtilsToPlain()
|
||||
{
|
||||
QBENCHMARK{
|
||||
Utils::normaliseMarkup(htmlTestString, Utils::NO_MARKUP);
|
||||
Utils::normalizeMarkup(htmlTestString, Utils::NO_MARKUP);
|
||||
}
|
||||
}
|
||||
QTEST_MAIN(SnoreBenchmark)
|
||||
|
|
|
@ -238,7 +238,7 @@ void SnoreCore::displayExapleNotification()
|
|||
QString text = QString("<i>%1</i><br>"
|
||||
"<a href=\"https://github.com/Snorenotify/Snorenotify\">%2</a><br>").arg(tr("This is Snore"), tr("Project Website"));
|
||||
if(!app.constHints().value("use-markup").toBool()) {
|
||||
text = Utils::normaliseMarkup(text, Utils::NO_MARKUP);
|
||||
text = Utils::normalizeMarkup(text, Utils::NO_MARKUP);
|
||||
}
|
||||
Notification noti(app, app.defaultAlert(), tr("Hello World"), text, app.icon());
|
||||
noti.addAction(Action(1, tr("Test Action")));
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
* @param string A string to encode if needed.
|
||||
* @return if the string was rhichtext html encode string is returnd otherwise the original string.
|
||||
*/
|
||||
static QString normaliseMarkup(QString string, MARKUP_FLAGS tags);
|
||||
static QString normalizeMarkup(QString string, MARKUP_FLAGS tags);
|
||||
|
||||
/**
|
||||
* Computes a md5 hash of the provided data.
|
||||
|
|
Loading…
Reference in New Issue