Commit 6e933543 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

cppcheck fix

parent 10e79a06
Pipeline #83204 passed with stage
in 12 minutes and 38 seconds
......@@ -45,19 +45,16 @@ protected:
class PluginItem : public QTreeWidgetItem
{
public:
PluginItem(QTreeWidgetItem *parent)
explicit PluginItem(QTreeWidgetItem *parent)
: QTreeWidgetItem(parent)
, mEnableByDefault(false)
, mHasConfigureSupport(false)
, mEnableFromUserSettings(false)
{
}
QString mIdentifier;
QString mDescription;
bool mEnableByDefault;
bool mHasConfigureSupport;
bool mEnableFromUserSettings;
bool mEnableByDefault = false;
bool mHasConfigureSupport = false;
bool mEnableFromUserSettings = false;
};
void savePlugins(const QString &groupName, const QString &prefixSettingKey, const QVector<PluginItem *> &listItems);
void fillTopItems(const QVector<PimCommon::PluginUtilData> &lst,
......
......@@ -42,7 +42,7 @@ CompletionOrderEditorAdaptor::CompletionOrderEditorAdaptor(QObject *parent)
class LDAPCompletionItem : public CompletionItem
{
public:
LDAPCompletionItem(KLDAP::LdapClient *ldapClient)
explicit LDAPCompletionItem(KLDAP::LdapClient *ldapClient)
: mLdapClient(ldapClient)
{
mWeight = mLdapClient->completionWeight();
......
......@@ -20,7 +20,7 @@ class PIMCOMMONAKONADI_EXPORT CollectionAnnotationsAttribute : public Akonadi::A
{
public:
CollectionAnnotationsAttribute();
CollectionAnnotationsAttribute(const QMap<QByteArray, QByteArray> &annotations);
explicit CollectionAnnotationsAttribute(const QMap<QByteArray, QByteArray> &annotations);
~CollectionAnnotationsAttribute() override = default;
void setAnnotations(const QMap<QByteArray, QByteArray> &annotations);
......
......@@ -45,7 +45,6 @@ static QVariant::Type argumentType(const QMetaObject *mo, const QString &method)
if (m.methodSignature().isEmpty()) {
qCWarning(PIMCOMMONAKONADI_LOG) << "Did not find D-Bus method: " << method << " available methods are:";
const int numberOfMethod(mo->methodCount());
for (int i = 0; i < numberOfMethod; ++i) {
qCWarning(PIMCOMMONAKONADI_LOG) << mo->method(i).methodSignature();
}
......
......@@ -117,7 +117,7 @@ void AnnotationEditDialog::slotAccepted()
map.insert(d->mNoteType->itemData(d->mNoteType->currentIndex()).toByteArray(), d->mTextEdit->toPlainText().toUtf8());
annotation->setAnnotations(map);
d->mItem.addAttribute(annotation);
} else if (d->mHasAnnotation && textIsEmpty) {
} else if (d->mHasAnnotation) {
d->mItem.removeAttribute<Akonadi::EntityAnnotationsAttribute>();
}
new Akonadi::ItemModifyJob(d->mItem);
......
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