Commit 0e0c6bf5 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Add the rest of the clazy fixes from release/20.12

parent 2dc260e5
Pipeline #54046 passed with stage
in 7 minutes and 33 seconds
......@@ -188,7 +188,7 @@ QUrl AttachmentIconItem::tempFileForAttachment()
return mTempFile;
}
QMimeData *AttachmentIconView::mimeData(const QList<QListWidgetItem *> items) const
QMimeData *AttachmentIconView::mimeData(const QList<QListWidgetItem *> items) const // clazy:exclude=function-args-by-ref
{
// create a list of the URL:s that we want to drag
QList<QUrl> urls;
......
......@@ -57,7 +57,7 @@ void AttendeeEditor::slotCalculateTotal()
AttendeeData::List AttendeeEditor::attendees() const
{
const QVector<KPIM::MultiplyingLineData::Ptr> dataList = allData();
AttendeeData::List attList;
AttendeeData::List attList; // clazy:exclude=inefficient-qlist
// qCDebug(INCIDENCEEDITOR_LOG) << "num attendees:" << dataList.size();
for (const KPIM::MultiplyingLineData::Ptr &datum : dataList) {
AttendeeData::Ptr att = qSharedPointerDynamicCast<AttendeeData>(datum);
......
......@@ -81,17 +81,15 @@ bool AttendeeLineEditDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *v
}
switch (event->type()) {
#ifndef QT_NO_TOOLTIP
case QEvent::ToolTip: {
auto he = static_cast<QHelpEvent *>(event);
QToolTip::showText(he->globalPos(), mToolTip, view);
case QEvent::ToolTip:
QToolTip::showText(event->globalPos(), mToolTip, view);
return true;
#endif
#ifndef QT_NO_WHATSTHIS
case QEvent::QueryWhatsThis:
return true;
case QEvent::WhatsThis: {
auto he = static_cast<QHelpEvent *>(event);
QWhatsThis::showText(he->globalPos(), mWhatsThis, view);
case QEvent::WhatsThis:
QWhatsThis::showText(event->globalPos(), mWhatsThis, view);
return true;
#endif
default:
......
......@@ -318,7 +318,7 @@ void EditorItemManager::save()
Q_ASSERT(d->mItem.parentCollection().isValid());
KCalendarCore::Incidence::Ptr oldPayload = CalendarSupport::incidence(d->mPrevItem);
if (d->mItem.parentCollection() == d->mItemUi->selectedCollection() || d->mItem.storageCollectionId() == d->mItemUi->selectedCollection().id()) {
d->mChanger->modifyIncidence(d->mItem, oldPayload);
(void) d->mChanger->modifyIncidence(d->mItem, oldPayload);
} else {
Q_ASSERT(d->mItemUi->selectedCollection().isValid());
Q_ASSERT(d->mItem.parentCollection().isValid());
......
......@@ -117,7 +117,7 @@ IncidenceAttendee::IncidenceAttendee(QWidget *parent, IncidenceDateTime *dateTim
connect(mConflictResolver, &ConflictResolver::conflictsDetected, this, &IncidenceAttendee::slotUpdateConflictLabel);
connect(mConflictResolver->model(), &QAbstractItemModel::rowsInserted, this, &IncidenceAttendee::slotFreeBusyAdded);
connect(mConflictResolver->model(), SIGNAL(layoutChanged()), SLOT(updateFBStatus()));
connect(mConflictResolver->model(), &QAbstractItemModel::layoutChanged, this, qOverload<>(&IncidenceAttendee::updateFBStatus));
connect(mConflictResolver->model(), &QAbstractItemModel::dataChanged, this, &IncidenceAttendee::slotFreeBusyChanged);
slotUpdateConflictLabel(0); // initialize label
......
......@@ -155,11 +155,11 @@ void ResourceModel::startSearch()
if (mLdapCollections.contains(mRootItem->child(i))) {
QModelIndex parentIndex = index(i, 0, QModelIndex());
beginRemoveRows(parentIndex, 0, mRootItem->child(i)->childCount() - 1);
mRootItem->child(i)->removeChildren(0, mRootItem->child(i)->childCount());
(void) mRootItem->child(i)->removeChildren(0, mRootItem->child(i)->childCount());
endRemoveRows();
} else {
beginRemoveRows(QModelIndex(), i, i);
mRootItem->removeChildren(i, 1);
(void) mRootItem->removeChildren(i, 1);
endRemoveRows();
}
}
......@@ -185,7 +185,7 @@ void ResourceModel::slotLDAPCollectionData(const KLDAP::LdapResultObject::List &
ResourceItem::Ptr item(new ResourceItem(result.object.dn(), mHeaders, *result.client, mRootItem));
item->setLdapObject(result.object);
mRootItem->insertChild(mRootItem->childCount(), item);
(void) mRootItem->insertChild(mRootItem->childCount(), item);
mLdapCollections.insert(item);
// Resources in a collection add this link into ldapCollectionsMap
......
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