Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5682dc7b authored by Laurent Montel's avatar Laurent Montel 😁

Fix error found by cppcheck

parent c9a5f4bd
......@@ -1519,8 +1519,6 @@ void CalPrintTodos::print(QPainter &p, int width, int height)
int possummary = 100;
int posdue = width - 65;
int poscomplete = posdue - 70; //Complete column is to right of the Due column
int lineSpacing = 15;
//int fontHeight = 10;
QRect headerBox(0, 0, width, headerHeight());
QRect footerBox(0, height - footerHeight(), width, footerHeight());
......@@ -1535,7 +1533,7 @@ void CalPrintTodos::print(QPainter &p, int width, int height)
QFont oldFont(p.font());
p.setFont(QFont(QStringLiteral("sans-serif"), 9, QFont::Bold));
lineSpacing = p.fontMetrics().lineSpacing();
int lineSpacing = p.fontMetrics().lineSpacing();
mCurrentLinePos += lineSpacing;
if (mIncludePriority) {
outStr += i18n("Priority");
......
......@@ -89,7 +89,6 @@ protected:
bool mShowSubitemsNotes;
bool mShowAttendees;
bool mShowAttachments;
bool mShowNoteLines;
};
class CalPrintDay : public CalPrintPluginBase
......
......@@ -800,13 +800,11 @@ bool CalendarSupport::mergeCalendar(const QString &srcFilename,
qCCritical(CALENDARSUPPORT_LOG) << "File'" << srcFilename << "' doesn't exist.";
}
bool loadedSuccesfully = true;
// merge in a file
destCalendar->startBatchAdding();
KCalCore::FileStorage storage(destCalendar);
storage.setFileName(srcFilename);
loadedSuccesfully = storage.load();
bool loadedSuccesfully = storage.load();
destCalendar->endBatchAdding();
return loadedSuccesfully;
......
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