Commit 28b3cd1d authored by Yuri Chornoivan's avatar Yuri Chornoivan
Browse files

Fix minor typos and EBN issues

parent 040518ad
......@@ -66,7 +66,7 @@ private Q_SLOTS:
QVERIFY(dialog.updateAttendees().contains(attendee2));
QVERIFY(dialog.updateAttendees().contains(attendee3));
// edit for frist attende, other default
// edit for first attendee, other default
first->setCurrentIndex(2);
QCOMPARE(dialog.editAttendees().count(), 1);
QCOMPARE(dialog.updateAttendees().count(), 2);
......
......@@ -52,7 +52,7 @@ AttachmentIconItem::AttachmentIconItem(const KCalCore::Attachment::Ptr &att, QLi
mAttachment = KCalCore::Attachment::Ptr(new KCalCore::Attachment(*att.data()));
mAttachment->setLabel(att->label());
} else {
// for the enteprise, inline attachments are the default
// for the enterprise, inline attachments are the default
#ifdef KDEPIM_ENTERPRISE_BUILD
mAttachment
= KCalCore::Attachment::Ptr(
......
......@@ -123,7 +123,7 @@ bool AttendeeTableModel::setData(const QModelIndex &index, const QVariant &value
case FullName:
if (mRemoveEmptyLines && value.toString().trimmed().isEmpty()) {
// Do not remove last empty line if mKeepEmpty==true
// (only works if initaly there is only one empty line)
// (only works if initially there is only one empty line)
if (!mKeepEmpty || !(attendee->name().isEmpty() && attendee->email().isEmpty())) {
removeRows(index.row(), 1);
return true;
......
......@@ -53,7 +53,7 @@ public:
Q_REQUIRED_RESULT bool isValid() const override;
/**
* Loads all data from @param inicidence into the combined editors. Note, if
* Loads all data from @param incidence into the combined editors. Note, if
* you reimplement the load method in a subclass, make sure to call this
* implementation too.
*/
......
......@@ -243,7 +243,7 @@ void ConflictResolver::findAllFreeSlots()
// 1. convert each attendees schedule for the timeframe into a bitarray according to
// the time resolution, where each time slot has a value of 1 = busy, 0 = free.
// 2. align the arrays vertically, and sum the columns
// 3. the resulting summation indcates # of conflicts at each timeslot
// 3. the resulting summation indicates # of conflicts at each timeslot
// 4. locate contiguous timeslots with a values of 0. these are the free time blocks.
// define these locally for readability
......@@ -275,7 +275,7 @@ void ConflictResolver::findAllFreeSlots()
<< "; mSlotResolutionSeconds = " << mSlotResolutionSeconds
<< "; range = " << range;
// filter out attendees for which we don't have FB data
// and which don't match the mandatory role contrstaint
// and which don't match the mandatory role constraint
QList<KCalCore::FreeBusy::Ptr> filteredFBItems;
for (int i = 0; i < mFBModel->rowCount(); ++i) {
QModelIndex index = mFBModel->index(i);
......@@ -303,7 +303,7 @@ void ConflictResolver::findAllFreeSlots()
}
qCDebug(INCIDENCEEDITOR_LOG) << "num attendees: " << number_attendees;
// this is a 2 dimensional array where the rows are attendees
// and the columns are 0 or 1 denoting freee or busy respectively.
// and the columns are 0 or 1 denoting free or busy respectively.
QVector< QVector<int> > fbTable;
// Explanation of the following loop:
......@@ -411,7 +411,7 @@ void ConflictResolver::findAllFreeSlots()
} else {
free_start_i = i - free_count;
free_end_i = i - 1 + 1; // add one to compensate for the fact that the array is 0 indexed
// compiler will optmize out the -1+1, but I leave it here to make the reasoning apparent.
// compiler will optimize out the -1+1, but I leave it here to make the reasoning apparent.
}
// convert from our timeslot interval back into to normal seconds
// then calculate the date times of the free block based on
......
......@@ -38,8 +38,8 @@ class ItemEditorPrivate;
/**
* Helper class for creating dialogs that let the user create and edit the payload
* of Akonadi items (e.g. events, contacts, etc). This class supports editting of
* one item at a time and hanldes all Akonadi specific logic like Item creation,
* of Akonadi items (e.g. events, contacts, etc). This class supports editing of
* one item at a time and handles all Akonadi specific logic like Item creation,
* Item modifying and monitoring of changes to the item during editing.
*/
// template <typename PayloadT>
......@@ -171,13 +171,13 @@ public:
virtual Akonadi::Item save(const Akonadi::Item &item) = 0;
/**
* Returns the currently sellected collection in which the item will be stored.
* Returns the currently selected collection in which the item will be stored.
*/
virtual Akonadi::Collection selectedCollection() const = 0;
/**
* This function is called if for some reason the creation or editting of the
* item cannot be continued. The implementing class must abort editting at
* This function is called if for some reason the creation or editing of the
* item cannot be continued. The implementing class must abort editing at
* this point.
*/
virtual void reject(RejectReason reason, const QString &errorMessage = QString()) = 0;
......
......@@ -54,7 +54,7 @@ QVariant FreeBusyGanttProxyModel::data(const QModelIndex &index, int role) const
}
}
// if the index is valid, then it corrsponds to a free busy period
// if the index is valid, then it corresponds to a free busy period
KCalCore::FreeBusyPeriod period
= sourceModel()->data(source_index, CalendarSupport::FreeBusyItemModel::FreeBusyPeriodRole).
value<KCalCore::FreeBusyPeriod>();
......
......@@ -84,6 +84,10 @@ FreeBusyUrlWidget::FreeBusyUrlWidget(const AttendeeData::Ptr &attendee, QWidget
mUrlEdit = new KLineEdit(this);
mUrlEdit->setFocus();
mUrlEdit->setWhatsThis(i18nc("@info:whatsthis",
"Enter the location of the Free/Busy information for the attendee."));
mUrlEdit->setToolTip(i18nc("@info:tooltip",
"Enter the location of the information."));
topLayout->addWidget(mUrlEdit);
}
......
......@@ -330,7 +330,7 @@ QString IncidenceAlarm::stringForAlarm(const KCalCore::Alarm::Ptr &alarm)
if (alarm->enabled()) {
if (useoffset > 0 && alarm->hasStartOffset()) {
if (mIsTodo) {
// i18n: These series of strings are used to show the user a describtion of
// i18n: These series of strings are used to show the user a description of
// the alarm. %1 is replaced by one of the actions above, %2 is replaced by
// one of the time units above, %3 is the (Repeats) part that will be used
// in case of repetition of the alarm.
......
......@@ -153,7 +153,7 @@ IncidenceAttendee::IncidenceAttendee(QWidget *parent, IncidenceDateTime *dateTim
slotUpdateConflictLabel(0); //initialize label
// confict resolver (should show also resources)
// conflict resolver (should show also resources)
connect(mDataModel, &AttendeeTableModel::layoutChanged, this,
&IncidenceAttendee::slotConflictResolverLayoutChanged);
connect(mDataModel, &AttendeeTableModel::rowsAboutToBeRemoved, this,
......@@ -650,8 +650,8 @@ void IncidenceAttendee::updateFBStatus(const KCalCore::Attendee::Ptr &attendee,
if (fb) {
KCalCore::Period::List busyPeriods = fb->busyPeriods();
for (auto it = busyPeriods.begin(); it != busyPeriods.end(); ++it) {
// periods started before and laping into the incidence (s < startTime && e >= startTime)
// periods starting in the time of incidende (s >= startTime && s <= endTime)
// periods started before and lapping into the incidence (s < startTime && e >= startTime)
// periods starting in the time of incidence (s >= startTime && s <= endTime)
if (((*it).start() < startTime && (*it).end() > startTime)
|| ((*it).start() >= startTime && (*it).start() <= endTime)) {
switch (attendee->status()) {
......
......@@ -58,7 +58,7 @@ private:
/**
* List of categories for which no tag might exist.
*
* For each category of the editted incidence, we want to make sure that there exists a
* For each category of the edited incidence, we want to make sure that there exists a
* corresponding tag in Akonadi. For missing categories, a \a TagCreateJob is issued.
* Eventually, there should be no missing categories left. In case tag creation fails for some
* categories, this list still holds these categories so they don't get lost
......
......@@ -114,16 +114,16 @@ bool IncidenceDateTime::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::FocusIn) {
if (obj == mUi->mStartDateEdit) {
qCDebug(INCIDENCEEDITOR_LOG) << "emiting startDateTime: " << mUi->mStartDateEdit;
qCDebug(INCIDENCEEDITOR_LOG) << "emitting startDateTime: " << mUi->mStartDateEdit;
Q_EMIT startDateFocus(obj);
} else if (obj == mUi->mEndDateEdit) {
qCDebug(INCIDENCEEDITOR_LOG) << "emiting endDateTime: " << mUi->mEndDateEdit;
qCDebug(INCIDENCEEDITOR_LOG) << "emitting endDateTime: " << mUi->mEndDateEdit;
Q_EMIT endDateFocus(obj);
} else if (obj == mUi->mStartTimeEdit) {
qCDebug(INCIDENCEEDITOR_LOG) << "emiting startTimeTime: " << mUi->mStartTimeEdit;
qCDebug(INCIDENCEEDITOR_LOG) << "emitting startTimeTime: " << mUi->mStartTimeEdit;
Q_EMIT startTimeFocus(obj);
} else if (obj == mUi->mEndTimeEdit) {
qCDebug(INCIDENCEEDITOR_LOG) << "emiting endTimeTime: " << mUi->mEndTimeEdit;
qCDebug(INCIDENCEEDITOR_LOG) << "emitting endTimeTime: " << mUi->mEndTimeEdit;
Q_EMIT endTimeFocus(obj);
}
......
......@@ -90,7 +90,7 @@ public:
/**
Sets the default values for @param incidence. This method is merely meant for
<em>new</em> icidences. However, it will clear out all fields and set them
<em>new</em> incidences. However, it will clear out all fields and set them
to default values.
@param incidence The incidence that will get default values for all of its field.
*/
......
......@@ -105,7 +105,7 @@ bool IncidenceDescription::isDirty() const
with the new editor content.
Instead we compare the new editor content, with the original editor content, this way
any tranformation regarding non-printable chars will be irrelevant.
any transformation regarding non-printable chars will be irrelevant.
*/
if (d->mRichTextEnabled) {
return !mLoadedIncidence->descriptionIsRich()
......@@ -122,11 +122,11 @@ void IncidenceDescription::enableRichTextDescription(bool enable)
{
d->mRichTextEnabled = enable;
QString rt(i18nc("@action Enable or disable rich text editting", "Enable rich text"));
QString rt(i18nc("@action Enable or disable rich text editing", "Enable rich text"));
QString placeholder(QStringLiteral("<a href=\"show\">%1 &gt;&gt;</a>"));
if (enable) {
rt = i18nc("@action Enable or disable rich text editting", "Disable rich text");
rt = i18nc("@action Enable or disable rich text editing", "Disable rich text");
placeholder = QStringLiteral("<a href=\"show\">&lt;&lt; %1</a>");
mUi->mDescriptionEdit->richTextComposer()->activateRichText();
d->mRealOriginalDescriptionEditContents
......
......@@ -49,7 +49,7 @@ public:
void save(const KCalCore::Incidence::Ptr &incidence) override;
Q_REQUIRED_RESULT bool isDirty() const override;
// For debugging pursposes
// For debugging purposes
Q_REQUIRED_RESULT bool richTextEnabled() const;
void printDebugInfo() const override;
......
......@@ -511,7 +511,7 @@ void IncidenceDialogPrivate::handleItemSaveFinish(EditorItemManager::SaveAction
Q_ASSERT(item.isValid());
Q_ASSERT(item.hasPayload());
Q_ASSERT(item.hasPayload<KCalCore::Incidence::Ptr>());
// Now the item is succesfull saved, reload it in the editor in order to
// Now the item is successfully saved, reload it in the editor in order to
// reset the dirty status of the editor.
mEditor->load(item.payload<KCalCore::Incidence::Ptr>());
mEditor->load(item);
......@@ -823,7 +823,7 @@ void IncidenceDialog::slotButtonClicked(QAbstractButton *button)
QDialog::reject(); // Discard current changes
} else if (!d->isDirty()) {
QDialog::reject(); // No pending changes, just close the dialog.
} // else { // the user wasn't finished editting after all }
} // else { // the user wasn't finished editing after all }
} else if (d->mUi->buttonBox->button(QDialogButtonBox::RestoreDefaults)) {
d->manageTemplates();
} else {
......
......@@ -37,7 +37,7 @@ namespace IncidenceDialogFactory {
/**
* Creates a new IncidenceDialog for given type. Returns 0 for unsupported types.
*
* @param needsSaving If true, the editor will be initialy dirty, and needs saving.
* @param needsSaving If true, the editor will be initially dirty, and needs saving.
* Apply button will be turned on. This is used for example when
* we fill the editor with data that's not yet in akonadi, like
* the "Create To-do/Reminder" in KMail.
......
......@@ -47,7 +47,7 @@ public:
virtual void load(const Akonadi::Item &item);
/**
* Store the current values of the editor into @param incidince.
* Store the current values of the editor into @param incidence .
*/
virtual void save(const KCalCore::Incidence::Ptr &incidence) = 0;
/// This was introduced to replace categories with Akonadi::Tags
......
......@@ -760,7 +760,7 @@ void IncidenceRecurrence::selectMonthlyItem(KCalCore::Recurrence *recurrence, us
if (rmp.first().pos() > 0) { // nth day
// TODO if ( rmp.first().pos() != mDateTime->startDate().day() ) { warn user }
// NOTE: This silencly changes the recurrence when:
// NOTE: This silently changes the recurrence when:
// rmp.first().pos() != mDateTime->startDate().day()
mUi->mMonthlyCombo->setCurrentIndex(ComboIndexMonthlyPos);
} else { // (month.last() - n)th day
......
......@@ -49,7 +49,7 @@ public:
void save(const KCalCore::Incidence::Ptr &incidence) override;
bool isDirty() const override;
/** resturn the count of resources */
/** return the count of resources */
Q_REQUIRED_RESULT int resourceCount() const;
Q_SIGNALS:
......
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