Commit 8ce7527a authored by Sergio Martins's avatar Sergio Martins

Avoid QLatin1String wherever it allocates heap memory

parent a1bc5201
......@@ -60,7 +60,7 @@ public:
QString saveDir(const char *resource, const QString &relPath = QString())
{
QString fullRelPath = QLatin1String("akonadi");
QString fullRelPath = QStringLiteral("akonadi");
if (ServerManager::hasInstanceIdentifier()) {
fullRelPath += QLatin1String("/instance/") + ServerManager::instanceIdentifier();
}
......
......@@ -137,7 +137,7 @@ NotificationModel::NotificationEntity::NotificationEntity(const Protocol::Change
NotificationModel::NotificationModel(QObject *parent) :
QAbstractItemModel(parent)
{
QString service = QLatin1String("org.freedesktop.Akonadi");
QString service = QStringLiteral("org.freedesktop.Akonadi");
if (Akonadi::ServerManager::hasInstanceIdentifier()) {
service += QLatin1String(".") + Akonadi::ServerManager::instanceIdentifier();
}
......
......@@ -279,7 +279,7 @@ void TagPropertiesDialog::slotAccept()
if (mTag.isValid() && !mRemovedRIDs.isEmpty()) {
QSqlQuery query(DbAccess::database());
QString queryStr = QLatin1String("DELETE FROM TagRemoteIdResourceRelationTable "
QString queryStr = QStringLiteral("DELETE FROM TagRemoteIdResourceRelationTable "
"WHERE tagId = ? AND "
"resourceId IN (SELECT id "
"FROM ResourceTable "
......@@ -288,7 +288,7 @@ void TagPropertiesDialog::slotAccept()
for (int i = 0; i < mRemovedRIDs.count(); ++i) {
conds << QStringLiteral("name = ?");
}
queryStr += conds.join(QLatin1String(" OR ")) + QLatin1String(")");
queryStr += conds.join(QStringLiteral(" OR ")) + QLatin1String(")");
query.prepare(queryStr);
query.addBindValue(mTag.id());
Q_FOREACH (const QString &removedRid, mRemovedRIDs) {
......@@ -310,7 +310,7 @@ void TagPropertiesDialog::slotAccept()
for (int i = 0; i < mChangedRIDs.count(); ++i) {
conds << QStringLiteral("name = ?");
}
queryStr += conds.join(QLatin1String(" OR "));
queryStr += conds.join(QStringLiteral(" OR "));
query.prepare(queryStr);
Q_FOREACH (const QString &res, mChangedRIDs) {
query.addBindValue(res);
......
......@@ -283,7 +283,7 @@ QString DefaultNormalViewFormatter::getCss() const
css += QString(
QString::fromLatin1("a {\n")
+ QString::fromLatin1(" color: %1 ! important;\n")
+ QString(!Settings::underlineLinks() ? QLatin1String(" text-decoration: none ! important;\n") : QLatin1String(""))
+ QString(!Settings::underlineLinks() ? QStringLiteral(" text-decoration: none ! important;\n") : QStringLiteral(""))
+ QLatin1String("}\n\n")
+ QLatin1String(".headerbox {\n")
+ QLatin1String(" background: %2 ! important;\n")
......@@ -363,7 +363,7 @@ QString DefaultCombinedViewFormatter::formatArticle(const Article &article, Icon
{
QString text;
const QString enc = formatEnclosure(*article.enclosure());
text = QString::fromLatin1("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? QLatin1String("rtl") : QLatin1String("ltr"));
text = QString::fromLatin1("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? QStringLiteral("rtl") : QStringLiteral("ltr"));
const QString strippedTitle = Utils::stripTags(article.title());
......@@ -470,7 +470,7 @@ QString DefaultCombinedViewFormatter::getCss() const
css += QString(
QLatin1String("a {\n")
+ QString::fromLatin1(" color: %1 ! important;\n")
+ QString(!Settings::underlineLinks() ? QLatin1String(" text-decoration: none ! important;\n") : QLatin1String(""))
+ QString(!Settings::underlineLinks() ? QStringLiteral(" text-decoration: none ! important;\n") : QStringLiteral(""))
+ QLatin1String("}\n\n")
+ QString::fromLatin1(".headerbox {\n")
+ QString::fromLatin1(" background: %2 ! important;\n")
......
......@@ -476,14 +476,14 @@ bool Akregator::Feed::isArticlesLoaded() const
QDomElement Akregator::Feed::toOPML(QDomElement parent, QDomDocument document) const
{
QDomElement el = document.createElement(QLatin1String("outline"));
QDomElement el = document.createElement(QStringLiteral("outline"));
el.setAttribute(QStringLiteral("text"), title());
el.setAttribute(QStringLiteral("title"), title());
el.setAttribute(QStringLiteral("xmlUrl"), d->xmlUrl);
el.setAttribute(QStringLiteral("htmlUrl"), d->htmlUrl);
el.setAttribute(QStringLiteral("id"), QString::number(id()));
el.setAttribute(QStringLiteral("description"), d->description);
el.setAttribute(QStringLiteral("useCustomFetchInterval"), (useCustomFetchInterval() ? QLatin1String("true") : QLatin1String("false")));
el.setAttribute(QStringLiteral("useCustomFetchInterval"), (useCustomFetchInterval() ? QStringLiteral("true") : QStringLiteral("false")));
el.setAttribute(QStringLiteral("fetchInterval"), QString::number(fetchInterval()));
el.setAttribute(QStringLiteral("archiveMode"), archiveModeToString(d->archiveMode));
el.setAttribute(QStringLiteral("maxArticleAge"), d->maxArticleAge);
......
......@@ -72,8 +72,8 @@ QString getIconUrl(const QUrl &url)
FeedIconManager::Private::Private(FeedIconManager *qq) : q(qq)
{
QDBusConnection::sessionBus().registerObject(QLatin1String("/FeedIconManager"), q, QDBusConnection::ExportScriptableSlots);
m_favIconsModule = new QDBusInterface(QLatin1String("org.kde.kded5"), QStringLiteral("/modules/favicons"), QLatin1String(FAVICONINTERFACE));
QDBusConnection::sessionBus().registerObject(QStringLiteral("/FeedIconManager"), q, QDBusConnection::ExportScriptableSlots);
m_favIconsModule = new QDBusInterface(QStringLiteral("org.kde.kded5"), QStringLiteral("/modules/favicons"), QStringLiteral(FAVICONINTERFACE));
Q_ASSERT(m_favIconsModule);
q->connect(m_favIconsModule, SIGNAL(iconChanged(bool,QString,QString)),
q, SLOT(slotIconChanged(bool,QString,QString)));
......
......@@ -359,7 +359,7 @@ void FeedList::append(FeedList *list, Folder *parent, TreeNode *after)
QDomDocument FeedList::toOpml() const
{
QDomDocument doc;
doc.appendChild(doc.createProcessingInstruction(QLatin1String("xml"), QStringLiteral("version=\"1.0\" encoding=\"UTF-8\"")));
doc.appendChild(doc.createProcessingInstruction(QStringLiteral("xml"), QStringLiteral("version=\"1.0\" encoding=\"UTF-8\"")));
QDomElement root = doc.createElement(QStringLiteral("opml"));
root.setAttribute(QStringLiteral("version"), QStringLiteral("1.0"));
......
......@@ -224,7 +224,7 @@ void AddEditBlog::gotHtml(KJob *job)
qCDebug(BLOGILO_LOG) << " rel=\"openid.server\" href=\"http://www.livejournal.com/openid/server.bml\" matched";
d->mFetchAPITimer->deleteLater();
d->ui.comboApi->setCurrentIndex(0);
d->ui.txtUrl->setText(QLatin1String("http://www.liverjournal.com/interface/blogger/"));
d->ui.txtUrl->setText(QStringLiteral("http://www.liverjournal.com/interface/blogger/"));
d->ui.txtId->setText(d->ui.txtUser->text());
hideWaitWidget();
return;
......
......@@ -100,8 +100,8 @@ KBlog::Blog *BilboBlog::blogBackend()
case BilboBlog::BLOGGER_API:
#ifdef HAVE_GAPIBLOGGER_SUPPORT
d->kblog = new KBlog::Blogger(url(), this);
qobject_cast<KBlog::Blogger *>(d->kblog)->setApiKey(QLatin1String("508396175529-icqp62q8t6st41gjv1du100fol6renq4.apps.googleusercontent.com"));
qobject_cast<KBlog::Blogger *>(d->kblog)->setSecretKey(QLatin1String("JFPDXYmGIuM601vhgVGv0Dlx"));
qobject_cast<KBlog::Blogger *>(d->kblog)->setApiKey(QStringLiteral("508396175529-icqp62q8t6st41gjv1du100fol6renq4.apps.googleusercontent.com"));
qobject_cast<KBlog::Blogger *>(d->kblog)->setSecretKey(QStringLiteral("JFPDXYmGIuM601vhgVGv0Dlx"));
#else
return 0;
#endif
......
......@@ -108,13 +108,13 @@ QString BilboPost::toString() const
// if(!title().isEmpty())
// qDebug("BilboPost::toString: title is %s", this->title());
QString ret;
ret = QLatin1String("\n******* Post Info **********");
ret = QStringLiteral("\n******* Post Info **********");
ret += QLatin1String("\nID: ") + postId();
ret += QLatin1String("\nTitle: ") + title();
ret += QLatin1String("\nContent: ") + content();
ret += QLatin1String("\nAdditionalContent: ") + additionalContent();
ret += QLatin1String("\nTags: ") + tags().join(QLatin1String(","));
ret += QLatin1String("\nCategories: ") + categories().join(QLatin1String(","));
ret += QLatin1String("\nTags: ") + tags().join(QStringLiteral(","));
ret += QLatin1String("\nCategories: ") + categories().join(QStringLiteral(","));
ret += QLatin1String("\nCreation Date Time: ") + creationDateTime().toString();
ret += QLatin1String("\nStatus: ") + QString::number(status());
ret += QLatin1String("\nIsPrivate: ") + QVariant(isPrivate()).toString();
......
......@@ -266,9 +266,9 @@ void Blogger::authenticate(const QMap<QString, QString> &authData)
if (!authData.isEmpty()) {
QList<QUrl> scopes;
scopes << KGAPI2::Account::bloggerScopeUrl();
account = KGAPI2::AccountPtr(new KGAPI2::Account(authData[QLatin1String("account")],
authData[QLatin1String("accessToken")],
authData[QLatin1String("refreshToken")],
account = KGAPI2::AccountPtr(new KGAPI2::Account(authData[QStringLiteral("account")],
authData[QStringLiteral("accessToken")],
authData[QStringLiteral("refreshToken")],
scopes));
d->account = account;
} else {
......@@ -295,9 +295,9 @@ void BloggerPrivate::_k_onAuthenticateFinished(KGAPI2::Job *job)
account = authJob->account();
QMap<QString, QString> authData;
authData[QLatin1String("account")] = account->accountName();
authData[QLatin1String("accessToken")] = account->accessToken();
authData[QLatin1String("refreshToken")] = account->refreshToken();
authData[QStringLiteral("account")] = account->accountName();
authData[QStringLiteral("accessToken")] = account->accessToken();
authData[QStringLiteral("refreshToken")] = account->refreshToken();
Q_EMIT q->authenticated(authData);
......@@ -314,7 +314,7 @@ void Blogger::listBlogs()
Q_D(Blogger);
KGAPI2::Blogger::BlogFetchJob *fetchJob
= new KGAPI2::Blogger::BlogFetchJob(QLatin1String("self"),
= new KGAPI2::Blogger::BlogFetchJob(QStringLiteral("self"),
KGAPI2::Blogger::BlogFetchJob::FetchByUserId,
d->account,
this);
......
......@@ -162,7 +162,7 @@ void BilboBrowser::slotCompleted(bool ok)
void BilboBrowser::slotSetStatusBarText(const QString &text)
{
QString statusText = text;
statusText.remove(QLatin1String("<qt>"));
statusText.remove(QStringLiteral("<qt>"));
browserStatus->showMessage(statusText);
}
......
......@@ -103,7 +103,7 @@ void BlogiloComposerEditor::setReadOnly(bool _readOnly)
{
if (readOnly != _readOnly) {
readOnly = _readOnly;
view()->evaluateJavascript(QString::fromLatin1("setReadOnly(%1)").arg(readOnly ? QLatin1String("true") : QLatin1String("false")));
view()->evaluateJavascript(QString::fromLatin1("setReadOnly(%1)").arg(readOnly ? QStringLiteral("true") : QStringLiteral("false")));
}
}
......@@ -111,7 +111,7 @@ QList< BilboMedia * > BlogiloComposerEditor::getLocalImages()
{
qCDebug(BLOGILO_LOG);
QList< BilboMedia * > list;
QWebElementCollection images = view()->page()->mainFrame()->findAllElements(QLatin1String("img"));
QWebElementCollection images = view()->page()->mainFrame()->findAllElements(QStringLiteral("img"));
Q_FOREACH (const QWebElement &elm, images) {
if (elm.attribute(QStringLiteral("src")).startsWith(QStringLiteral("file://"))) {
// qCDebug(BLOGILO_LOG)<<elm.toOuterXml();
......@@ -180,6 +180,6 @@ void BlogiloComposerEditor::execCommand(const QString &cmd, const QString &arg)
void BlogiloComposerEditor::insertShortUrl(const QString &url)
{
QString html = QString::fromLatin1("<a href=\'%1\'>%1</a>").arg(url);
execCommand(QLatin1String("insertHtml"), html);
execCommand(QStringLiteral("insertHtml"), html);
}
......@@ -127,7 +127,7 @@ QString StyleGetter::styledHtml(const int blogid,
buffer.append(QString::fromUtf8(line));
}
QRegExp typeRx(QLatin1String("(TYPE[^>]+>)"));
QRegExp typeRx(QStringLiteral("(TYPE[^>]+>)"));
buffer.remove(typeRx);
QRegExp titleRx(QStringLiteral("%1[\\d]*").arg(QLatin1String(POST_TITLE)));
......@@ -184,7 +184,7 @@ void StyleGetter::slotHtmlCopied(KJob *job)
href = href.remove(filenameOffset + 1, 255);
QString base(QLatin1String("<base href=\"") + href + QLatin1String("\"/>"));
QRegExp rxBase(QLatin1String("(<base\\shref=[^>]+>)"));
QRegExp rxBase(QStringLiteral("(<base\\shref=[^>]+>)"));
if (rxBase.indexIn(QLatin1String(httpData)) != -1) {
httpData.replace(rxBase.cap(1).toLatin1(), base.toLatin1());
} else {
......
This diff is collapsed.
......@@ -67,7 +67,7 @@ public:
return
!q->collection().isValid() ||
collectionMatchesMimeTypes() ||
q->collection().contentMimeTypes() == QStringList(QLatin1String("inode/directory"));
q->collection().contentMimeTypes() == QStringList(QStringLiteral("inode/directory"));
}
private:
......
......@@ -346,7 +346,7 @@ bool CalendarSupport::isValidTodoItemUrl(const QUrl &url)
return false;
}
return QUrlQuery(url).queryItemValue(QLatin1String("type")) == KCalCore::Todo::todoMimeType();
return QUrlQuery(url).queryItemValue(QStringLiteral("type")) == KCalCore::Todo::todoMimeType();
}
bool CalendarSupport::canDecode(const QMimeData *md)
......
......@@ -256,7 +256,7 @@ void TimeLabels::paintEvent(QPaintEvent *)
// handle 24h and am/pm time formats
if (KLocale::global()->use12Clock()) {
if (cell == 12) {
suffix = QLatin1String("pm");
suffix = QStringLiteral("pm");
}
if (cell == 0) {
hour.setNum(12);
......
......@@ -71,7 +71,7 @@ int WhatsNextView::currentDateCount() const
void WhatsNextView::createTaskRow(KIconLoader *kil)
{
QString ipath;
kil->loadIcon(QLatin1String("view-calendar-tasks"), KIconLoader::NoGroup, 22,
kil->loadIcon(QStringLiteral("view-calendar-tasks"), KIconLoader::NoGroup, 22,
KIconLoader::DefaultState, QStringList(), &ipath);
mText += QLatin1String("<h2><img src=\"");
mText += ipath;
......@@ -116,7 +116,7 @@ void WhatsNextView::updateView()
if (events.count() > 0) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QLatin1String("view-calendar-day"), KIconLoader::NoGroup, 22,
kil->loadIcon(QStringLiteral("view-calendar-day"), KIconLoader::NoGroup, 22,
KIconLoader::DefaultState, QStringList(), &ipath);
mText += QLatin1String("<h2><img src=\"");
mText += ipath;
......@@ -197,7 +197,7 @@ void WhatsNextView::updateView()
if (me->status() == KCalCore::Attendee::NeedsAction && me->RSVP()) {
if (replies == 0) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QLatin1String("mail-reply-sender"), KIconLoader::NoGroup, 22,
kil->loadIcon(QStringLiteral("mail-reply-sender"), KIconLoader::NoGroup, 22,
KIconLoader::DefaultState, QStringList(), &ipath);
mText += QLatin1String("<h2><img src=\"");
mText += ipath;
......@@ -217,7 +217,7 @@ void WhatsNextView::updateView()
if (me->status() == KCalCore::Attendee::NeedsAction && me->RSVP()) {
if (replies == 0) {
mText += QLatin1String("<p></p>");
kil->loadIcon(QLatin1String("mail-reply-sender"), KIconLoader::NoGroup, 22,
kil->loadIcon(QStringLiteral("mail-reply-sender"), KIconLoader::NoGroup, 22,
KIconLoader::DefaultState, QStringList(), &ipath);
mText += QLatin1String("<h2><img src=\"");
mText += ipath;
......
......@@ -58,7 +58,7 @@ QString ComposerTableDialogPrivate::html() const
const int numberRow(insertTableWidget->rows());
QString htmlTable = QString::fromLatin1("<table border='%1'").arg(insertTableWidget->border());
htmlTable += QString::fromLatin1(" width='%1%2'").arg(insertTableWidget->length()).arg(insertTableWidget->typeOfLength() == QTextLength::PercentageLength ? QLatin1String("%") : QString());
htmlTable += QString::fromLatin1(" width='%1%2'").arg(insertTableWidget->length()).arg(insertTableWidget->typeOfLength() == QTextLength::PercentageLength ? QStringLiteral("%") : QString());
htmlTable += QString::fromLatin1(">");
for (int i = 0; i < numberRow; ++i) {
htmlTable += QLatin1String("<tr>");
......
......@@ -72,7 +72,7 @@ void ComposerTableFormatDialogPrivate::applyChanges()
{
if (!webElement.isNull()) {
webElement.setAttribute(QStringLiteral("border"), QString::number(insertTableWidget->border()));
const QString width = QStringLiteral("%1%2").arg(insertTableWidget->length()).arg(insertTableWidget->typeOfLength() == QTextLength::PercentageLength ? QLatin1String("%") : QString());
const QString width = QStringLiteral("%1%2").arg(insertTableWidget->length()).arg(insertTableWidget->typeOfLength() == QTextLength::PercentageLength ? QStringLiteral("%") : QString());
webElement.setAttribute(QStringLiteral("width"), width);
if (useBackgroundColor->isChecked()) {
const QColor col = backgroundColor->color();
......
......@@ -25,7 +25,7 @@
QColor ComposerEditorNG::Utils::convertRgbToQColor(QString rgb)
{
rgb.chop(1);
rgb.remove(QLatin1String("rgb("));
rgb.remove(QStringLiteral("rgb("));
rgb = rgb.simplified();
const QStringList colorLst = rgb.split(QLatin1Char(','));
if (colorLst.count() == 3) {
......@@ -38,7 +38,7 @@ QColor ComposerEditorNG::Utils::convertRgbToQColor(QString rgb)
QUrl ComposerEditorNG::Utils::guessUrlFromString(const QString &string)
{
const QString urlStr = string.trimmed();
const QRegExp test(QLatin1String("^[a-zA-Z]+\\:.*"));
const QRegExp test(QStringLiteral("^[a-zA-Z]+\\:.*"));
// Check if it looks like a qualified URL. Try parsing it and see.
const bool hasSchema = test.exactMatch(urlStr);
......@@ -59,7 +59,7 @@ QUrl ComposerEditorNG::Utils::guessUrlFromString(const QString &string)
const int dotIndex = urlStr.indexOf(QLatin1Char('.'));
if (dotIndex != -1) {
const QString prefix = urlStr.left(dotIndex).toLower();
const QString schema = (prefix == QLatin1String("ftp")) ? prefix : QLatin1String("http");
const QString schema = (prefix == QLatin1String("ftp")) ? prefix : QStringLiteral("http");
QUrl url(schema + QLatin1String("://") + urlStr, QUrl::TolerantMode);
if (url.isValid()) {
return url;
......
......@@ -467,7 +467,7 @@ static void printStat(const QString &message, int arg)
{
if (arg > 0) {
print(message.leftJustified(50), false);
const QString s = QLatin1String(": %1");
const QString s = QStringLiteral(": %1");
print(s.arg(arg));
}
}
......@@ -475,7 +475,7 @@ static void printStat(const QString &message, int arg)
void CalendarJanitor::sanityCheck8()
{
beginTest(i18n("Gathering statistics..."));
print(QLatin1String("\n"));
print(QStringLiteral("\n"));
int numOldAlarms = 0;
int numAttachments = 0;
......@@ -627,11 +627,11 @@ void CalendarJanitor::printFound(const Akonadi::Item &item, const QString &expla
KCalCore::Incidence::Ptr incidence = CalendarSupport::incidence(item);
m_numDamaged++;
if (m_numDamaged == 1) {
print(QLatin1String(" [!!]"));
print(QStringLiteral(" [!!]"));
if (!explanation.isEmpty()) {
print(QLatin1String(" "), false);
print(QStringLiteral(" "), false);
print(explanation, false);
print(QLatin1String(":\n"));
print(QStringLiteral(":\n"));
}
}
print(QLatin1String(" * ") + i18n("Found buggy incidence:"));
......@@ -649,9 +649,9 @@ void CalendarJanitor::beginTest(const QString &message)
void CalendarJanitor::endTest(bool printEnabled, const QString fixExplanation, const QString &fixExplanation2)
{
if (m_numDamaged == 0 && printEnabled) {
print(QLatin1String(" [OK]"));
print(QStringLiteral(" [OK]"));
} else if (m_numDamaged > 0) {
print(QLatin1String("\n "), false);
print(QStringLiteral("\n "), false);
if (m_options.action() == Options::ActionScanAndFix) {
print(fixExplanation2);
} else {
......
......@@ -124,7 +124,7 @@ bool KonsoleKalendar::printCalendarList()
bool KonsoleKalendar::createAkonadiResource(const QString &icalFileName)
{
Akonadi::AgentType type = Akonadi::AgentManager::self()->type(QLatin1String("akonadi_ical_resource"));
Akonadi::AgentType type = Akonadi::AgentManager::self()->type(QStringLiteral("akonadi_ical_resource"));
Akonadi::AgentInstanceCreateJob *job = new Akonadi::AgentInstanceCreateJob(type);
job->setProperty("path", icalFileName);
QEventLoop loop;
......@@ -289,12 +289,12 @@ bool KonsoleKalendar::showInstance()
lastdate = m_variables->getEndDateTime().date();
}
KCalUtils::HTMLExportSettings htmlSettings(QLatin1String("Konsolekalendar"));
KCalUtils::HTMLExportSettings htmlSettings(QStringLiteral("Konsolekalendar"));
//TODO: get progname and url from the values set in main
htmlSettings.setCreditName(QLatin1String("KonsoleKalendar"));
htmlSettings.setCreditName(QStringLiteral("KonsoleKalendar"));
htmlSettings.setCreditURL(
QLatin1String("http://pim.kde.org/components/konsolekalendar.php"));
QStringLiteral("http://pim.kde.org/components/konsolekalendar.php"));
htmlSettings.setExcludePrivate(true);
htmlSettings.setExcludeConfidential(true);
......
......@@ -65,9 +65,9 @@ KonsoleKalendarVariables::KonsoleKalendarVariables()
m_bDescription = false;
m_description.clear();
m_bLocation = false;
m_location = QLatin1String("Default location"); //i18n ?
m_location = QStringLiteral("Default location"); //i18n ?
m_bSummary = false;
m_summary = QLatin1String("Default summary"); //i18n?
m_summary = QStringLiteral("Default summary"); //i18n?
m_bFloating = true;
m_bAllowGui = false;
m_collectionId = -1;
......
......@@ -107,11 +107,11 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
}
if (e.hasAttribute(QStringLiteral("name"))) {
name = e.attribute(QStringLiteral("name"));
settings.insert(QLatin1String("DisplayName"), name);
settings.insert(QStringLiteral("DisplayName"), name);
}
if (e.hasAttribute(QStringLiteral("relative_uri"))) {
const QString path = mCalendarPath + e.attribute(QStringLiteral("relative_uri")) + QLatin1String("/calendar.ics");
settings.insert(QLatin1String("Path"), path);
settings.insert(QStringLiteral("Path"), path);
}
if (e.hasAttribute(QStringLiteral("color_spec"))) {
//const QString color = e.attribute(QStringLiteral("color_spec"));
......@@ -128,7 +128,7 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
if (propertyName == QLatin1String("custom-file-readonly")) {
if (property.hasAttribute(QStringLiteral("value"))) {
if (property.attribute(QStringLiteral("value")) == QLatin1String("1")) {
settings.insert(QLatin1String("ReadOnly"), true);
settings.insert(QStringLiteral("ReadOnly"), true);
}
}
} else if (propertyName == QLatin1String("alarm")) {
......@@ -142,7 +142,7 @@ void EvolutionCalendar::extractCalendarInfo(const QString &info)
}
}
}
AbstractBase::createResource(QLatin1String("akonadi_ical_resource"), name, settings);
AbstractBase::createResource(QStringLiteral("akonadi_ical_resource"), name, settings);
} else {
qCDebug(IMPORTWIZARD_LOG) << " tag unknown :" << tag;
}
......
......@@ -324,29 +324,29 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
//imapx://name@pop3.xx.org:993/;security-method=ssl-on-alternate-port;namespace;shell-command=ssh%20-C%20-l%20%25u%20%25h%20exec%20/usr/sbin/imapd%20;use-shell-command=true
if (scheme == QLatin1String("imap") || scheme == QLatin1String("imapx")) {
if (port > 0) {
settings.insert(QLatin1String("ImapPort"), port);
settings.insert(QStringLiteral("ImapPort"), port);
}
//Perhaps imapx is specific don't know
if (intervalCheck) {
settings.insert(QLatin1String("IntervalCheckEnabled"), true);
settings.insert(QStringLiteral("IntervalCheckEnabled"), true);
}
if (interval > -1) {
settings.insert(QLatin1String("IntervalCheckTime"), interval);
settings.insert(QStringLiteral("IntervalCheckTime"), interval);
}