Commit 0e01a886 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use isEmpty here

parent 1b268a87
Pipeline #22904 passed with stage
in 6 minutes and 6 seconds
...@@ -229,7 +229,7 @@ void HtmlExport::createMonthView(QTextStream *ts) ...@@ -229,7 +229,7 @@ void HtmlExport::createMonthView(QTextStream *ts)
Event::List events = d->mCalendar->events(start, d->mCalendar->timeZone(), Event::List events = d->mCalendar->events(start, d->mCalendar->timeZone(),
EventSortStartDate, EventSortStartDate,
SortDirectionAscending); SortDirectionAscending);
if (events.count()) { if (!events.isEmpty()) {
*ts << "<table>"; *ts << "<table>";
Event::List::ConstIterator it; Event::List::ConstIterator it;
Event::List::ConstIterator endEvents(events.constEnd()); Event::List::ConstIterator endEvents(events.constEnd());
...@@ -294,7 +294,7 @@ void HtmlExport::createEventList(QTextStream *ts) ...@@ -294,7 +294,7 @@ void HtmlExport::createEventList(QTextStream *ts)
Event::List events = d->mCalendar->events(dt, d->mCalendar->timeZone(), Event::List events = d->mCalendar->events(dt, d->mCalendar->timeZone(),
EventSortStartDate, EventSortStartDate,
SortDirectionAscending); SortDirectionAscending);
if (events.count()) { if (!events.isEmpty()) {
*ts << " <tr><td colspan=\"" << QString::number(columns) *ts << " <tr><td colspan=\"" << QString::number(columns)
<< "\" class=\"datehead\"><i>" << "\" class=\"datehead\"><i>"
<< QLocale().toString(dt) << QLocale().toString(dt)
...@@ -441,7 +441,7 @@ void HtmlExport::createTodoList(QTextStream *ts) ...@@ -441,7 +441,7 @@ void HtmlExport::createTodoList(QTextStream *ts)
for (it = todoList.constBegin(); it != todoList.constEnd(); ++it) { for (it = todoList.constBegin(); it != todoList.constEnd(); ++it) {
Incidence::List relations = d->mCalendar->relations((*it)->uid()); Incidence::List relations = d->mCalendar->relations((*it)->uid());
if (relations.count()) { if (!relations.isEmpty()) {
// Generate sub-to-do list // Generate sub-to-do list
*ts << " <tr>" << returnEndLine(); *ts << " <tr>" << returnEndLine();
*ts << " <td class=\"subhead\" colspan="; *ts << " <td class=\"subhead\" colspan=";
...@@ -503,7 +503,7 @@ void HtmlExport::createTodo(QTextStream *ts, const Todo::Ptr &todo) ...@@ -503,7 +503,7 @@ void HtmlExport::createTodo(QTextStream *ts, const Todo::Ptr &todo)
if (!todo->description().isEmpty()) { if (!todo->description().isEmpty()) {
*ts << " <p>" << breakString(cleanChars(todo->description())) << "</p>" << returnEndLine(); *ts << " <p>" << breakString(cleanChars(todo->description())) << "</p>" << returnEndLine();
} }
if (relations.count()) { if (!relations.isEmpty()) {
*ts << " <div align=\"right\"><a href=\"#sub" << todo->uid() *ts << " <div align=\"right\"><a href=\"#sub" << todo->uid()
<< "\">" << i18nc("@title:column sub-to-dos of the parent to-do", << "\">" << i18nc("@title:column sub-to-dos of the parent to-do",
"Sub-To-dos") << "</a></div>" << returnEndLine(); "Sub-To-dos") << "</a></div>" << returnEndLine();
......
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