[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim] /: Port to QStringLiteral
From: Montel Laurent <montel () kde ! org>
Date: 2015-02-23 21:32:32
Message-ID: E1YQ0cC-0000uw-L6 () scm ! kde ! org
[Download RAW message or body]
Git commit f05c8b00c8d574fd52191a4c4ca78de8aa8fa0dd by Montel Laurent.
Committed on 23/02/2015 at 21:32.
Pushed by mlaurent into branch 'master'.
Port to QStringLiteral
M +1 -1 calendarsupport/plugin.h
M +7 -7 calendarsupport/printing/calprintdefaultplugins.cpp
M +29 -29 calendarsupport/printing/calprintpluginbase.cpp
M +41 -41 messageviewer/adblock/adblockutil.cpp
M +1 -1 messageviewer/adblock/tests/adblocksettingsdialog_gui.cpp
M +1 -1 messageviewer/antispam/antispamconfig.cpp
M +42 -42 messageviewer/autotests/eventedittest.cpp
M +3 -3 messageviewer/autotests/mailsourceviewtextbrowserwidgettest.cpp
M +69 -69 messageviewer/autotests/todoedittest.cpp
M +13 -13 messageviewer/findbar/autotests/findbarbasetest.cpp
M +8 -8 messageviewer/findbar/findbarbase.cpp
M +3 -3 messageviewer/grantleefilters/messageheadergrantleefilters.cpp
M +7 -7 messageviewer/widgets/todoedit.cpp
http://commits.kde.org/kdepim/f05c8b00c8d574fd52191a4c4ca78de8aa8fa0dd
diff --git a/calendarsupport/plugin.h b/calendarsupport/plugin.h
index a9db9b6..8d00f61 100644
--- a/calendarsupport/plugin.h
+++ b/calendarsupport/plugin.h
@@ -47,7 +47,7 @@ public:
static QString serviceType()
{
- return QLatin1String("Calendar/Plugin");
+ return QStringLiteral("Calendar/Plugin");
}
Plugin() {}
diff --git a/calendarsupport/printing/calprintdefaultplugins.cpp \
b/calendarsupport/printing/calprintdefaultplugins.cpp index 226c46e..c6f4a1c 100644
--- a/calendarsupport/printing/calprintdefaultplugins.cpp
+++ b/calendarsupport/printing/calprintdefaultplugins.cpp
@@ -233,8 +233,8 @@ int CalPrintIncidence::printCaptionAndText(QPainter &p, const \
QRect &box, void CalPrintIncidence::print(QPainter &p, int width, int height)
{
QFont oldFont(p.font());
- QFont textFont(QLatin1String("sans-serif"), 11, QFont::Normal);
- QFont captionFont(QLatin1String("sans-serif"), 11, QFont::Bold);
+ QFont textFont(QStringLiteral("sans-serif"), 11, QFont::Normal);
+ QFont captionFont(QStringLiteral("sans-serif"), 11, QFont::Bold);
p.setFont(textFont);
int lineHeight = p.fontMetrics().lineSpacing();
QString cap, txt;
@@ -320,7 +320,7 @@ void CalPrintIncidence::print(QPainter &p, int width, int height)
if (!recurs->exDates().isEmpty()) {
exceptString = i18nc("except for listed dates", " except");
for (int i = 0; i < recurs->exDates().size(); ++i) {
- exceptString.append(QLatin1String(" "));
+ exceptString.append(QStringLiteral(" "));
\
exceptString.append(KLocale::global()->formatDate(recurs->exDates()[i], \
KLocale::ShortDate)); }
@@ -872,7 +872,7 @@ void CalPrintDay::print(QPainter &p, int width, int height)
}
int fontSize = 11;
- QFont textFont(QLatin1String("sans-serif"), fontSize, QFont::Normal);
+ QFont textFont(QStringLiteral("sans-serif"), fontSize, QFont::Normal);
p.setFont(textFont);
int lineSpacing = p.fontMetrics().lineSpacing();
@@ -884,7 +884,7 @@ void CalPrintDay::print(QPainter &p, int width, int height)
if (alldayEvents.count() > 0) {
// draw the side bar for all-day events
QFont oldFont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 9, QFont::Normal));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 9, QFont::Normal));
drawVerticalBox(p,
BOX_BORDER_WIDTH,
QRect(0, headerBox.bottom() + padding(), \
TIMELINE_WIDTH, allDayHeight), @@ -1537,7 +1537,7 @@ void \
CalPrintTodos::print(QPainter &p, int width, int height) QString outStr;
QFont oldFont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 9, QFont::Bold));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 9, QFont::Bold));
lineSpacing = p.fontMetrics().lineSpacing();
mCurrentLinePos += lineSpacing;
if (mIncludePriority) {
@@ -1570,7 +1570,7 @@ void CalPrintTodos::print(QPainter &p, int width, int height)
posdue = -1;
}
- p.setFont(QFont(QLatin1String("sans-serif"), 10));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 10));
//fontHeight = p.fontMetrics().height();
KCalCore::Todo::List todoList;
diff --git a/calendarsupport/printing/calprintpluginbase.cpp \
b/calendarsupport/printing/calprintpluginbase.cpp index 245e6c1..6611ade 100644
--- a/calendarsupport/printing/calprintpluginbase.cpp
+++ b/calendarsupport/printing/calprintpluginbase.cpp
@@ -473,7 +473,7 @@ void CalPrintPluginBase::drawSubHeaderBox(QPainter &p, const \
QString &str, const {
drawShadedBox(p, BOX_BORDER_WIDTH, QColor(232, 232, 232), box);
QFont oldfont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 10, QFont::Bold));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 10, QFont::Bold));
p.drawText(box, Qt::AlignCenter | Qt::AlignVCenter, str);
p.setFont(oldfont);
}
@@ -591,7 +591,7 @@ int CalPrintPluginBase::drawHeader(QPainter &p, const QString \
&title, QRect textRect(allbox);
QFont oldFont(p.font());
- QFont newFont(QLatin1String("sans-serif"), (textRect.height() < 60) ? 16 : 18, \
QFont::Bold); + QFont newFont(QStringLiteral("sans-serif"), (textRect.height() < \
60) ? 16 : 18, QFont::Bold); if (expand) {
p.setFont(newFont);
QRect boundingR =
@@ -655,7 +655,7 @@ int CalPrintPluginBase::drawHeader(QPainter &p, const QString \
&title, int CalPrintPluginBase::drawFooter(QPainter &p, const QRect &footbox)
{
QFont oldfont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 6));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 6));
QFontMetrics fm(p.font());
QString dateStr =
KLocale::global()->formatDateTime(QDateTime::currentDateTime(), \
KLocale::LongDate); @@ -679,7 +679,7 @@ void \
CalPrintPluginBase::drawSmallMonth(QPainter &p, const QDate &qd, const QRec // 3 \
Pixel after month name, 2 after day names, 1 after the calendar double cellHeight = \
(box.height() - 5) / rownr; QFont oldFont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), int(cellHeight - 2), \
QFont::Normal)); + p.setFont(QFont(QStringLiteral("sans-serif"), int(cellHeight - \
2), QFont::Normal));
// draw the title
if (mCalSys) {
@@ -785,23 +785,23 @@ void CalPrintPluginBase::drawTimeLine(QPainter &p, const QTime \
&fromTime, p.drawLine(xcenter, (int)newY, box.right(), (int)newY);
numStr.setNum(curTime.hour());
if (cellHeight > 30) {
- p.setFont(QFont(QLatin1String("sans-serif"), 14, QFont::Bold));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 14, QFont::Bold));
} else {
- p.setFont(QFont(QLatin1String("sans-serif"), 12, QFont::Bold));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 12, QFont::Bold));
}
p.drawText(box.left() + 4, (int)currY + 2, box.width() / 2 - 2, \
(int)cellHeight, Qt::AlignTop | Qt::AlignRight, numStr);
- p.setFont(QFont(QLatin1String("helvetica"), 10, QFont::Normal));
+ p.setFont(QFont(QStringLiteral("helvetica"), 10, QFont::Normal));
p.drawText(xcenter + 4, (int)currY + 2, box.width() / 2 + 2, \
(int)(cellHeight / 2) - 3,
- Qt::AlignTop | Qt::AlignLeft, QLatin1String("00"));
+ Qt::AlignTop | Qt::AlignLeft, QStringLiteral("00"));
} else {
p.drawLine(box.left(), (int)newY, box.right(), (int)newY);
QTime time(curTime.hour(), 0);
numStr = KLocale::global()->formatTime(time);
if (box.width() < 60) {
- p.setFont(QFont(QLatin1String("sans-serif"), 7, QFont::Bold)); \
// for weekprint + p.setFont(QFont(QStringLiteral("sans-serif"), \
7, QFont::Bold)); // for weekprint } else {
- p.setFont(QFont(QLatin1String("sans-serif"), 12, QFont::Bold)); \
// for dayprint + p.setFont(QFont(QStringLiteral("sans-serif"), \
12, QFont::Bold)); // for dayprint }
p.drawText(box.left() + 2, (int)currY + 2, box.width() - 4, \
(int)cellHeight / 2 - 3, Qt::AlignTop | Qt::AlignLeft, numStr);
@@ -855,7 +855,7 @@ int CalPrintPluginBase::drawAllDayBox(QPainter &p, const \
KCalCore::Event::List & offset += box.height();
} else {
if (!multiDayStr.isEmpty()) {
- multiDayStr += QLatin1String(", ");
+ multiDayStr += QStringLiteral(", ");
}
multiDayStr += currEvent->summary();
}
@@ -1063,15 +1063,15 @@ void CalPrintPluginBase::drawAgendaItem(PrintCellItem *item, \
QPainter &p, if (eventBox.height() < 24) {
if (eventBox.height() < 12) {
if (eventBox.height() < 8) {
- p.setFont(QFont(QLatin1String("sans-serif"), 4));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 4));
} else {
- p.setFont(QFont(QLatin1String("sans-serif"), 5));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 5));
}
} else {
- p.setFont(QFont(QLatin1String("sans-serif"), 6));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 6));
}
} else {
- p.setFont(QFont(QLatin1String("sans-serif"), 8));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 8));
}
showEventBox(p, EVENT_BORDER_WIDTH, eventBox, event, str);
p.setFont(oldFont);
@@ -1124,10 +1124,10 @@ void CalPrintPluginBase::drawDayBox(QPainter &p, const QDate \
&qd, headerTextBox.setLeft(subHeaderBox.left() + 5);
headerTextBox.setRight(subHeaderBox.right() - 5);
if (!hstring.isEmpty()) {
- p.setFont(QFont(QLatin1String("sans-serif"), 8, QFont::Bold, true));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 8, QFont::Bold, true));
p.drawText(headerTextBox, Qt::AlignLeft | Qt::AlignVCenter, hstring);
}
- p.setFont(QFont(QLatin1String("sans-serif"), 10, QFont::Bold));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 10, QFont::Bold));
p.drawText(headerTextBox, Qt::AlignRight | Qt::AlignVCenter, dayNumStr);
const KCalCore::Event::List eventList =
@@ -1136,7 +1136,7 @@ void CalPrintPluginBase::drawDayBox(QPainter &p, const QDate \
&qd, KCalCore::SortDirectionAscending);
QString timeText;
- p.setFont(QFont(QLatin1String("sans-serif"), 7));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 7));
int textY = mSubHeaderHeight; // gives the relative y-coord of the next printed \
entry unsigned int visibleEventsCounter = 0;
@@ -1287,7 +1287,7 @@ void CalPrintPluginBase::drawIncidence(QPainter &p, const QRect \
&dayBox,
if (singleLineLimit) {
if (includeDescription && !descText.isEmpty()) {
- summaryText += QLatin1String(", ") + descText;
+ summaryText += QStringLiteral(", ") + descText;
}
int totalHeight = fm.lineSpacing() + borderWidth;
int textBoxHeight = (totalHeight > (dayBox.height() - textY)) ?
@@ -1308,13 +1308,13 @@ void CalPrintPluginBase::drawIncidence(QPainter &p, const \
QRect &dayBox, QTextCursor textCursor(&textDoc);
textCursor.insertText(summaryText);
if (includeDescription && !description.isEmpty()) {
- textCursor.insertText(QLatin1String("\n"));
+ textCursor.insertText(QStringLiteral("\n"));
textCursor.insertHtml(description);
}
} else {
textCursor.insertText(summaryText);
if (includeDescription && !descText.isEmpty()) {
- textCursor.insertText(QLatin1String("\n"));
+ textCursor.insertText(QStringLiteral("\n"));
textCursor.insertText(descText);
}
}
@@ -1578,7 +1578,7 @@ void CalPrintPluginBase::drawMonth(QPainter &p, const QDate \
&dt,
QColor holidayColor(240, 240, 240);
QColor workdayColor(255, 255, 255);
- int dayNrWidth = p.fontMetrics().width(QLatin1String("99"));
+ int dayNrWidth = p.fontMetrics().width(QStringLiteral("99"));
// Fill the remaining space (if a month has less days than others) with a \
crossed-out pattern if (daysinmonth < maxdays) {
@@ -1738,7 +1738,7 @@ void CalPrintPluginBase::drawMonth(QPainter &p, const QDate \
&dt, int newxstartcont = xstartcont;
QFont oldfont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 7));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 7));
while (it1.hasNext()) {
PrintCellItem *placeItem = static_cast<PrintCellItem *>(it1.next());
int minsToStart = starttime.secsTo(placeItem->start()) / 60;
@@ -1760,7 +1760,7 @@ void CalPrintPluginBase::drawMonth(QPainter &p, const QDate \
&dt, // space of the day's cell
for (int d = 0; d < daysinmonth; ++d) {
QStringList dayEvents(textEvents[d + 1]);
- QString txt = dayEvents.join(QLatin1String(", "));
+ QString txt = dayEvents.join(QStringLiteral(", "));
QRect dayBox(xstartcont, daysBox.top() + qRound(dayheight * d), 0, 0);
dayBox.setRight(box.right());
dayBox.setBottom(daysBox.top() + qRound(dayheight * (d + 1)));
@@ -2138,7 +2138,7 @@ void CalPrintPluginBase::drawJournal(const \
KCalCore::Journal::Ptr &journal, QPai
int x, int &y, int width, int pageHeight)
{
QFont oldFont(p.font());
- p.setFont(QFont(QLatin1String("sans-serif"), 15));
+ p.setFont(QFont(QStringLiteral("sans-serif"), 15));
QString headerText;
QString dateText(KLocale::global()->formatDate(journal->dtStart().toLocalZone().date(),
KLocale::LongDate));
@@ -2203,9 +2203,9 @@ void CalPrintPluginBase::drawSplitHeaderRight(QPainter &p, \
const QDate &fd, }
if (height < 60) {
- p.setFont(QFont(QLatin1String("Times"), 22));
+ p.setFont(QFont(QStringLiteral("Times"), 22));
} else {
- p.setFont(QFont(QLatin1String("Times"), 28));
+ p.setFont(QFont(QStringLiteral("Times"), 28));
}
int lineSpacing = p.fontMetrics().lineSpacing();
@@ -2219,9 +2219,9 @@ void CalPrintPluginBase::drawSplitHeaderRight(QPainter &p, \
const QDate &fd, p.setPen(oldPen);
if (height < 60) {
- p.setFont(QFont(QLatin1String("Times"), 14, QFont::Bold, true));
+ p.setFont(QFont(QStringLiteral("Times"), 14, QFont::Bold, true));
} else {
- p.setFont(QFont(QLatin1String("Times"), 18, QFont::Bold, true));
+ p.setFont(QFont(QStringLiteral("Times"), 18, QFont::Bold, true));
}
title += QString::number(fd.year());
diff --git a/messageviewer/adblock/adblockutil.cpp \
b/messageviewer/adblock/adblockutil.cpp index aa04632..39fbc93 100644
--- a/messageviewer/adblock/adblockutil.cpp
+++ b/messageviewer/adblock/adblockutil.cpp
@@ -22,50 +22,50 @@
QMap<QString, QString> MessageViewer::AdBlockUtil::listSubscriptions()
{
QMap<QString, QString> lst;
- lst.insert(QString::fromUtf8("EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easylist.txt"));
- lst.insert(QString::fromUtf8("EasyList without element hiding"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt"));
- lst.insert(QString::fromUtf8("Corset"), \
QLatin1String("http://brianyi.com/corset.txt"));
- lst.insert(QString::fromUtf8("EasyList Germany+EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/ares+easylist.txt"));
- lst.insert(QString::fromUtf8("EasyList Germany"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easylistgermany.txt"));
- lst.insert(QString::fromUtf8("Liste FR+EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt"));
- lst.insert(QString::fromUtf8("Liste FR"), \
QLatin1String("http://lian.info.tm/liste_fr.txt"));
- lst.insert(QString::fromUtf8("ROList+EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/rolist+easylist.txt"));
- lst.insert(QString::fromUtf8("ROList"), \
QLatin1String("http://www.picpoc.ro/menetzrolist.txt"));
- lst.insert(QString::fromUtf8("Việt Nam List"), \
QLatin1String("http://adblockplus-vietnam.googlecode.com/svn/trunk/abpvn.txt"));
- lst.insert(QString::fromUtf8("AdblockList.org"), \
QLatin1String("http://adblocklist.org/adblock-pxf-polish.txt"));
- lst.insert(QString::fromUtf8("Bulgarian list"), \
QLatin1String("http://stanev.org/abp/adblock_bg.txt"));
- lst.insert(QString::fromUtf8("EasyPrivacy+EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easyprivacy+easylist.txt"));
- lst.insert(QString::fromUtf8("EasyPrivacy+Cédrics Liste"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easyprivacy+cedrics.txt"));
- lst.insert(QString::fromUtf8("EasyPrivacy"), \
QLatin1String("https://easylist-downloads.adblockplus.org/easyprivacy.txt"));
- lst.insert(QString::fromUtf8("void.gr"), \
QLatin1String("http://www.void.gr/kargig/void-gr-filters.txt"));
- //lst.insert(QString::fromUtf8("Wiltteri"), \
QLatin1String("http://www.wiltteri.net/wiltteri.txt"));
- lst.insert(QString::fromUtf8("ChinaList"), \
QLatin1String("http://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt"));
- lst.insert(QString::fromUtf8("Filter von Dr.Evil"), \
QLatin1String("http://adblock.maltekraus.de/adblock.txt"));
- lst.insert(QString::fromUtf8("RuAdList"), \
QLatin1String("http://ruadlist.googlecode.com/svn/trunk/adblock.txt"));
- //lst.insert(QString::fromUtf8("AdblockRules.org"), \
QLatin1String("http://adblockrules.org/download.php?typeall"));
- lst.insert(QString::fromUtf8("BSI Lista Polska"), \
QLatin1String("http://www.bsi.info.pl/filtrABP.txt"));
- lst.insert(QString::fromUtf8("Czech List"), \
QLatin1String("http://dajbych.net/adblock.txt"));
- lst.insert(QString::fromUtf8("Cédrics Liste"), \
QLatin1String("http://chewey.de/mozilla/data/adblock.txt"));
- lst.insert(QString::fromUtf8("Fanboy's List"), \
QLatin1String("http://www.fanboy.co.nz/adblock/fanboy-adblocklist-current-expanded.txt"));
- lst.insert(QString::fromUtf8("Filter von MonztA"), \
QLatin1String("http://monzta.maltekraus.de/adblock.txt"));
- lst.insert(QString::fromUtf8("hufilter"), \
QLatin1String("http://pete.teamlupus.hu/hufilter.txt"));
- lst.insert(QString::fromUtf8("Iceland List"), \
QLatin1String("http://adblock-iceland.googlecode.com/files/icelandic%20filter.txt"));
- lst.insert(QString::fromUtf8("Japanese General Filter"), \
QLatin1String("http://adblock-plus-japanese-filter.googlecode.com/svn/trunk/abp_jp_general.txt"));
- lst.insert(QString::fromUtf8("Japanese Site-Specific Filter"), \
QLatin1String("http://adblock-plus-japanese-filter.googlecode.com/svn/trunk/abp_jp_site_specific.txt"));
- lst.insert(QString::fromUtf8("NLBlock"), \
QLatin1String("http://www.verzijlbergh.com/adblock/nlblock.txt"));
- lst.insert(QString::fromUtf8("PLgeneral"), \
QLatin1String("http://www.niecko.pl/adblock/adblock.txt"));
- lst.insert(QString::fromUtf8("Schacks Adblock Plus liste"), \
QLatin1String("http://adblock.schack.dk/block.txt"));
- lst.insert(QString::fromUtf8("Xfiles"), \
QLatin1String("http://mozilla.gfsolone.com/filtri.txt"));
- lst.insert(QString::fromUtf8("adblock.free.fr"), \
QLatin1String("http://adblock.free.fr/adblock.txt"));
- lst.insert(QString::fromUtf8("adblock.free.fr basic (bloque les pubs \
uniquement)"), \
QLatin1String("http://adblock.free.fr/adblock_basic.txt"));
- lst.insert(QString::fromUtf8("Ajnasz's list"), \
QLatin1String("http://ajnasz.hu/adblock/recent"));
- lst.insert(QString::fromUtf8("Schuzak's Universal Filter"), \
QLatin1String("http://www.schuzak.jp/other/abp.txt"));
- lst.insert(QString::fromUtf8("Rickroll Blacklist"), \
QLatin1String("http://rickrolldb.com/ricklist.txt"));
- lst.insert(QString::fromUtf8("Corset+EasyList"), \
QLatin1String("https://easylist-downloads.adblockplus.org/corset+easylist.txt")); + \
lst.insert(QString::fromUtf8("EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easylist.txt")); + \
lst.insert(QString::fromUtf8("EasyList without element hiding"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt"));
+ lst.insert(QString::fromUtf8("Corset"), \
QStringLiteral("http://brianyi.com/corset.txt")); + \
lst.insert(QString::fromUtf8("EasyList Germany+EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/ares+easylist.txt")); + \
lst.insert(QString::fromUtf8("EasyList Germany"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easylistgermany.txt")); + \
lst.insert(QString::fromUtf8("Liste FR+EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/liste_fr+easylist.txt")); \
+ lst.insert(QString::fromUtf8("Liste FR"), \
QStringLiteral("http://lian.info.tm/liste_fr.txt")); + \
lst.insert(QString::fromUtf8("ROList+EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/rolist+easylist.txt")); + \
lst.insert(QString::fromUtf8("ROList"), \
QStringLiteral("http://www.picpoc.ro/menetzrolist.txt")); + \
lst.insert(QString::fromUtf8("Việt Nam List"), \
QStringLiteral("http://adblockplus-vietnam.googlecode.com/svn/trunk/abpvn.txt")); + \
lst.insert(QString::fromUtf8("AdblockList.org"), \
QStringLiteral("http://adblocklist.org/adblock-pxf-polish.txt")); + \
lst.insert(QString::fromUtf8("Bulgarian list"), \
QStringLiteral("http://stanev.org/abp/adblock_bg.txt")); + \
lst.insert(QString::fromUtf8("EasyPrivacy+EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easyprivacy+easylist.txt"));
+ lst.insert(QString::fromUtf8("EasyPrivacy+Cédrics Liste"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easyprivacy+cedrics.txt"));
+ lst.insert(QString::fromUtf8("EasyPrivacy"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/easyprivacy.txt")); + \
lst.insert(QString::fromUtf8("void.gr"), \
QStringLiteral("http://www.void.gr/kargig/void-gr-filters.txt")); + \
//lst.insert(QString::fromUtf8("Wiltteri"), \
QStringLiteral("http://www.wiltteri.net/wiltteri.txt")); + \
lst.insert(QString::fromUtf8("ChinaList"), \
QStringLiteral("http://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt")); + \
lst.insert(QString::fromUtf8("Filter von Dr.Evil"), \
QStringLiteral("http://adblock.maltekraus.de/adblock.txt")); + \
lst.insert(QString::fromUtf8("RuAdList"), \
QStringLiteral("http://ruadlist.googlecode.com/svn/trunk/adblock.txt")); + \
//lst.insert(QString::fromUtf8("AdblockRules.org"), \
QStringLiteral("http://adblockrules.org/download.php?typeall")); + \
lst.insert(QString::fromUtf8("BSI Lista Polska"), \
QStringLiteral("http://www.bsi.info.pl/filtrABP.txt")); + \
lst.insert(QString::fromUtf8("Czech List"), \
QStringLiteral("http://dajbych.net/adblock.txt")); + \
lst.insert(QString::fromUtf8("Cédrics Liste"), \
QStringLiteral("http://chewey.de/mozilla/data/adblock.txt")); + \
lst.insert(QString::fromUtf8("Fanboy's List"), \
QStringLiteral("http://www.fanboy.co.nz/adblock/fanboy-adblocklist-current-expanded.txt"));
+ lst.insert(QString::fromUtf8("Filter von MonztA"), \
QStringLiteral("http://monzta.maltekraus.de/adblock.txt")); + \
lst.insert(QString::fromUtf8("hufilter"), \
QStringLiteral("http://pete.teamlupus.hu/hufilter.txt")); + \
lst.insert(QString::fromUtf8("Iceland List"), \
QStringLiteral("http://adblock-iceland.googlecode.com/files/icelandic%20filter.txt"));
+ lst.insert(QString::fromUtf8("Japanese General Filter"), \
QStringLiteral("http://adblock-plus-japanese-filter.googlecode.com/svn/trunk/abp_jp_general.txt"));
+ lst.insert(QString::fromUtf8("Japanese Site-Specific Filter"), \
QStringLiteral("http://adblock-plus-japanese-filter.googlecode.com/svn/trunk/abp_jp_site_specific.txt"));
+ lst.insert(QString::fromUtf8("NLBlock"), \
QStringLiteral("http://www.verzijlbergh.com/adblock/nlblock.txt")); + \
lst.insert(QString::fromUtf8("PLgeneral"), \
QStringLiteral("http://www.niecko.pl/adblock/adblock.txt")); + \
lst.insert(QString::fromUtf8("Schacks Adblock Plus liste"), \
QStringLiteral("http://adblock.schack.dk/block.txt")); + \
lst.insert(QString::fromUtf8("Xfiles"), \
QStringLiteral("http://mozilla.gfsolone.com/filtri.txt")); + \
lst.insert(QString::fromUtf8("adblock.free.fr"), \
QStringLiteral("http://adblock.free.fr/adblock.txt")); + \
lst.insert(QString::fromUtf8("adblock.free.fr basic (bloque les pubs uniquement)"), \
QStringLiteral("http://adblock.free.fr/adblock_basic.txt")); + \
lst.insert(QString::fromUtf8("Ajnasz's list"), \
QStringLiteral("http://ajnasz.hu/adblock/recent")); + \
lst.insert(QString::fromUtf8("Schuzak's Universal Filter"), \
QStringLiteral("http://www.schuzak.jp/other/abp.txt")); + \
lst.insert(QString::fromUtf8("Rickroll Blacklist"), \
QStringLiteral("http://rickrolldb.com/ricklist.txt")); + \
lst.insert(QString::fromUtf8("Corset+EasyList"), \
QStringLiteral("https://easylist-downloads.adblockplus.org/corset+easylist.txt")); \
return lst; }
QString MessageViewer::AdBlockUtil::localFilterPath()
{
- return KStandardDirs::locateLocal("data" , \
QLatin1String("kmail2/adblockrules_local")); + return \
KStandardDirs::locateLocal("data" , QStringLiteral("kmail2/adblockrules_local")); }
diff --git a/messageviewer/adblock/tests/adblocksettingsdialog_gui.cpp \
b/messageviewer/adblock/tests/adblocksettingsdialog_gui.cpp index bddb973..9e74d3f \
100644
--- a/messageviewer/adblock/tests/adblocksettingsdialog_gui.cpp
+++ b/messageviewer/adblock/tests/adblocksettingsdialog_gui.cpp
@@ -26,7 +26,7 @@
int main(int argc, char **argv)
{
- KAboutData aboutData(QLatin1String("adblocksettings_gui"), \
i18n("adblocksettingstest_Gui"), QLatin1String("1.0")); + KAboutData \
aboutData(QStringLiteral("adblocksettings_gui"), i18n("adblocksettingstest_Gui"), \
QStringLiteral("1.0")); aboutData.setShortDescription(i18n("Test for \
adblocksettings")); QApplication app(argc, argv);
QCommandLineParser parser;
diff --git a/messageviewer/antispam/antispamconfig.cpp \
b/messageviewer/antispam/antispamconfig.cpp index 2866507..7cadb44 100644
--- a/messageviewer/antispam/antispamconfig.cpp
+++ b/messageviewer/antispam/antispamconfig.cpp
@@ -77,7 +77,7 @@ AntiSpamConfig::~AntiSpamConfig()
void AntiSpamConfig::readConfig()
{
mAgents.clear();
- KConfig config(QLatin1String("kmail.antispamrc"));
+ KConfig config(QStringLiteral("kmail.antispamrc"));
config.setReadDefaults(true);
KConfigGroup general(&config, "General");
unsigned int totalTools = general.readEntry("tools", 0);
diff --git a/messageviewer/autotests/eventedittest.cpp \
b/messageviewer/autotests/eventedittest.cpp index 45b1e6e..c874f99 100644
--- a/messageviewer/autotests/eventedittest.cpp
+++ b/messageviewer/autotests/eventedittest.cpp
@@ -73,25 +73,25 @@ void EventEditTest::shouldHaveDefaultValuesOnCreation()
//We can't test it. Collection value is stored in settings here, and not in \
jenkins so disable it //QVERIFY(edit.collection().isValid());
QVERIFY(!edit.message());
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QVERIFY(noteedit);
QCOMPARE(noteedit->text(), QString());
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); QVERIFY(openEditor);
QVERIFY(save);
QCOMPARE(openEditor->isEnabled(), false);
QCOMPARE(save->isEnabled(), false);
QDateTime currentDateTime = QDateTime::currentDateTime();
- MessageViewer::EventDateTimeWidget *startDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("startdatetimeedit")); + MessageViewer::EventDateTimeWidget \
*startDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("startdatetimeedit")); QVERIFY(startDateTime);
QCOMPARE(startDateTime->dateTime().date(), currentDateTime.date());
QCOMPARE(startDateTime->dateTime().time().hour(), \
currentDateTime.time().hour());
QCOMPARE(startDateTime->dateTime().time().minute(), \
currentDateTime.time().minute());
- MessageViewer::EventDateTimeWidget *endDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("enddatetimeedit")); + MessageViewer::EventDateTimeWidget \
*endDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("enddatetimeedit")); QVERIFY(endDateTime);
QCOMPARE(endDateTime->dateTime().date(), currentDateTime.date());
QCOMPARE(endDateTime->dateTime().time().hour(), currentDateTime.time().hour() + \
1); @@ -140,10 +140,10 @@ void EventEditTest::shouldEmitEventWhenPressEnter()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
noteedit->setFocus();
QSignalSpy spy(&edit, \
SIGNAL(createEvent(KCalCore::Event::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); @@ -158,10 +158,10 @@ void \
EventEditTest::shouldHideWidgetWhenPressEnter() QVERIFY(edit.isVisible());
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(edit.isVisible(), false);
}
@@ -171,7 +171,7 @@ void EventEditTest::shouldHideWidgetWhenPressEscape()
MessageViewer::EventEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
noteedit->setFocus();
QVERIFY(noteedit->hasFocus());
QTest::keyPress(&edit, Qt::Key_Escape);
@@ -185,9 +185,9 @@ void EventEditTest::shouldHideWidgetWhenSaveClicked()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test Note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test Note"), "us-ascii");
edit.setMessage(msg);
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QPushButton *save = edit.findChild<QPushButton \
*>(QStringLiteral("save-button")); QTest::mouseClick(save, Qt::LeftButton);
QCOMPARE(edit.isVisible(), false);
}
@@ -197,10 +197,10 @@ void EventEditTest::shouldSaveCollectionSettings()
MessageViewer::EventEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(3);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
- QPushButton *close = edit.findChild<QPushButton \
*>(QLatin1String("close-button")); + QPushButton *close = \
edit.findChild<QPushButton *>(QStringLiteral("close-button")); \
QTest::mouseClick(close, Qt::LeftButton);
QCOMPARE(MessageViewer::GlobalSettingsBase::self()->lastEventSelectedFolder(), \
id); }
@@ -210,7 +210,7 @@ void EventEditTest::shouldSaveCollectionSettingsWhenCloseWidget()
MessageViewer::EventEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(4);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
edit.writeConfig();
@@ -220,7 +220,7 @@ void EventEditTest::shouldSaveCollectionSettingsWhenCloseWidget()
void EventEditTest::shouldSaveCollectionSettingsWhenDeleteWidget()
{
MessageViewer::EventEdit *edit = new MessageViewer::EventEdit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit->findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit->findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(5);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
delete edit;
@@ -232,16 +232,16 @@ void EventEditTest::shouldNotEmitCreateEventWhenDateIsInvalid()
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- MessageViewer::EventDateTimeWidget *startDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("startdatetimeedit")); + MessageViewer::EventDateTimeWidget \
*startDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("startdatetimeedit")); startDateTime->setDateTime(QDateTime());
- MessageViewer::EventDateTimeWidget *endDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("enddatetimeedit")); + MessageViewer::EventDateTimeWidget \
*endDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("enddatetimeedit")); endDateTime->setDateTime(QDateTime());
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createEvent(KCalCore::Event::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 0);
@@ -251,10 +251,10 @@ void EventEditTest::shouldEventHasCorrectSubject()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createEvent(KCalCore::Event::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 1);
@@ -267,10 +267,10 @@ void EventEditTest::shouldSelectLineWhenPutMessage()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QVERIFY(noteedit->hasSelectedText());
const QString selectedText = noteedit->selectedText();
QCOMPARE(selectedText, QStringLiteral("Reply to \"%1\"").arg(subject));
@@ -280,19 +280,19 @@ void EventEditTest::shouldHaveCorrectStartEndDateTime()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
QDateTime currentDateTime = QDateTime::currentDateTime();
- MessageViewer::EventDateTimeWidget *startDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("startdatetimeedit")); + MessageViewer::EventDateTimeWidget \
*startDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("startdatetimeedit")); \
startDateTime->setDateTime(currentDateTime);
QDateTime endDt = currentDateTime.addDays(1);
- MessageViewer::EventDateTimeWidget *endDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("enddatetimeedit")); + MessageViewer::EventDateTimeWidget \
*endDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("enddatetimeedit")); endDateTime->setDateTime(endDt);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createEvent(KCalCore::Event::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 1);
@@ -312,7 +312,7 @@ void EventEditTest::shouldSetFocusWhenWeCallTodoEdit()
MessageViewer::EventEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
edit.setFocus();
edit.showEventEdit();
QVERIFY(noteedit->hasFocus());
@@ -321,8 +321,8 @@ void EventEditTest::shouldSetFocusWhenWeCallTodoEdit()
void EventEditTest::shouldEnsureEndDateIsNotBeforeStartDate()
{
MessageViewer::EventEdit edit;
- MessageViewer::EventDateTimeWidget *startDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("startdatetimeedit"));
- MessageViewer::EventDateTimeWidget *endDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("enddatetimeedit")); + MessageViewer::EventDateTimeWidget \
*startDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("startdatetimeedit")); + MessageViewer::EventDateTimeWidget \
*endDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("enddatetimeedit"));
QDateTime startDt = startDateTime->dateTime();
QVERIFY(startDt < endDateTime->dateTime());
@@ -343,12 +343,12 @@ void EventEditTest::shouldEnabledSaveOpenEditorButton()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); \
QCOMPARE(openEditor->isEnabled(), true); QCOMPARE(save->isEnabled(), true);
noteedit->clear();
@@ -361,16 +361,16 @@ void EventEditTest::shouldUpdateStartEndDateWhenReopenIt()
{
MessageViewer::EventEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
QDateTime currentDateTime = QDateTime::currentDateTime();
- MessageViewer::EventDateTimeWidget *startDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("startdatetimeedit")); + MessageViewer::EventDateTimeWidget \
*startDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("startdatetimeedit")); QCOMPARE(startDateTime->dateTime().date(), \
currentDateTime.date());
QCOMPARE(startDateTime->dateTime().time().hour(), \
currentDateTime.time().hour());
QCOMPARE(startDateTime->dateTime().time().minute(), \
currentDateTime.time().minute());
- MessageViewer::EventDateTimeWidget *endDateTime = \
edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QLatin1String("enddatetimeedit")); + MessageViewer::EventDateTimeWidget \
*endDateTime = edit.findChild<MessageViewer::EventDateTimeWidget \
*>(QStringLiteral("enddatetimeedit")); QCOMPARE(endDateTime->dateTime().date(), \
currentDateTime.date());
QCOMPARE(endDateTime->dateTime().time().hour(), currentDateTime.time().hour() + \
1);
QCOMPARE(endDateTime->dateTime().time().minute(), \
currentDateTime.time().minute()); @@ -404,15 +404,15 @@ void \
EventEditTest::shouldUpdateStartEndDateWhenReopenIt() void \
EventEditTest::shouldDisabledSaveOpenEditorButtonWhenCollectionComboBoxIsEmpty() {
MessageViewer::EventEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
//Create an empty combobox akonadicombobox->setModel(new QStandardItemModel());
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); \
QCOMPARE(openEditor->isEnabled(), false); QCOMPARE(save->isEnabled(), false);
}
diff --git a/messageviewer/autotests/mailsourceviewtextbrowserwidgettest.cpp \
b/messageviewer/autotests/mailsourceviewtextbrowserwidgettest.cpp index \
cf560cd..333fb94 100644
--- a/messageviewer/autotests/mailsourceviewtextbrowserwidgettest.cpp
+++ b/messageviewer/autotests/mailsourceviewtextbrowserwidgettest.cpp
@@ -36,14 +36,14 @@ void \
MailSourceViewTextBrowserWidgetTest::shouldHaveDefaultValue() {
MessageViewer::MailSourceViewTextBrowserWidget widget;
- MessageViewer::MailSourceViewTextBrowser *textbrowser = \
widget.findChild<MessageViewer::MailSourceViewTextBrowser \
*>(QLatin1String("textbrowser")); + MessageViewer::MailSourceViewTextBrowser \
*textbrowser = widget.findChild<MessageViewer::MailSourceViewTextBrowser \
*>(QStringLiteral("textbrowser")); QVERIFY(textbrowser);
QVERIFY(!textbrowser->isHidden());
- MessageViewer::FindBarSourceView *findbar = \
widget.findChild<MessageViewer::FindBarSourceView *>(QLatin1String("findbar")); + \
MessageViewer::FindBarSourceView *findbar = \
widget.findChild<MessageViewer::FindBarSourceView *>(QStringLiteral("findbar")); \
QVERIFY(findbar); QVERIFY(findbar->isHidden());
- PimCommon::TextToSpeechWidget *texttospeechwidget = \
widget.findChild<PimCommon::TextToSpeechWidget *>(QLatin1String("texttospeech")); + \
PimCommon::TextToSpeechWidget *texttospeechwidget = \
widget.findChild<PimCommon::TextToSpeechWidget *>(QStringLiteral("texttospeech")); \
QVERIFY(texttospeechwidget); QVERIFY(texttospeechwidget->isHidden());
diff --git a/messageviewer/autotests/todoedittest.cpp \
b/messageviewer/autotests/todoedittest.cpp index daad7b4..bd9ee7b 100644
--- a/messageviewer/autotests/todoedittest.cpp
+++ b/messageviewer/autotests/todoedittest.cpp
@@ -70,9 +70,9 @@ void TodoEditTest::shouldHaveDefaultValuesOnCreation()
//We can't test if because it loads from settings and in Jenkins it doesn't \
exist but here it exists //QVERIFY(edit.collection().isValid());
QVERIFY(!edit.message());
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); QVERIFY(openEditor);
QVERIFY(save);
QCOMPARE(openEditor->isEnabled(), false);
@@ -134,11 +134,11 @@ void TodoEditTest::shouldHaveASubject()
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QVERIFY(noteedit);
QCOMPARE(noteedit->text(), QString());
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
@@ -149,10 +149,10 @@ void TodoEditTest::shouldEmptySubjectWhenMessageIsNull()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
edit.setMessage(KMime::Message::Ptr());
QCOMPARE(noteedit->text(), QString());
}
@@ -161,10 +161,10 @@ void TodoEditTest::shouldEmptySubjectWhenMessageHasNotSubject()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
KMime::Message::Ptr msgSubjectEmpty(new KMime::Message);
edit.setMessage(msgSubjectEmpty);
QCOMPARE(noteedit->text(), QString());
@@ -174,10 +174,10 @@ void TodoEditTest::shouldSelectLineWhenPutMessage()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QVERIFY(noteedit->hasSelectedText());
const QString selectedText = noteedit->selectedText();
QCOMPARE(selectedText, QStringLiteral("Reply to \"%1\"").arg(subject));
@@ -186,7 +186,7 @@ void TodoEditTest::shouldSelectLineWhenPutMessage()
void TodoEditTest::shouldEmitCollectionChangedWhenChangeComboboxItem()
{
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
QVERIFY(akonadicombobox); QVERIFY(akonadicombobox->currentCollection().isValid());
}
@@ -196,7 +196,7 @@ void TodoEditTest::shouldEmitNotEmitTodoWhenTextIsEmpty()
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 0);
@@ -207,13 +207,13 @@ void \
TodoEditTest::shouldEmitNotEmitTodoWhenTextTrimmedIsEmpty() MessageViewer::TodoEdit \
edit; KMime::Message::Ptr msg(new KMime::Message);
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection)));
- noteedit->setText(QLatin1String(" "));
+ noteedit->setText(QStringLiteral(" "));
QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(spy.count(), 0);
- noteedit->setText(QLatin1String(" F"));
+ noteedit->setText(QStringLiteral(" F"));
QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(spy.count(), 1);
}
@@ -222,10 +222,10 @@ void TodoEditTest::shouldEmitTodoWhenPressEnter()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 1);
@@ -235,10 +235,10 @@ void TodoEditTest::shouldTodoHasCorrectSubject()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 1);
@@ -254,11 +254,11 @@ void TodoEditTest::shouldClearAllWhenCloseWidget()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
edit.slotCloseWidget();
QCOMPARE(noteedit->text(), QString());
QVERIFY(!edit.message());
@@ -267,7 +267,7 @@ void TodoEditTest::shouldClearAllWhenCloseWidget()
void TodoEditTest::shouldEmitCollectionChangedWhenCurrentCollectionWasChanged()
{
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(0); QCOMPARE(akonadicombobox->currentIndex(), 0);
QSignalSpy spy(&edit, SIGNAL(collectionChanged(Akonadi::Collection)));
@@ -279,14 +279,14 @@ void \
TodoEditTest::shouldEmitCollectionChangedWhenCurrentCollectionWasChanged() void \
TodoEditTest::shouldEmitCorrectCollection() {
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
akonadicombobox->setCurrentIndex(3);
Akonadi::Collection col = akonadicombobox->currentCollection();
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); QCOMPARE(spy.count(), 1);
@@ -299,7 +299,7 @@ void TodoEditTest::shouldHideWidgetWhenClickOnCloseButton()
edit.show();
QTest::qWaitForWindowExposed(&edit);
QVERIFY(edit.isVisible());
- QPushButton *close = edit.findChild<QPushButton \
*>(QLatin1String("close-button")); + QPushButton *close = \
edit.findChild<QPushButton *>(QStringLiteral("close-button")); \
QTest::mouseClick(close, Qt::LeftButton); QCOMPARE(edit.isVisible(), false);
}
@@ -309,7 +309,7 @@ void TodoEditTest::shouldHideWidgetWhenPressEscape()
MessageViewer::TodoEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
noteedit->setFocus();
QVERIFY(noteedit->hasFocus());
QTest::keyPress(&edit, Qt::Key_Escape);
@@ -323,9 +323,9 @@ void TodoEditTest::shouldHideWidgetWhenSaveClicked()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test Note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test Note"), "us-ascii");
edit.setMessage(msg);
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QPushButton *save = edit.findChild<QPushButton \
*>(QStringLiteral("save-button")); QTest::mouseClick(save, Qt::LeftButton);
QCOMPARE(edit.isVisible(), true);
}
@@ -333,10 +333,10 @@ void TodoEditTest::shouldHideWidgetWhenSaveClicked()
void TodoEditTest::shouldSaveCollectionSettings()
{
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(3);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
- QPushButton *close = edit.findChild<QPushButton \
*>(QLatin1String("close-button")); + QPushButton *close = \
edit.findChild<QPushButton *>(QStringLiteral("close-button")); \
QTest::mouseClick(close, Qt::LeftButton);
QCOMPARE(MessageViewer::GlobalSettingsBase::self()->lastSelectedFolder(), id);
}
@@ -344,7 +344,7 @@ void TodoEditTest::shouldSaveCollectionSettings()
void TodoEditTest::shouldSaveCollectionSettingsWhenCloseWidget()
{
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(4);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
edit.writeConfig();
@@ -354,7 +354,7 @@ void TodoEditTest::shouldSaveCollectionSettingsWhenCloseWidget()
void TodoEditTest::shouldSaveCollectionSettingsWhenDeleteWidget()
{
MessageViewer::TodoEdit *edit = new MessageViewer::TodoEdit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit->findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit->findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
akonadicombobox->setCurrentIndex(4);
const Akonadi::Collection::Id id = akonadicombobox->currentCollection().id();
delete edit;
@@ -367,10 +367,10 @@ void TodoEditTest::shouldSetFocusWhenWeCallTodoEdit()
edit.show();
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QCOMPARE(noteedit->hasFocus(), true);
edit.setFocus();
QCOMPARE(noteedit->hasFocus(), false);
@@ -381,8 +381,8 @@ void TodoEditTest::shouldSetFocusWhenWeCallTodoEdit()
void TodoEditTest::shouldNotEmitTodoWhenMessageIsNull()
{
MessageViewer::TodoEdit edit;
- QString subject = QLatin1String("Test Note");
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QString subject = QStringLiteral("Test Note");
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
noteedit->setText(subject);
QSignalSpy spy(&edit, \
SIGNAL(createTodo(KCalCore::Todo::Ptr,Akonadi::Collection))); \
QTest::keyClick(noteedit, Qt::Key_Enter); @@ -393,10 +393,10 @@ void \
TodoEditTest::shouldClearLineAfterEmitNewNote() {
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(noteedit->text(), QString());
}
@@ -407,10 +407,10 @@ void TodoEditTest::shouldHaveLineEditFocus()
edit.show();
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- QString subject = QLatin1String("Test Note");
+ QString subject = QStringLiteral("Test Note");
msg->subject(true)->fromUnicodeString(subject, "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
QCOMPARE(noteedit->hasFocus(), true);
}
@@ -421,11 +421,11 @@ void TodoEditTest::shouldShowMessageWidget()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- noteedit->setText(QLatin1String("Test Note"));
- KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QLatin1String("msgwidget")); + QLineEdit *noteedit = edit.findChild<QLineEdit \
*>(QStringLiteral("noteedit")); + noteedit->setText(QStringLiteral("Test Note"));
+ KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QStringLiteral("msgwidget")); QCOMPARE(msgwidget->isVisible(), false);
QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(msgwidget->isVisible(), true);
@@ -436,16 +436,16 @@ void TodoEditTest::shouldHideMessageWidget()
MessageViewer::TodoEdit edit;
edit.show();
QTest::qWaitForWindowExposed(&edit);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- noteedit->setText(QLatin1String("Test note"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
+ noteedit->setText(QStringLiteral("Test note"));
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QLatin1String("msgwidget")); + KMessageWidget *msgwidget = \
edit.findChild<KMessageWidget *>(QStringLiteral("msgwidget")); msgwidget->show();
QCOMPARE(msgwidget->isVisible(), true);
- noteedit->setText(QLatin1String("Another note"));
+ noteedit->setText(QStringLiteral("Another note"));
QCOMPARE(msgwidget->isVisible(), false);
}
@@ -456,16 +456,16 @@ void TodoEditTest::shouldHideMessageWidgetWhenAddNewMessage()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- noteedit->setText(QLatin1String("Test Note"));
- KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QLatin1String("msgwidget")); + QLineEdit *noteedit = edit.findChild<QLineEdit \
*>(QStringLiteral("noteedit")); + noteedit->setText(QStringLiteral("Test Note"));
+ KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QStringLiteral("msgwidget")); QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(msgwidget->isVisible(), true);
KMime::Message::Ptr msg2(new KMime::Message);
- msg2->subject(true)->fromUnicodeString(QLatin1String("Test note 2"), \
"us-ascii"); + msg2->subject(true)->fromUnicodeString(QStringLiteral("Test note \
2"), "us-ascii"); edit.setMessage(msg2);
QCOMPARE(msgwidget->isVisible(), false);
}
@@ -477,11 +477,11 @@ void TodoEditTest::shouldHideMessageWidgetWhenCloseWidget()
QTest::qWaitForWindowExposed(&edit);
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- noteedit->setText(QLatin1String("Test Note"));
- KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QLatin1String("msgwidget")); + QLineEdit *noteedit = edit.findChild<QLineEdit \
*>(QStringLiteral("noteedit")); + noteedit->setText(QStringLiteral("Test Note"));
+ KMessageWidget *msgwidget = edit.findChild<KMessageWidget \
*>(QStringLiteral("msgwidget")); QTest::keyClick(noteedit, Qt::Key_Enter);
QCOMPARE(msgwidget->isVisible(), true);
edit.slotCloseWidget();
@@ -493,19 +493,19 @@ void TodoEditTest::shouldEnabledSaveOpenEditorButton()
{
MessageViewer::TodoEdit edit;
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QLineEdit *noteedit = edit.findChild<QLineEdit *>(QLatin1String("noteedit"));
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QLineEdit *noteedit = edit.findChild<QLineEdit *>(QStringLiteral("noteedit"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); \
QCOMPARE(openEditor->isEnabled(), true); QCOMPARE(save->isEnabled(), true);
noteedit->clear();
QCOMPARE(openEditor->isEnabled(), false);
QCOMPARE(save->isEnabled(), false);
- noteedit->setText(QLatin1String("test 2"));
+ noteedit->setText(QStringLiteral("test 2"));
QCOMPARE(openEditor->isEnabled(), true);
QCOMPARE(save->isEnabled(), true);
}
@@ -513,16 +513,16 @@ void TodoEditTest::shouldEnabledSaveOpenEditorButton()
void TodoEditTest::shouldDisabledSaveOpenEditorButtonWhenCollectionComboBoxIsEmpty()
{
MessageViewer::TodoEdit edit;
- Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QLatin1String("akonadicombobox")); + \
Akonadi::CollectionComboBox *akonadicombobox = \
edit.findChild<Akonadi::CollectionComboBox *>(QStringLiteral("akonadicombobox")); \
//Create an empty combobox akonadicombobox->setModel(new QStandardItemModel());
KMime::Message::Ptr msg(new KMime::Message);
- msg->subject(true)->fromUnicodeString(QLatin1String("Test note"), "us-ascii");
+ msg->subject(true)->fromUnicodeString(QStringLiteral("Test note"), "us-ascii");
edit.setMessage(msg);
- QPushButton *openEditor = edit.findChild<QPushButton \
*>(QLatin1String("open-editor-button"));
- QPushButton *save = edit.findChild<QPushButton *>(QLatin1String("save-button"));
+ QPushButton *openEditor = edit.findChild<QPushButton \
*>(QStringLiteral("open-editor-button")); + QPushButton *save = \
edit.findChild<QPushButton *>(QStringLiteral("save-button")); \
QCOMPARE(openEditor->isEnabled(), false); QCOMPARE(save->isEnabled(), false);
}
diff --git a/messageviewer/findbar/autotests/findbarbasetest.cpp \
b/messageviewer/findbar/autotests/findbarbasetest.cpp index 6454e6c..eb83316 100644
--- a/messageviewer/findbar/autotests/findbarbasetest.cpp
+++ b/messageviewer/findbar/autotests/findbarbasetest.cpp
@@ -39,22 +39,22 @@ FindBarBaseTest::~FindBarBaseTest()
void FindBarBaseTest::shouldHaveDefaultValue()
{
MessageViewer::FindBarBase bar;
- QLabel *status = bar.findChild<QLabel *>(QLatin1String("status"));
+ QLabel *status = bar.findChild<QLabel *>(QStringLiteral("status"));
QVERIFY(status);
QVERIFY(status->text().isEmpty());
- QPushButton *previous = bar.findChild<QPushButton \
*>(QLatin1String("findprevious")); + QPushButton *previous = \
bar.findChild<QPushButton *>(QStringLiteral("findprevious")); QVERIFY(previous);
QVERIFY(!previous->isEnabled());
- QPushButton *next = bar.findChild<QPushButton *>(QLatin1String("findnext"));
+ QPushButton *next = bar.findChild<QPushButton *>(QStringLiteral("findnext"));
QVERIFY(next);
QVERIFY(!next->isEnabled());
- QToolButton *close = bar.findChild<QToolButton *>(QLatin1String("close"));
+ QToolButton *close = bar.findChild<QToolButton *>(QStringLiteral("close"));
QVERIFY(close);
- KLineEdit *lineedit = bar.findChild<KLineEdit *>(QLatin1String("searchline"));
+ KLineEdit *lineedit = bar.findChild<KLineEdit *>(QStringLiteral("searchline"));
QVERIFY(lineedit);
QVERIFY(lineedit->text().isEmpty());
}
@@ -67,8 +67,8 @@ void FindBarBaseTest::shouldClearLineWhenClose()
QTest::qWaitForWindowExposed(&bar);
QVERIFY(bar.isVisible());
bar.focusAndSetCursor();
- KLineEdit *lineedit = bar.findChild<KLineEdit *>(QLatin1String("searchline"));
- lineedit->setText(QLatin1String("FOO"));
+ KLineEdit *lineedit = bar.findChild<KLineEdit *>(QStringLiteral("searchline"));
+ lineedit->setText(QStringLiteral("FOO"));
QVERIFY(!lineedit->text().isEmpty());
QVERIFY(lineedit->hasFocus());
bar.closeBar();
@@ -82,11 +82,11 @@ void FindBarBaseTest::shouldEnableDisableNextPreviousButton()
MessageViewer::FindBarBase bar;
bar.show();
QTest::qWaitForWindowExposed(&bar);
- QPushButton *previous = bar.findChild<QPushButton \
*>(QLatin1String("findprevious")); + QPushButton *previous = \
bar.findChild<QPushButton *>(QStringLiteral("findprevious"));
- QPushButton *next = bar.findChild<QPushButton *>(QLatin1String("findnext"));
+ QPushButton *next = bar.findChild<QPushButton *>(QStringLiteral("findnext"));
- bar.autoSearch(QLatin1String("FOO"));
+ bar.autoSearch(QStringLiteral("FOO"));
QVERIFY(next->isEnabled());
QVERIFY(previous->isEnabled());
@@ -101,13 +101,13 @@ void FindBarBaseTest::shouldClearAllWhenShowBar()
MessageViewer::FindBarBase bar;
bar.show();
QTest::qWaitForWindowExposed(&bar);
- QLabel *status = bar.findChild<QLabel *>(QLatin1String("status"));
- status->setText(QLatin1String("FOO"));
+ QLabel *status = bar.findChild<QLabel *>(QStringLiteral("status"));
+ status->setText(QStringLiteral("FOO"));
bar.closeBar();
bar.show();
bar.focusAndSetCursor();
- KLineEdit *lineedit = bar.findChild<KLineEdit *>(QLatin1String("searchline"));
+ KLineEdit *lineedit = bar.findChild<KLineEdit *>(QStringLiteral("searchline"));
QVERIFY(lineedit->hasFocus());
QVERIFY(status->text().isEmpty());
}
diff --git a/messageviewer/findbar/findbarbase.cpp \
b/messageviewer/findbar/findbarbase.cpp index daa3ea8..c1c0d75 100644
--- a/messageviewer/findbar/findbarbase.cpp
+++ b/messageviewer/findbar/findbarbase.cpp
@@ -42,8 +42,8 @@ FindBarBase::FindBarBase(QWidget *parent)
lay->setMargin(2);
QToolButton *closeBtn = new QToolButton(this);
- closeBtn->setIcon(QIcon::fromTheme(QLatin1String("dialog-close")));
- closeBtn->setObjectName(QLatin1String("close"));
+ closeBtn->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
+ closeBtn->setObjectName(QStringLiteral("close"));
closeBtn->setIconSize(QSize(16, 16));
closeBtn->setToolTip(i18n("Close"));
@@ -58,21 +58,21 @@ FindBarBase::FindBarBase(QWidget *parent)
lay->addWidget(label);
mSearch = new KLineEdit(this);
- mSearch->setObjectName(QLatin1String("searchline"));
+ mSearch->setObjectName(QStringLiteral("searchline"));
mSearch->setToolTip(i18n("Text to search for"));
mSearch->setClearButtonShown(true);
label->setBuddy(mSearch);
lay->addWidget(mSearch);
- mFindNextBtn = new \
QPushButton(QIcon::fromTheme(QLatin1String("go-down-search")), i18nc("Find and go to \
the next search match", "Next"), this); + mFindNextBtn = new \
QPushButton(QIcon::fromTheme(QStringLiteral("go-down-search")), i18nc("Find and go to \
the next search match", "Next"), this); mFindNextBtn->setToolTip(i18n("Jump to next \
match"));
- mFindNextBtn->setObjectName(QLatin1String("findnext"));
+ mFindNextBtn->setObjectName(QStringLiteral("findnext"));
lay->addWidget(mFindNextBtn);
mFindNextBtn->setEnabled(false);
- mFindPrevBtn = new QPushButton(QIcon::fromTheme(QLatin1String("go-up-search")), \
i18nc("Find and go to the previous search match", "Previous"), this); + \
mFindPrevBtn = new QPushButton(QIcon::fromTheme(QStringLiteral("go-up-search")), \
i18nc("Find and go to the previous search match", "Previous"), this); \
mFindPrevBtn->setToolTip(i18n("Jump to previous match"));
- mFindPrevBtn->setObjectName(QLatin1String("findprevious"));
+ mFindPrevBtn->setObjectName(QStringLiteral("findprevious"));
lay->addWidget(mFindPrevBtn);
mFindPrevBtn->setEnabled(false);
@@ -94,7 +94,7 @@ FindBarBase::FindBarBase(QWidget *parent)
connect(mSearch, &KLineEdit::clearButtonClicked, this, \
&FindBarBase::slotClearSearch);
mStatus = new QLabel;
- mStatus->setObjectName(QLatin1String("status"));
+ mStatus->setObjectName(QStringLiteral("status"));
QFontMetrics fm(mStatus->font());
mNotFoundString = i18n("Phrase not found");
mStatus->setFixedWidth(fm.width(mNotFoundString));
diff --git a/messageviewer/grantleefilters/messageheadergrantleefilters.cpp \
b/messageviewer/grantleefilters/messageheadergrantleefilters.cpp index \
d72197b..27330ef 100644
--- a/messageviewer/grantleefilters/messageheadergrantleefilters.cpp
+++ b/messageviewer/grantleefilters/messageheadergrantleefilters.cpp
@@ -32,9 +32,9 @@ QHash<QString, Grantlee::Filter *> \
MessageHeaderGrantleeFilters::filters(const Q Q_UNUSED(name);
QHash<QString, Grantlee::Filter *> filters;
- filters.insert(QLatin1String("showlink"), new MessageHeaderEmailShowLink());
- filters.insert(QLatin1String("nameonly"), new MessageHeaderEmailNameOnly());
- filters.insert(QLatin1String("expandable"), new MessageHeaderEmailExpandable());
+ filters.insert(QStringLiteral("showlink"), new MessageHeaderEmailShowLink());
+ filters.insert(QStringLiteral("nameonly"), new MessageHeaderEmailNameOnly());
+ filters.insert(QStringLiteral("expandable"), new \
MessageHeaderEmailExpandable()); return filters;
}
diff --git a/messageviewer/widgets/todoedit.cpp b/messageviewer/widgets/todoedit.cpp
index bbf0b99..6c75ca7 100644
--- a/messageviewer/widgets/todoedit.cpp
+++ b/messageviewer/widgets/todoedit.cpp
@@ -55,7 +55,7 @@ TodoEdit::TodoEdit(QWidget *parent)
mMsgWidget = new KMessageWidget(this);
mMsgWidget->setCloseButtonVisible(true);
mMsgWidget->setMessageType(KMessageWidget::Positive);
- mMsgWidget->setObjectName(QLatin1String("msgwidget"));
+ mMsgWidget->setObjectName(QStringLiteral("msgwidget"));
mMsgWidget->setWordWrap(true);
mMsgWidget->setVisible(false);
vbox->addWidget(mMsgWidget);
@@ -70,7 +70,7 @@ TodoEdit::TodoEdit(QWidget *parent)
mNoteEdit = new QLineEdit;
mNoteEdit->setClearButtonEnabled(true);
- mNoteEdit->setObjectName(QLatin1String("noteedit"));
+ mNoteEdit->setObjectName(QStringLiteral("noteedit"));
mNoteEdit->setFocus();
connect(mNoteEdit, &QLineEdit::textChanged, this, &TodoEdit::slotTextEdited);
connect(mNoteEdit, &QLineEdit::returnPressed, this, \
&TodoEdit::slotReturnPressed); @@ -82,7 +82,7 @@ TodoEdit::TodoEdit(QWidget *parent)
mCollectionCombobox->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << \
KCalCore::Todo::todoMimeType());
- mCollectionCombobox->setObjectName(QLatin1String("akonadicombobox"));
+ mCollectionCombobox->setObjectName(QStringLiteral("akonadicombobox"));
#ifndef QT_NO_ACCESSIBILITY
mCollectionCombobox->setAccessibleDescription(i18n("Todo list where the new task \
will be stored.")); #endif
@@ -97,8 +97,8 @@ TodoEdit::TodoEdit(QWidget *parent)
vbox->addLayout(hbox);
hbox->addStretch(1);
- mSaveButton = new QPushButton(QIcon::fromTheme(QLatin1String("task-new")), \
i18n("&Save"));
- mSaveButton->setObjectName(QLatin1String("save-button"));
+ mSaveButton = new QPushButton(QIcon::fromTheme(QStringLiteral("task-new")), \
i18n("&Save")); + mSaveButton->setObjectName(QStringLiteral("save-button"));
mSaveButton->setEnabled(false);
#ifndef QT_NO_ACCESSIBILITY
mSaveButton->setAccessibleDescription(i18n("Create new todo and close this \
widget.")); @@ -107,7 +107,7 @@ TodoEdit::TodoEdit(QWidget *parent)
hbox->addWidget(mSaveButton);
mOpenEditorButton = new QPushButton(i18n("Open &editor..."));
- mOpenEditorButton->setObjectName(QLatin1String("open-editor-button"));
+ mOpenEditorButton->setObjectName(QStringLiteral("open-editor-button"));
#ifndef QT_NO_ACCESSIBILITY
mOpenEditorButton->setAccessibleDescription(i18n("Open todo editor, where more \
details can be changed.")); #endif
@@ -117,7 +117,7 @@ TodoEdit::TodoEdit(QWidget *parent)
QPushButton *btn = new QPushButton;
KGuiItem::assign(btn, KStandardGuiItem::cancel());
- btn->setObjectName(QLatin1String("close-button"));
+ btn->setObjectName(QStringLiteral("close-button"));
#ifndef QT_NO_ACCESSIBILITY
btn->setAccessibleDescription(i18n("Close the widget for creating new todos."));
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic