Commit b7a2cbc5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make compile with KDEFrameworkCompilerSettings

parent 45316d86
Pipeline #34867 passed with stage
in 8 minutes and 56 seconds
......@@ -22,7 +22,7 @@ include(ECMGeneratePriFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
......
......@@ -49,7 +49,7 @@ void EvolutionAddressBook::exportEvolutionAddressBook()
proc.close();
if (!result.isEmpty()) {
result.replace('\n', ',');
const QString value(result.trimmed());
const QString value(QString::fromLatin1(result.trimmed()));
const QStringList listAddressBook = value.split(QLatin1Char(','));
//qCDebug(EVOLUTIONPLUGIN_LOG)<<" listAddressBook"<<listAddressBook;
int i = 0;
......
......@@ -44,8 +44,8 @@ void EvolutionCalendar::loadCalendar(const QString &filename)
for (QDomElement e = config.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {
const QString tag = e.tagName();
if (tag == QLatin1String("entry")) {
if (e.hasAttribute("name")) {
const QString attr = e.attribute("name");
if (e.hasAttribute(QStringLiteral("name"))) {
const QString attr = e.attribute(QStringLiteral("name"));
if (attr == QLatin1String("sources")) {
readCalendar(e);
} else {
......
......@@ -49,8 +49,8 @@ void EvolutionSettings::loadAccount(const QString &filename)
for (QDomElement e = config.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {
const QString tag = e.tagName();
if (tag == QLatin1String("entry")) {
if (e.hasAttribute("name")) {
const QString attr = e.attribute("name");
if (e.hasAttribute(QLatin1String("name"))) {
const QString attr = e.attribute(QLatin1String("name"));
if (attr == QLatin1String("accounts")) {
readAccount(e);
} else if (attr == QLatin1String("signatures")) {
......@@ -273,7 +273,7 @@ void EvolutionSettings::extractAccountInfo(const QString &info)
} else if (identityTag == QLatin1String("organization")) {
newIdentity->setOrganization(identity.text());
} else if (identityTag == QLatin1String("signature")) {
if (identity.hasAttribute("uid")) {
if (identity.hasAttribute(QStringLiteral("uid"))) {
newIdentity->setSignature(mMapSignature.value(identity.attribute(QStringLiteral("uid"))));
}
} else if (identityTag == QLatin1String("reply-to")) {
......
......@@ -225,7 +225,7 @@ bool MorkParser::parseCell()
char cur = nextChar();
// Process cell start with column (bColumn == true)
while (Result && cur != ')' && cur) {
while (Result && cur != QLatin1Char(')') && cur) {
switch (cur) {
case '^':
// Oids
......@@ -236,7 +236,7 @@ bool MorkParser::parseCell()
bColumn = false;
bValueOid = true;
} else {
Text += cur;
Text += QLatin1Char(cur);
}
break;
......@@ -245,7 +245,7 @@ bool MorkParser::parseCell()
if (bColumn) {
bColumn = false;
} else {
Text += cur;
Text += QLatin1Char(cur);
}
break;
case '\\':
......@@ -253,7 +253,7 @@ bool MorkParser::parseCell()
// Get next two chars
char NextChar = nextChar();
if ('\r' != NextChar && '\n' != NextChar) {
Text += NextChar;
Text += QLatin1Char(NextChar);
} else {
nextChar();
}
......@@ -263,17 +263,17 @@ bool MorkParser::parseCell()
{
// Get next two chars
QString HexChar;
HexChar += nextChar();
HexChar += nextChar();
Text += (char)HexChar.toInt(nullptr, 16);
HexChar += QLatin1Char(nextChar());
HexChar += QLatin1Char(nextChar());
Text += QLatin1Char((char)HexChar.toInt(nullptr, 16));
break;
}
default:
// Just a char
if (bColumn) {
Column += cur;
Column += QLatin1Char(cur);
} else {
Text += cur;
Text += QLatin1Char(cur);
}
break;
}
......@@ -324,9 +324,9 @@ bool MorkParser::parseTable()
char cur = nextChar();
// Get id
while (cur != '{' && cur != '[' && cur != '}' && cur) {
while (cur != QLatin1Char('{') && cur != QLatin1Char('[') && cur != QLatin1Char('}') && cur) {
if (!isWhiteSpace(cur)) {
TextId += cur;
TextId += QLatin1Char(cur);
}
cur = nextChar();
......@@ -335,7 +335,7 @@ bool MorkParser::parseTable()
parseScopeId(TextId, Id, Scope);
// Parse the table
while (Result && cur != '}' && cur) {
while (Result && cur != QLatin1Char('}') && cur) {
if (!isWhiteSpace(cur)) {
switch (cur) {
case '{':
......@@ -351,10 +351,10 @@ bool MorkParser::parseTable()
{
QString JustId;
while (!isWhiteSpace(cur) && cur) {
JustId += cur;
JustId += QLatin1Char(cur);
cur = nextChar();
if (cur == '}') {
if (cur == QLatin1Char('}')) {
return Result;
}
}
......@@ -385,7 +385,7 @@ void MorkParser::parseScopeId(const QString &textId, int &Id, int &Scope) const
QString tId = textId.mid(0, Pos);
QString tSc = textId.mid(Pos + 1, textId.length() - Pos);
if (tSc.length() > 1 && tSc[ 0 ] == '^') {
if (tSc.length() > 1 && tSc[ 0 ] == QLatin1Char('^')) {
// Delete '^'
tSc.remove(0, 1);
}
......@@ -426,9 +426,9 @@ bool MorkParser::parseRow(int TableId, int TableScope)
char cur = nextChar();
// Get id
while (cur != '(' && cur != ']' && cur != '[' && cur) {
while (cur != QLatin1Char('(') && cur != QLatin1Char(']') && cur != QLatin1Char('[') && cur) {
if (!isWhiteSpace(cur)) {
TextId += cur;
TextId += QLatin1Char(cur);
}
cur = nextChar();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment