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

fix some cppcheck warnings

parent 424b7c6e
Pipeline #83860 passed with stage
in 4 minutes and 4 seconds
......@@ -90,7 +90,7 @@ QDateTime Page::updated() const
return d->updated;
}
void Page::setUpdated(QDateTime &updated)
void Page::setUpdated(const QDateTime &updated)
{
d->updated = updated;
}
......
......@@ -38,7 +38,7 @@ class KGAPIBLOGGER_EXPORT Page : public KGAPI2::Object
void setPublished(const QDateTime &published);
QDateTime updated() const;
void setUpdated(QDateTime &updated);
void setUpdated(const QDateTime &updated);
QUrl url() const;
void setUrl(const QUrl &url);
......
......@@ -878,9 +878,9 @@ ContactPtr XMLToContact(const QByteArray& xmlData)
}
if (e.tagName() == QLatin1String("gd:name")) {
QDomNodeList l = e.childNodes();
for (int i = 0; i < l.length(); ++i) {
const QDomElement el = l.at(i).toElement();
const QDomNodeList l = e.childNodes();
for (int j = 0; j < l.length(); ++j) {
const QDomElement el = l.at(j).toElement();
if (el.tagName() == QLatin1String("gd:fullName")) {
contact->setFormattedName(el.text());
......
......@@ -52,8 +52,8 @@ DrivesDeleteJob::DrivesDeleteJob(const DrivesList &drives,
DeleteJob(account, parent),
d(new Private)
{
for (const DrivesPtr & drives : std::as_const(drives)) {
d->drivesIds << drives->id();
for (const DrivesPtr & drive : std::as_const(drives)) {
d->drivesIds << drive->id();
}
}
......
......@@ -51,7 +51,7 @@ class KGAPIDRIVE_DEPRECATED_EXPORT TeamdriveFetchJob : public KGAPI2::FetchJob
public:
TeamdriveFetchJob(const TeamdriveSearchQuery &query, const AccountPtr &account, QObject *parent = nullptr);
TeamdriveFetchJob(const AccountPtr &account, QObject *parent = nullptr);
explicit TeamdriveFetchJob(const AccountPtr &account, QObject *parent = nullptr);
TeamdriveFetchJob(const QString &teamdriveId, const AccountPtr &account,
QObject *parent = nullptr);
~TeamdriveFetchJob() override;
......
......@@ -43,7 +43,7 @@ class KGAPITASKS_EXPORT Task: public KGAPI2::Object,
/**
* @brief Copy constructor
*/
Task(const KCalendarCore::Todo &other);
explicit Task(const KCalendarCore::Todo &other);
/**
* @brief Destructor
......
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