From 680b8cdcad7a2faf206b6102511a0678938045af Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 3 Feb 2016 18:38:18 +0100 Subject: [PATCH] KLinkItemSelectionModel: Add new default constructor. Make it possible to construct this in QML --- src/klinkitemselectionmodel.cpp | 6 ++++++ src/klinkitemselectionmodel.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/klinkitemselectionmodel.cpp b/src/klinkitemselectionmodel.cpp index c3ea9f1..f6de1c1 100644 --- a/src/klinkitemselectionmodel.cpp +++ b/src/klinkitemselectionmodel.cpp @@ -94,6 +94,12 @@ KLinkItemSelectionModel::KLinkItemSelectionModel(QAbstractItemModel *model, QIte setLinkedItemSelectionModel(proxySelector); } +KLinkItemSelectionModel::KLinkItemSelectionModel(QObject *parent) + : QItemSelectionModel(Q_NULLPTR, parent), + d_ptr(new KLinkItemSelectionModelPrivate(this)) +{ +} + KLinkItemSelectionModel::~KLinkItemSelectionModel() { delete d_ptr; diff --git a/src/klinkitemselectionmodel.h b/src/klinkitemselectionmodel.h index 3b5df84..5956c15 100644 --- a/src/klinkitemselectionmodel.h +++ b/src/klinkitemselectionmodel.h @@ -104,6 +104,9 @@ public: Constructor. */ KLinkItemSelectionModel(QAbstractItemModel *targetModel, QItemSelectionModel *linkedItemSelectionModel, QObject *parent = 0); + + explicit KLinkItemSelectionModel(QObject *parent = Q_NULLPTR); + ~KLinkItemSelectionModel(); QItemSelectionModel *linkedItemSelectionModel() const;