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

Fix clazy warning

parent 6b5acf11
......@@ -906,7 +906,7 @@ int AutoCorrection::advancedAutocorrect()
continue;
}
if (actualWord.endsWith(i.key())
|| actualWord.toLower().endsWith(i.key())
|| actualWord.endsWith(i.key(), Qt::CaseInsensitive)
|| actualWordWithFirstUpperCase.endsWith(i.key())) {
int pos = mWord.lastIndexOf(i.key());
if (pos == -1) {
......
......@@ -302,7 +302,7 @@ TemplateListWidget::TemplateListWidget(const QString &configName, QWidget *paren
setContextMenuPolicy(Qt::CustomContextMenu);
setDragDropMode(QAbstractItemView::DragDrop);
connect(this, &TemplateListWidget::customContextMenuRequested, this, [this](const QPoint &p) {
connect(this, &TemplateListWidget::customContextMenuRequested, this, [this](QPoint p) {
d->slotContextMenu(p);
});
connect(this, &TemplateListWidget::doubleClicked, this, [this]() {
......
......@@ -29,6 +29,7 @@ namespace PimCommon {
*/
class PIMCOMMON_EXPORT KPimPrintPreviewDialog : public QPrintPreviewDialog
{
Q_OBJECT
public:
explicit KPimPrintPreviewDialog(QWidget *parent = nullptr);
explicit KPimPrintPreviewDialog(QPrinter *printer, QWidget *parent = nullptr);
......
......@@ -43,7 +43,7 @@ public:
CurrentCollection = 3,
Collections = 4
};
Q_ENUMS(RequireType)
Q_ENUM(RequireType)
Q_DECLARE_FLAGS(RequireTypes, RequireType)
void setActionTypes(const QVector<ActionType> &type);
......
......@@ -182,7 +182,8 @@ QHash<PimCommon::ActionType::Type, QList<QAction *> > PluginInterface::actionsTy
{
QHash<PimCommon::ActionType::Type, QList<QAction *> > listType;
for (PimCommon::GenericPluginInterface *interface : qAsConst(d->mListGenericInterface)) {
for (const PimCommon::ActionType &actionType : interface->actionTypes()) {
const auto actionTypes = interface->actionTypes();
for (const PimCommon::ActionType &actionType : actionTypes) {
PimCommon::ActionType::Type type = actionType.type();
QList<QAction *> lst = listType.value(type);
if (!lst.isEmpty()) {
......
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