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

Fix some clazy warning

parent 774cb28d
Pipeline #74125 passed with stage
in 10 minutes and 39 seconds
......@@ -1031,7 +1031,8 @@ void AutoCorrection::readAutoCorrectionXmlFile(bool forceGlobal)
kdelang = QStringLiteral("en_US");
}
}
kdelang.remove(QRegularExpression(QStringLiteral("@.*")));
static QRegularExpression reg(QStringLiteral("@.*"));
kdelang.remove(reg);
mUpperCaseExceptions.clear();
mAutocorrectEntries.clear();
......
......@@ -12,11 +12,13 @@ QString PimCommon::AddresseeLineEditUtil::adaptPasteMails(const QString &str)
{
QString newText = str;
// remove newlines in the to-be-pasted string
QStringList lines = newText.split(QRegularExpression(QStringLiteral("\r?\n")), Qt::SkipEmptyParts);
static QRegularExpression reg2(QStringLiteral("\r?\n"));
QStringList lines = newText.split(reg2, Qt::SkipEmptyParts);
QStringList::iterator end(lines.end());
for (QStringList::iterator it = lines.begin(); it != end; ++it) {
// remove trailing commas and whitespace
(*it).remove(QRegularExpression(QStringLiteral(",?\\s*$")));
static QRegularExpression reg1(QRegularExpression(QStringLiteral(",?\\s*$")));
(*it).remove(reg1);
}
newText = lines.join(QLatin1String(", "));
......@@ -28,7 +30,8 @@ QString PimCommon::AddresseeLineEditUtil::adaptPasteMails(const QString &str)
newText.replace(QStringLiteral(" at "), QStringLiteral("@"));
newText.replace(QStringLiteral(" dot "), QStringLiteral("."));
} else if (newText.contains(QLatin1String("(at)"))) {
newText.replace(QRegularExpression(QStringLiteral("\\s*\\(at\\)\\s*")), QStringLiteral("@"));
static QRegularExpression reg((QStringLiteral("\\s*\\(at\\)\\s*")));
newText.replace(reg, QStringLiteral("@"));
}
return newText;
}
......@@ -83,7 +83,7 @@ QVector<Akonadi::Collection> SelectMultiCollectionWidget::selectedCollection(con
const auto col = mCheckedCollectionWidget->checkableProxy()->data(child, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
if (mCheckedCollectionWidget->checkableProxy()->data(child, Qt::CheckStateRole).value<int>()) {
if (mCheckedCollectionWidget->checkableProxy()->data(child, Qt::CheckStateRole).toInt()) {
lst << col;
}
lst << selectedCollection(child);
......
......@@ -49,7 +49,7 @@ public:
PimCommon::GenericPlugin *pluginFromIdentifier(const QString &id);
void clearPluginActions(const QString &prefix, KXMLGUIClient *guiClient);
private Q_SLOTS:
void slotPluginActivated(AbstractGenericPluginInterface *interface);
void slotPluginActivated(PimCommon::AbstractGenericPluginInterface *interface);
private:
PluginInterfacePrivate *const d;
......
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