diff --git a/autotest/snorebenchmark.cpp b/autotest/snorebenchmark.cpp index 0fd9efa..b60ba2e 100644 --- a/autotest/snorebenchmark.cpp +++ b/autotest/snorebenchmark.cpp @@ -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" "Website\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) diff --git a/src/libsnore/snore.cpp b/src/libsnore/snore.cpp index 80a4320..db30051 100644 --- a/src/libsnore/snore.cpp +++ b/src/libsnore/snore.cpp @@ -238,7 +238,7 @@ void SnoreCore::displayExapleNotification() QString text = QString("%1
" "%2
").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"))); diff --git a/src/libsnore/utils.h b/src/libsnore/utils.h index e1c20f7..7d6fcda 100644 --- a/src/libsnore/utils.h +++ b/src/libsnore/utils.h @@ -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.