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

GIT_SILENT: coding style

parent 88a07ed9
......@@ -37,14 +37,13 @@ void ConflictResolverTest::insertAttendees()
}
}
void ConflictResolverTest::addAttendee(const QString &email, const KCalCore::FreeBusy::Ptr &fb,
KCalCore::Attendee::Role role)
void ConflictResolverTest::addAttendee(const QString &email, const KCalCore::FreeBusy::Ptr &fb, KCalCore::Attendee::Role role)
{
QString name = QStringLiteral("attendee %1").arg(attendees.count());
CalendarSupport::FreeBusyItem::Ptr item(new CalendarSupport::FreeBusyItem(KCalCore::Attendee::Ptr(
new KCalCore::Attendee(name, email, false,
KCalCore::Attendee::Accepted,
role)), nullptr));
new KCalCore::Attendee(name, email, false,
KCalCore::Attendee::Accepted,
role)), nullptr));
item->setFreeBusy(KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(*fb.data())));
attendees << item;
}
......@@ -74,7 +73,7 @@ void ConflictResolverTest::simpleTest()
KCalCore::Period meeting(end.addSecs(-3 * 60 * 60), KCalCore::Duration(2 * 60 * 60));
addAttendee(QStringLiteral("albert@einstein.net"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< meeting)));
<< meeting)));
insertAttendees();
......@@ -105,13 +104,13 @@ void ConflictResolverTest::stillPrettySimpleTest()
KCalCore::Period meeting3(end.addSecs(-3 * 60 * 60), KCalCore::Duration(2 * 60 * 60));
addAttendee(QStringLiteral("john.f@kennedy.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< meeting1 << meeting3)));
<< meeting1 << meeting3)));
addAttendee(QStringLiteral("elvis@rock.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< meeting2 << meeting3)));
<< meeting2 << meeting3)));
addAttendee(QStringLiteral("albert@einstein.net"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< meeting3)));
<< meeting3)));
insertAttendees();
......@@ -136,7 +135,7 @@ void ConflictResolverTest::stillPrettySimpleTest()
QCOMPARE(second.end(), end);
}
#define _time( h, m ) QDateTime( base.date(), QTime( h, m ) )
#define _time(h, m) QDateTime(base.date(), QTime(h, m))
void ConflictResolverTest::akademy2010()
{
......@@ -174,41 +173,41 @@ void ConflictResolverTest::akademy2010()
// adds 80 people (adds the same 8 peopl 10 times)
addAttendee(QStringLiteral("akademyattendee1@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << keynote
<< oviStore << wikimedia
<< direction)));
<< opening << keynote
<< oviStore << wikimedia
<< direction)));
addAttendee(QStringLiteral("akademyattendee2@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << keynote
<< commAsService << highlights
<< pimp)));
<< opening << keynote
<< commAsService << highlights
<< pimp)));
addAttendee(QStringLiteral("akademyattendee3@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << kdeForums
<< styles << pimp << plasma)));
<< opening << kdeForums
<< styles << pimp << plasma)));
addAttendee(QStringLiteral("akademyattendee4@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << keynote
<< oviStore << pimp << blurr)));
<< opening << keynote
<< oviStore << pimp << blurr)));
addAttendee(QStringLiteral("akademyattendee5@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< keynote << oviStore
<< highlights << avalanche)));
<< keynote << oviStore
<< highlights << avalanche)));
addAttendee(QStringLiteral("akademyattendee6@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << keynote
<< commAsService
<< highlights)));
<< opening << keynote
<< commAsService
<< highlights)));
addAttendee(QStringLiteral("akademyattendee7@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << kdeForums
<< styles << avalanche
<< pimp << plasma)));
<< opening << kdeForums
<< styles << avalanche
<< pimp << plasma)));
addAttendee(QStringLiteral("akademyattendee8@email.com"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< opening << keynote
<< oviStore << wikimedia
<< blurr)));
<< opening << keynote
<< oviStore << wikimedia
<< blurr)));
// }
insertAttendees();
......@@ -242,7 +241,7 @@ void ConflictResolverTest::testPeriodIsLargerThenTimeframe()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List())));
......@@ -266,7 +265,7 @@ void ConflictResolverTest::testPeriodBeginsBeforeTimeframeBegins()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List())));
......@@ -293,7 +292,7 @@ void ConflictResolverTest::testPeriodEndsAfterTimeframeEnds()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List())));
......@@ -321,7 +320,7 @@ void ConflictResolverTest::testPeriodEndsAtSametimeAsTimeframe()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalCore::FreeBusy::Ptr(new KCalCore::FreeBusy(KCalCore::Period::List())));
......
......@@ -28,8 +28,7 @@
#include <QObject>
namespace IncidenceEditorNG
{
namespace IncidenceEditorNG {
class ConflictResolver;
}
......@@ -50,8 +49,7 @@ private Q_SLOTS:
private:
void insertAttendees();
void addAttendee(const QString &email, const KCalCore::FreeBusy::Ptr &fb,
KCalCore::Attendee::Role role = KCalCore::Attendee::ReqParticipant);
void addAttendee(const QString &email, const KCalCore::FreeBusy::Ptr &fb, KCalCore::Attendee::Role role = KCalCore::Attendee::ReqParticipant);
QList<CalendarSupport::FreeBusyItem::Ptr> attendees;
QWidget *parent;
IncidenceEditorNG::ConflictResolver *resolver;
......
......@@ -28,10 +28,11 @@ void KTimeZoneComboBoxTest::test_timeSpec()
{
IncidenceEditorNG::KTimeZoneComboBox combo;
combo.selectLocalTimeZone();
if (combo.selectedTimeZone().id() != "UTC")
if (combo.selectedTimeZone().id() != "UTC") {
QCOMPARE(combo.selectedTimeZone(), QTimeZone::systemTimeZone());
else
} else {
QCOMPARE(combo.selectedTimeZone(), QTimeZone::utc());
}
combo.selectTimeZone(QTimeZone());
QCOMPARE(combo.selectedTimeZone(), QTimeZone::systemTimeZone());
......
......@@ -30,7 +30,9 @@ Q_DECLARE_METATYPE(QModelIndex)
/*!
Connect to all of the models signals. Whenever anything happens recheck everything.
*/
ModelTest::ModelTest(QAbstractItemModel *_model, QObject *parent) : QObject(parent), model(_model), fetchingMore(false)
ModelTest::ModelTest(QAbstractItemModel *_model, QObject *parent) : QObject(parent)
, model(_model)
, fetchingMore(false)
{
Q_ASSERT(model);
......@@ -67,7 +69,6 @@ ModelTest::ModelTest(QAbstractItemModel *_model, QObject *parent) : QObject(pare
void ModelTest::runAllTests()
{
// qDebug() << "rats";
if (fetchingMore) {
return;
......@@ -305,7 +306,6 @@ void ModelTest::checkChildren(const QModelIndex &parent, int currentDepth)
int columns = model->columnCount(parent);
if (rows > 0) {
Q_ASSERT(parent.column() <= 0);
Q_ASSERT(model->hasChildren(parent));
}
......@@ -449,9 +449,9 @@ void ModelTest::data()
QVariant checkStateVariant = model->data(model->index(0, 0), Qt::CheckStateRole);
if (checkStateVariant.isValid()) {
int state = checkStateVariant.toInt();
Q_ASSERT(state == Qt::Unchecked ||
state == Qt::PartiallyChecked ||
state == Qt::Checked);
Q_ASSERT(state == Qt::Unchecked
|| state == Qt::PartiallyChecked
|| state == Qt::Checked);
Q_UNUSED(state);
}
}
......@@ -559,7 +559,6 @@ void ModelTest::rowsMoved(const QModelIndex &srcParent, int start, int end, cons
// TODO: Find out what I can assert here about last and next.
// Q_ASSERT ( cd.last == model->data ( model->index ( destinationRow - 1, 0, cd.parent ) ) );
// Q_ASSERT ( cd.next == model->data ( model->index ( destinationRow + (end - start + 1), 0, cd.parent ) ) );
} else {
Q_ASSERT(cd.oldSize + (end - start + 1) == model->rowCount(destParent));
......@@ -578,7 +577,6 @@ void ModelTest::rowsMoved(const QModelIndex &srcParent, int start, int end, cons
qDebug() << cs.next << model->data(model->index(start, 0, srcParent));
Q_ASSERT(cs.next == model->data(model->index(start, 0, srcParent)));
}
}
/*!
......@@ -615,4 +613,3 @@ void ModelTest::rowsRemoved(const QModelIndex &parent, int start, int end)
Q_ASSERT(c.last == model->data(model->index(start - 1, 0, c.parent)));
Q_ASSERT(c.next == model->data(model->index(start, 0, c.parent)));
}
......@@ -87,20 +87,20 @@ void FreeBusyGanttProxyModelTest::testModelValidity()
QModelIndex source_parent0 = fbModel->index(0, 0);
QCOMPARE(parent0.data(), source_parent0.data());
QCOMPARE(parent0.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeMulti);
QCOMPARE(parent0.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeMulti);
QModelIndex source_parent1 = fbModel->index(1, 0);
QCOMPARE(parent1.data(), source_parent1.data());
QCOMPARE(parent1.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeMulti);
QCOMPARE(parent1.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeMulti);
QModelIndex child0_0 = ganttModel->index(0, 0, parent0);
QModelIndex child0_1 = ganttModel->index(1, 0, parent0);
QVERIFY(child0_0.isValid());
QVERIFY(child0_1.isValid());
QCOMPARE(child0_0.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeTask);
QCOMPARE(child0_0.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeTask);
QCOMPARE(child0_0.data(KGantt::StartTimeRole).toDateTime(), dt1);
QCOMPARE(child0_1.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeTask);
QCOMPARE(child0_1.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeTask);
QCOMPARE(child0_1.data(KGantt::StartTimeRole).toDateTime(), dt2);
QModelIndex child1_0 = ganttModel->index(0, 0, parent1);
......@@ -108,8 +108,8 @@ void FreeBusyGanttProxyModelTest::testModelValidity()
QVERIFY(child1_0.isValid());
QVERIFY(child1_1.isValid());
QCOMPARE(child1_0.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeTask);
QCOMPARE(child1_0.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeTask);
QCOMPARE(child1_0.data(KGantt::StartTimeRole).toDateTime(), dt3);
QCOMPARE(child1_1.data(KGantt::ItemTypeRole).toInt(), (int) KGantt::TypeTask);
QCOMPARE(child1_1.data(KGantt::ItemTypeRole).toInt(), (int)KGantt::TypeTask);
QCOMPARE(child1_1.data(KGantt::StartTimeRole).toDateTime(), dt4);
}
......@@ -22,7 +22,7 @@
#include <QObject>
class FreeBusyGanttProxyModelTest: public QObject
class FreeBusyGanttProxyModelTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
......
......@@ -52,8 +52,7 @@ public:
Constructs a new alarm dialog.
@p incidenceType will influence i18n strings, that will be different for to-dos.
*/
explicit AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType,
QWidget *parent = nullptr);
explicit AlarmDialog(KCalCore::Incidence::IncidenceType incidenceType, QWidget *parent = nullptr);
~AlarmDialog();
void load(const KCalCore::Alarm::Ptr &alarm);
void save(const KCalCore::Alarm::Ptr &alarm) const;
......
......@@ -95,7 +95,7 @@ AttachmentEditDialog::AttachmentEditDialog(AttachmentIconItem *item, QWidget *pa
&AttachmentEditDialog::inlineChanged);
connect(mUi->mURLRequester, QOverload<const QUrl &>::of(&KUrlRequester::urlSelected), this, static_cast<void (AttachmentEditDialog::*)(const QUrl &)>(&AttachmentEditDialog:: urlChanged));
connect(mUi->mURLRequester, &KUrlRequester::textChanged, this, static_cast<void (AttachmentEditDialog::*)(const QString &)>(&AttachmentEditDialog::
urlChanged));
urlChanged));
}
AttachmentEditDialog::~AttachmentEditDialog()
......
......@@ -69,9 +69,7 @@ void AttendeeComboBoxDelegate::setStandardIndex(int index)
mStandardIndex = index;
}
QWidget *AttendeeComboBoxDelegate::createEditor(QWidget *parent,
const QStyleOptionViewItem & /* option */,
const QModelIndex & /* index */) const
QWidget *AttendeeComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem & /* option */, const QModelIndex & /* index */) const
{
AttendeeComboBox *editor = new AttendeeComboBox(parent);
......@@ -98,23 +96,19 @@ void AttendeeComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex
comboBox->setCurrentIndex(value);
}
void AttendeeComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
void AttendeeComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
AttendeeComboBox *comboBox = static_cast<AttendeeComboBox *>(editor);
model->setData(index, comboBox->currentIndex(), Qt::EditRole);
comboBox->menu()->close();
}
void AttendeeComboBoxDelegate::updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex & /* index */) const
void AttendeeComboBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex & /* index */) const
{
editor->setGeometry(option.rect);
}
void AttendeeComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const
void AttendeeComboBoxDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QStyleOptionButton myOption;
......@@ -160,9 +154,7 @@ void AttendeeComboBoxDelegate::rightPressed()
static_cast<QWidget *>(QObject::sender()), QAbstractItemDelegate::EditNextItem);
}
bool AttendeeComboBoxDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view,
const QStyleOptionViewItem &option,
const QModelIndex &index)
bool AttendeeComboBoxDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index)
{
if (!event || !view) {
return false;
......
......@@ -40,15 +40,11 @@ class AttendeeComboBoxDelegate : public QStyledItemDelegate
public:
explicit AttendeeComboBoxDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
bool eventFilter(QObject *editor, QEvent *event) override;
......@@ -63,8 +59,7 @@ public:
void setStandardIndex(int);
public Q_SLOTS:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option,
const QModelIndex &index) override;
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
private Q_SLOTS:
void doCloseEditor(QWidget *editor);
......
......@@ -32,9 +32,8 @@ public:
typedef QSharedPointer<AttendeeData> Ptr;
typedef QList<AttendeeData::Ptr> List;
AttendeeData(const QString &name, const QString &email, bool rsvp = false,
Attendee::PartStat status = Attendee::None,
Attendee::Role role = Attendee::ReqParticipant, const QString &uid = QString())
AttendeeData(const QString &name, const QString &email, bool rsvp = false, Attendee::PartStat status = Attendee::None, Attendee::Role role = Attendee::ReqParticipant,
const QString &uid = QString())
: KCalCore::Attendee(name, email, rsvp, status, role, uid)
{
}
......
......@@ -56,8 +56,7 @@ public:
Q_SIGNALS:
void countChanged(int);
void changed(const KCalCore::Attendee::Ptr &oldAttendee,
const KCalCore::Attendee::Ptr &newAttendee);
void changed(const KCalCore::Attendee::Ptr &oldAttendee, const KCalCore::Attendee::Ptr &newAttendee);
void editingFinished(KPIM::MultiplyingLine *);
protected Q_SLOTS:
......
......@@ -122,8 +122,7 @@ public:
Q_SIGNALS:
void changed();
void changed(const KCalCore::Attendee::Ptr &oldAttendee,
const KCalCore::Attendee::Ptr &newAttendee);
void changed(const KCalCore::Attendee::Ptr &oldAttendee, const KCalCore::Attendee::Ptr &newAttendee);
void editingFinished(KPIM::MultiplyingLine *);
private:
......
......@@ -43,8 +43,7 @@ AttendeeLineEditDelegate::AttendeeLineEditDelegate(QObject *parent)
"can be sent to the user if an email address is provided.");
}
QWidget *AttendeeLineEditDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const
QWidget *AttendeeLineEditDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
Q_UNUSED(option);
Q_UNUSED(index);
......@@ -65,16 +64,13 @@ void AttendeeLineEditDelegate::setEditorData(QWidget *editor, const QModelIndex
lineedit->setText(index.model()->data(index, Qt::EditRole).toString());
}
void AttendeeLineEditDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const
void AttendeeLineEditDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
AttendeeLineEdit *lineedit = static_cast<AttendeeLineEdit *>(editor);
model->setData(index, lineedit->text(), Qt::EditRole);
}
void AttendeeLineEditDelegate::updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
const QModelIndex &index) const
void AttendeeLineEditDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
Q_UNUSED(index);
editor->setGeometry(option.rect);
......@@ -97,9 +93,7 @@ void AttendeeLineEditDelegate::setCompletionMode(KCompletion::CompletionMode mod
mCompletionMode = mode;
}
bool AttendeeLineEditDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view,
const QStyleOptionViewItem &option,
const QModelIndex &index)
bool AttendeeLineEditDelegate::helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index)
{
if (!event || !view) {
return false;
......
......@@ -37,19 +37,15 @@ class AttendeeLineEditDelegate : public QStyledItemDelegate
public:
explicit AttendeeLineEditDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
virtual void setCompletionMode(KCompletion::CompletionMode mode);
public Q_SLOTS:
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option,
const QModelIndex &index) override;
bool helpEvent(QHelpEvent *event, QAbstractItemView *view, const QStyleOptionViewItem &option, const QModelIndex &index) override;
private:
void rightPressed();
......
......@@ -288,8 +288,7 @@ ResourceFilterProxyModel::ResourceFilterProxyModel(QObject *parent)
{
}
bool ResourceFilterProxyModel::filterAcceptsRow(int sourceRow,
const QModelIndex &sourceParent) const
bool ResourceFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
sourceParent);
......@@ -304,8 +303,7 @@ AttendeeFilterProxyModel::AttendeeFilterProxyModel(QObject *parent)
{
}
bool AttendeeFilterProxyModel::filterAcceptsRow(int sourceRow,
const QModelIndex &sourceParent) const
bool AttendeeFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
{
QModelIndex cuTypeIndex = sourceModel()->index(sourceRow, AttendeeTableModel::CuType,
sourceParent);
......
......@@ -55,14 +55,12 @@ public:
Tentative
};
explicit AttendeeTableModel(const KCalCore::Attendee::List &resources,
QObject *parent = nullptr);
explicit AttendeeTableModel(const KCalCore::Attendee::List &resources, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
......
......@@ -145,8 +145,7 @@ void AutoCheckTreeWidget::slotRowsInserted(const QModelIndex &parent, int start,
}
}
void AutoCheckTreeWidget::slotDataChanged(const QModelIndex &topLeft,
const QModelIndex &bottomRight)
void AutoCheckTreeWidget::slotDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
if (!d->mAutoCheckChildren) {
return;
......
......@@ -38,8 +38,7 @@ class CategoryEditDialog : public QDialog
{
Q_OBJECT
public:
explicit CategoryEditDialog(CalendarSupport::CategoryConfig *categoryConfig,
QWidget *parent = nullptr);
explicit CategoryEditDialog(CalendarSupport::CategoryConfig *categoryConfig, QWidget *parent = nullptr);
~CategoryEditDialog();
......
......@@ -36,8 +36,7 @@ class CategorySelectWidget : public QWidget
{
Q_OBJECT
public:
explicit CategorySelectWidget(CalendarSupport::CategoryConfig *config,
QWidget *parent = nullptr);
explicit CategorySelectWidget(CalendarSupport::CategoryConfig *config, QWidget *parent = nullptr);
~CategorySelectWidget();
void setCategories(const QStringList &categoryList = QStringList());
......
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