Commit 4fe045eb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: coding style

parent ae759ca0
......@@ -41,8 +41,8 @@ void ConflictResolverTest::addAttendee(const QString &email, const KCalendarCore
{
QString name = QStringLiteral("attendee %1").arg(attendees.count());
CalendarSupport::FreeBusyItem::Ptr item(new CalendarSupport::FreeBusyItem(KCalendarCore::Attendee(name, email, false,
KCalendarCore::Attendee::Accepted,
role), nullptr));
KCalendarCore::Attendee::Accepted,
role), nullptr));
item->setFreeBusy(KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(*fb.data())));
attendees << item;
}
......@@ -72,7 +72,7 @@ void ConflictResolverTest::simpleTest()
KCalendarCore::Period meeting(end.addSecs(-3 * 60 * 60), KCalendarCore::Duration(2 * 60 * 60));
addAttendee(QStringLiteral("albert@einstein.net"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< meeting)));
<< meeting)));
insertAttendees();
......@@ -103,13 +103,13 @@ void ConflictResolverTest::stillPrettySimpleTest()
KCalendarCore::Period meeting3(end.addSecs(-3 * 60 * 60), KCalendarCore::Duration(2 * 60 * 60));
addAttendee(QStringLiteral("john.f@kennedy.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< meeting1 << meeting3)));
<< meeting1 << meeting3)));
addAttendee(QStringLiteral("elvis@rock.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< meeting2 << meeting3)));
<< meeting2 << meeting3)));
addAttendee(QStringLiteral("albert@einstein.net"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< meeting3)));
<< meeting3)));
insertAttendees();
......@@ -172,41 +172,41 @@ void ConflictResolverTest::akademy2010()
// adds 80 people (adds the same 8 peopl 10 times)
addAttendee(QStringLiteral("akademyattendee1@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << keynote
<< oviStore << wikimedia
<< direction)));
<< opening << keynote
<< oviStore << wikimedia
<< direction)));
addAttendee(QStringLiteral("akademyattendee2@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << keynote
<< commAsService << highlights
<< pimp)));
<< opening << keynote
<< commAsService << highlights
<< pimp)));
addAttendee(QStringLiteral("akademyattendee3@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << kdeForums
<< styles << pimp << plasma)));
<< opening << kdeForums
<< styles << pimp << plasma)));
addAttendee(QStringLiteral("akademyattendee4@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << keynote
<< oviStore << pimp << blurr)));
<< opening << keynote
<< oviStore << pimp << blurr)));
addAttendee(QStringLiteral("akademyattendee5@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< keynote << oviStore
<< highlights << avalanche)));
<< keynote << oviStore
<< highlights << avalanche)));
addAttendee(QStringLiteral("akademyattendee6@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << keynote
<< commAsService
<< highlights)));
<< opening << keynote
<< commAsService
<< highlights)));
addAttendee(QStringLiteral("akademyattendee7@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << kdeForums
<< styles << avalanche
<< pimp << plasma)));
<< opening << kdeForums
<< styles << avalanche
<< pimp << plasma)));
addAttendee(QStringLiteral("akademyattendee8@email.com"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< opening << keynote
<< oviStore << wikimedia
<< blurr)));
<< opening << keynote
<< oviStore << wikimedia
<< blurr)));
// }
insertAttendees();
......@@ -240,7 +240,7 @@ void ConflictResolverTest::testPeriodIsLargerThenTimeframe()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List())));
......@@ -264,7 +264,7 @@ void ConflictResolverTest::testPeriodBeginsBeforeTimeframeBegins()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List())));
......@@ -291,7 +291,7 @@ void ConflictResolverTest::testPeriodEndsAfterTimeframeEnds()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List())));
......@@ -319,7 +319,7 @@ void ConflictResolverTest::testPeriodEndsAtSametimeAsTimeframe()
addAttendee(QStringLiteral("kdabtest1@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List()
<< testEvent)));
<< testEvent)));
addAttendee(QStringLiteral("kdabtest2@demo.kolab.org"),
KCalendarCore::FreeBusy::Ptr(new KCalendarCore::FreeBusy(KCalendarCore::Period::List())));
......
......@@ -32,8 +32,7 @@ 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())
: KCalendarCore::Attendee(name, email, rsvp, status, role, uid)
{
}
......
......@@ -40,7 +40,7 @@ void AttendeeEditor::slotLineAdded(KPIM::MultiplyingLine *line)
}
connect(att, qOverload<>(&AttendeeLine::changed), this, &AttendeeEditor::slotCalculateTotal);
connect(att, qOverload<const KCalendarCore::Attendee&, const KCalendarCore::Attendee&>(&AttendeeLine:: changed), this, &AttendeeEditor::changed);
connect(att, qOverload<const KCalendarCore::Attendee &, const KCalendarCore::Attendee &>(&AttendeeLine:: changed), this, &AttendeeEditor::changed);
connect(att, &AttendeeLine::editingFinished, this, &AttendeeEditor::editingFinished);
}
......
......@@ -66,7 +66,7 @@ ConflictResolver::ConflictResolver(QWidget *parentWidget, QObject *parent)
mCalculateTimer.setSingleShot(true);
}
void ConflictResolver::insertAttendee(const KCalendarCore::Attendee&attendee)
void ConflictResolver::insertAttendee(const KCalendarCore::Attendee &attendee)
{
if (!mFBModel->containsAttendee(attendee)) {
mFBModel->addItem(CalendarSupport::FreeBusyItem::Ptr(new CalendarSupport::FreeBusyItem(
......
......@@ -353,8 +353,8 @@ void EditorItemManager::save()
// ETM and the KSelectionProxyModel has a bug wrt collections moves, so this is disabled.
// To test this, enable the collection combo-box and remove the following assert.
qCDebug(INCIDENCEEDITOR_LOG) << "Moving from"
<< d->mItem.parentCollection().id() << "to"
<< d->mItemUi->selectedCollection().id();
<< d->mItem.parentCollection().id() << "to"
<< d->mItemUi->selectedCollection().id();
if (d->mItemUi->isDirty()) {
d->mChanger->modifyIncidence(d->mItem, oldPayload);
......
......@@ -39,8 +39,8 @@ void GroupwareUiDelegate::requestIncidenceEditor(const Akonadi::Item &item)
}
IncidenceDialog *dialog = IncidenceDialogFactory::create(/*needs initial saving=*/ false,
incidence->type(),
nullptr);
incidence->type(),
nullptr);
dialog->setAttribute(Qt::WA_DeleteOnClose, false);
dialog->setIsCounterProposal(true);
dialog->load(item, QDate::currentDate());
......
......@@ -454,10 +454,10 @@ void IncidenceAttendee::expandResult(KJob *job)
dataModel()->removeRow(row);
for (const KContacts::Addressee &member : groupMembers) {
KCalendarCore::Attendee newAt(member.realName(), member.preferredEmail(),
attendee.RSVP(),
attendee.status(),
attendee.role(),
member.uid());
attendee.RSVP(),
attendee.status(),
attendee.role(),
member.uid());
dataModel()->insertAttendee(row, newAt);
}
}
......@@ -488,8 +488,8 @@ void IncidenceAttendee::slotSelectAddresses()
for (const Akonadi::EmailAddressSelection &selection : list) {
if (selection.item().hasPayload<KContacts::ContactGroup>()) {
Akonadi::ContactGroupExpandJob *job
= new Akonadi::ContactGroupExpandJob(
selection.item().payload<KContacts::ContactGroup>(), this);
= new Akonadi::ContactGroupExpandJob(
selection.item().payload<KContacts::ContactGroup>(), this);
connect(job, &Akonadi::ContactGroupExpandJob::result, this,
&IncidenceAttendee::expandResult);
KCalendarCore::Attendee::PartStat partStat = KCalendarCore::Attendee::NeedsAction;
......@@ -497,10 +497,10 @@ void IncidenceAttendee::slotSelectAddresses()
int pos = 0;
KCalendarCore::Attendee newAt(selection.name(),
selection.email(),
rsvp,
partStat,
KCalendarCore::Attendee::ReqParticipant);
selection.email(),
rsvp,
partStat,
KCalendarCore::Attendee::ReqParticipant);
dataModel()->insertAttendee(pos, newAt);
mExpandGroupJobs.insert(job, newAt.uid());
......@@ -811,10 +811,10 @@ void IncidenceAttendee::insertAttendeeFromAddressee(const KContacts::Addressee &
rsvp = false;
}
KCalendarCore::Attendee newAt(a.realName(), a.preferredEmail(),
rsvp,
partStat,
KCalendarCore::Attendee::ReqParticipant,
a.uid());
rsvp,
partStat,
KCalendarCore::Attendee::ReqParticipant,
a.uid());
if (pos < 0) {
pos = dataModel()->rowCount() - 1;
}
......@@ -886,10 +886,10 @@ void IncidenceAttendee::slotOrganizerChanged(const QString &newOrganizer)
if (newOrganizerAttendee == -1) {
bool rsvp = !iAmOrganizer(); // if it is the user, don't make him rsvp.
KCalendarCore::Attendee::PartStat status = iAmOrganizer() ? KCalendarCore::Attendee::Accepted
: KCalendarCore::Attendee::NeedsAction;
: KCalendarCore::Attendee::NeedsAction;
KCalendarCore::Attendee newAt(name, email, rsvp, status,
KCalendarCore::Attendee::ReqParticipant);
KCalendarCore::Attendee::ReqParticipant);
mDataModel->insertAttendee(mDataModel->rowCount(), newAt);
}
......
......@@ -826,9 +826,9 @@ void IncidenceDateTime::updateStartToolTips()
if (mUi->mStartCheck->isChecked()) {
QString datetimeStr
= KCalUtils::IncidenceFormatter::dateTimeToString(
currentStartDateTime(),
mUi->mWholeDayCheck->isChecked(),
false);
currentStartDateTime(),
mUi->mWholeDayCheck->isChecked(),
false);
mUi->mStartDateEdit->setToolTip(i18n("Starts: %1", datetimeStr));
mUi->mStartTimeEdit->setToolTip(i18n("Starts: %1", datetimeStr));
} else {
......@@ -842,9 +842,9 @@ void IncidenceDateTime::updateEndToolTips()
if (mUi->mStartCheck->isChecked()) {
QString datetimeStr
= KCalUtils::IncidenceFormatter::dateTimeToString(
currentEndDateTime(),
mUi->mWholeDayCheck->isChecked(),
false);
currentEndDateTime(),
mUi->mWholeDayCheck->isChecked(),
false);
if (mLoadedIncidence->type() == KCalendarCore::Incidence::TypeTodo) {
mUi->mEndDateEdit->setToolTip(i18n("Due on: %1", datetimeStr));
mUi->mEndTimeEdit->setToolTip(i18n("Due on: %1", datetimeStr));
......
......@@ -584,8 +584,8 @@ void IncidenceDialogPrivate::load(const Akonadi::Item &item)
if (incidence->attendeeCount() > 1 // >1 because you won't drink alone
&& !me.isNull() && (me.status() == KCalendarCore::Attendee::NeedsAction
|| me.status() == KCalendarCore::Attendee::Tentative
|| me.status() == KCalendarCore::Attendee::InProcess)) {
|| me.status() == KCalendarCore::Attendee::Tentative
|| me.status() == KCalendarCore::Attendee::InProcess)) {
// Show the invitation bar: "You are invited [accept] [decline]"
mUi->mInvitationBar->show();
} else {
......
......@@ -49,8 +49,7 @@ IncidenceDialog *IncidenceDialogFactory::create(bool needsSaving, KCalendarCore:
}
}
IncidenceDialog *IncidenceDialogFactory::createTodoEditor(const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees,
const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment,
IncidenceDialog *IncidenceDialogFactory::createTodoEditor(const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment,
const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTempFiles, QWidget *parent, Qt::WindowFlags flags)
{
IncidenceDefaults defaults
......@@ -79,8 +78,7 @@ IncidenceDialog *IncidenceDialogFactory::createTodoEditor(const QString &summary
return dialog;
}
IncidenceDialog *IncidenceDialogFactory::createEventEditor(const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees,
const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment,
IncidenceDialog *IncidenceDialogFactory::createEventEditor(const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment,
const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTempFiles, QWidget *parent, Qt::WindowFlags flags)
{
IncidenceDefaults defaults
......
......@@ -52,12 +52,12 @@ INCIDENCEEDITOR_EXPORT IncidenceDialog *create(
bool needsSaving, KCalendarCore::IncidenceBase::IncidenceType type, Akonadi::IncidenceChanger *changer, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
INCIDENCEEDITOR_EXPORT IncidenceDialog *createTodoEditor(
const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels,
bool inlineAttachment, const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTemp, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment, const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTemp,
QWidget *parent = nullptr, Qt::WindowFlags flags = {});
INCIDENCEEDITOR_EXPORT IncidenceDialog *createEventEditor(
const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels,
bool inlineAttachment, const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTempFiles, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
const QString &summary, const QString &description, const QStringList &attachments, const QStringList &attendees, const QStringList &attachmentMimetypes, const QStringList &attachmentLabels, bool inlineAttachment, const Akonadi::Collection &defaultCollection, bool cleanupAttachmentTempFiles,
QWidget *parent = nullptr, Qt::WindowFlags flags = {});
} // namespace IncidenceDialogFactory
} // namespace IncidenceEditorNG
......
......@@ -120,7 +120,7 @@ void IndividualMessageQueueJob::startComposerJob(const QStringList &to, const QS
{
mComposerJob
= new OpenComposerJob(this, to.join(QLatin1String(", ")), cc.join(QLatin1String(
", ")),
", ")),
QString(), message(), mIdentity);
connect(mComposerJob, &OpenComposerJob::finished, this,
&IndividualMessageQueueJob::handleJobFinished);
......
......@@ -55,7 +55,7 @@ public:
private:
void updateButtonState();
std::vector<std::pair<KCalendarCore::Attendee, QComboBox*>> mAttendeeDecision;
std::vector<std::pair<KCalendarCore::Attendee, QComboBox *> > mAttendeeDecision;
QDialogButtonBox *m_buttons = nullptr;
QWidget *m_detailsWidget = nullptr;
};
......
......@@ -225,9 +225,9 @@ VisualFreeBusyWidget::VisualFreeBusyWidget(CalendarSupport::FreeBusyItemModel *m
mLeftView->setHeader(new GanttHeaderView);
mLeftView->header()->setStretchLastSection(true);
mLeftView->setToolTip(i18nc("@info:tooltip",
"Shows the tree list of all data"));
"Shows the tree list of all data"));
mLeftView->setWhatsThis(i18nc("@info:whatsthis",
"Shows the tree list of all data"));
"Shows the tree list of all data"));
mLeftView->setRootIsDecorated(false);
mLeftView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
mLeftView->setContextMenuPolicy(Qt::CustomContextMenu);
......
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