D29148: [KJotsWidget] Fix several KJotsEdit focus issues (race condition)
Daniel Vrátil
noreply at phabricator.kde.org
Mon Apr 27 11:00:41 BST 2020
dvratil added inline comments.
INLINE COMMENTS
> kjotsedit.cpp:242
> selectLinkText();
> - QPointer<KJotsLinkDialog> linkDialog = new KJotsLinkDialog(const_cast<QAbstractItemModel *>(m_selectionModel->model()), this);
> + QPointer<KJotsLinkDialog> linkDialog = new KJotsLinkDialog(const_cast<QAbstractItemModel*>(m_index->model()), this);
> linkDialog->setLinkText(currentLinkText());
Could the `m_index` here be `nullptr`? Should there be a guard?
> kjotsedit.cpp:378
> if (url.scheme() == QStringLiteral("kjots")) {
> - QModelIndex idx = KJotsModel::modelIndexForUrl(m_selectionModel->model(), url);
> + QModelIndex idx = KJotsModel::modelIndexForUrl(m_index->model(), url);
> auto item = idx.data(KJotsModel::ItemRole).value<Item>();
Could the `m_index` here be `nullptr`? Should there but a guard?
REPOSITORY
R573 KJots
REVISION DETAIL
https://phabricator.kde.org/D29148
To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200427/26461918/attachment.html>
More information about the kde-pim
mailing list