Commit daad9aa7 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 3267590d
......@@ -228,10 +228,9 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *par
connect(mIncidenceTree, &ReminderTree::itemSelectionChanged, this, &AlarmDialog::updateButtons);
mDetailView = new CalendarSupport::IncidenceViewer(mCalendar.data(), topBox);
QString s;
s = xi18nc("@info default incidence details string",
"<emphasis>Select an event or to-do from the list above "
"to view its details here.</emphasis>");
const QString s = xi18nc("@info default incidence details string",
"<emphasis>Select an event or to-do from the list above "
"to view its details here.</emphasis>");
mDetailView->setDefaultMessage(s);
mTopLayout->addWidget(mDetailView);
mDetailView->hide();
......@@ -602,8 +601,6 @@ void AlarmDialog::eventNotification()
bool beeped = false;
bool found = false;
ReminderList list;
QTreeWidgetItemIterator it(mIncidenceTree);
while (*it) {
ReminderTreeItem *item = static_cast<ReminderTreeItem *>(*it);
......@@ -652,8 +649,9 @@ void AlarmDialog::eventNotification()
const Person::List addresses = alarm->mailAddresses();
QStringList add;
add.reserve(addresses.count());
Person::List::ConstIterator end(addresses.constEnd());
for (Person::List::ConstIterator it = addresses.constBegin();
it != addresses.constEnd(); ++it) {
it != end; ++it) {
add << (*it)->fullName();
}
to = add.join(QStringLiteral(", "));
......
......@@ -94,15 +94,13 @@ public Q_SLOTS:
Q_SIGNALS:
void reminderCount(int count);
private Q_SLOTS:
void update();
void updateButtons();
protected:
void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
void closeEvent(QCloseEvent *) Q_DECL_OVERRIDE;
private:
void update();
void updateButtons();
typedef QList<ReminderTreeItem *> ReminderList;
static KDateTime triggerDateForIncidence(const KCalCore::Incidence::Ptr &inc,
......
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