Commit 33291cee authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify pointer

parent 39c049b8
......@@ -14,13 +14,13 @@ using namespace Akonadi;
SyncItipHandler::SyncItipHandler(const QString &receiver, const QString &iCal, const QString &type, const Akonadi::CalendarBase::Ptr &calendar, QObject *parent)
: QObject(parent)
, m_counterProposalEditorDelegate(new IncidenceEditorNG::GroupwareUiDelegate())
{
Q_ASSERT(calendar);
qCDebug(TEXT_CALENDAR_LOG) << "SyncItipHandler::SyncItipHandler: " << this;
auto handler = new Akonadi::ITIPHandler(this);
QObject::connect(handler, &Akonadi::ITIPHandler::iTipMessageProcessed, this, &SyncItipHandler::onITipMessageProcessed, Qt::QueuedConnection);
m_counterProposalEditorDelegate = new IncidenceEditorNG::GroupwareUiDelegate();
handler->setGroupwareUiDelegate(m_counterProposalEditorDelegate);
handler->setCalendar(calendar);
......@@ -41,7 +41,6 @@ void SyncItipHandler::onITipMessageProcessed(Akonadi::ITIPHandler::Result result
m_eventLoop.exit();
deleteLater();
delete m_counterProposalEditorDelegate;
m_counterProposalEditorDelegate = nullptr;
}
QString SyncItipHandler::errorMessage() const
......
......@@ -33,6 +33,6 @@ private:
QString m_errorMessage;
Akonadi::ITIPHandler::Result m_result = Akonadi::ITIPHandler::ResultSuccess;
QEventLoop m_eventLoop;
IncidenceEditorNG::GroupwareUiDelegate *m_counterProposalEditorDelegate = nullptr;
IncidenceEditorNG::GroupwareUiDelegate *const m_counterProposalEditorDelegate;
};
Supports Markdown
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