Commit 88d86206 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent 6cb3d012
...@@ -454,6 +454,9 @@ EwsAbstractAuth *EwsConfigDialog::prepareAuth() ...@@ -454,6 +454,9 @@ EwsAbstractAuth *EwsConfigDialog::prepareAuth()
auth = new EwsOAuth(this, mUi->kcfg_Email->text(), mSettings->oAuth2AppId(), mSettings->oAuth2ReturnUri()); auth = new EwsOAuth(this, mUi->kcfg_Email->text(), mSettings->oAuth2AppId(), mSettings->oAuth2ReturnUri());
} else if (mUi->authUsernameRadioButton->isChecked()) { } else if (mUi->authUsernameRadioButton->isChecked()) {
auth = new EwsPasswordAuth(fullUsername(), this); auth = new EwsPasswordAuth(fullUsername(), this);
} else {
//Be sure that it will not crash.
return auth;
} }
auth->setAuthParentWidget(this); auth->setAuthParentWidget(this);
......
...@@ -27,7 +27,7 @@ class FolderArchiveAccountInfo ...@@ -27,7 +27,7 @@ class FolderArchiveAccountInfo
{ {
public: public:
FolderArchiveAccountInfo(); FolderArchiveAccountInfo();
FolderArchiveAccountInfo(const KConfigGroup &config); explicit FolderArchiveAccountInfo(const KConfigGroup &config);
~FolderArchiveAccountInfo(); ~FolderArchiveAccountInfo();
enum FolderArchiveType { enum FolderArchiveType {
......
...@@ -375,9 +375,9 @@ void ContactsResource::slotCollectionsRetrieved(KGAPI2::Job *job) ...@@ -375,9 +375,9 @@ void ContactsResource::slotCollectionsRetrieved(KGAPI2::Job *job)
collection.setRemoteId(group->id()); collection.setRemoteId(group->id());
collection.setVirtual(true); collection.setVirtual(true);
EntityDisplayAttribute *attr = collection.attribute<EntityDisplayAttribute>(Collection::AddIfMissing); EntityDisplayAttribute *collAttr = collection.attribute<EntityDisplayAttribute>(Collection::AddIfMissing);
attr->setDisplayName(realName); collAttr->setDisplayName(realName);
attr->setIconName(QStringLiteral("view-pim-contacts")); collAttr->setIconName(QStringLiteral("view-pim-contacts"));
m_collections[ collection.remoteId() ] = collection; m_collections[ collection.remoteId() ] = collection;
} }
......
...@@ -157,8 +157,6 @@ Kolab::Period addLocalPeriod(const QDateTime &eventStart, const QDateTime &event ...@@ -157,8 +157,6 @@ Kolab::Period addLocalPeriod(const QDateTime &eventStart, const QDateTime &event
Q_ASSERT(tmpEnd.isValid()); Q_ASSERT(tmpEnd.isValid());
if (allDay) { if (allDay) {
tmpStart.setTime(QTime(0, 0, 0, 0)); tmpStart.setTime(QTime(0, 0, 0, 0));
}
if (allDay) {
tmpEnd.setTime(QTime(23, 59, 59, 999)); //The window is inclusive tmpEnd.setTime(QTime(23, 59, 59, 999)); //The window is inclusive
} }
return Kolab::Period(Kolab::Conversion::fromDate(tmpStart, allDay), Kolab::Conversion::fromDate(tmpEnd, allDay)); return Kolab::Period(Kolab::Conversion::fromDate(tmpStart, allDay), Kolab::Conversion::fromDate(tmpEnd, allDay));
......
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