Commit dd2df3f0 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove unused Model subclass and model variable

parent 366731e1
......@@ -49,8 +49,6 @@ KisPaletteListWidget::KisPaletteListWidget(QWidget *parent)
i18n("Import a new palette from file")));
m_d->actExport.reset(new QAction(KisIconUtils::loadIcon("document-export"),
i18n("Export current palette to file")));
m_d->model->setColumnCount(1);
m_ui->setupUi(this);
m_ui->bnAdd->setDefaultAction(m_d->actAdd.data());
m_ui->bnRemove->setDefaultAction(m_d->actRemove.data());
......@@ -139,7 +137,6 @@ KisPaletteListWidgetPrivate::KisPaletteListWidgetPrivate(KisPaletteListWidget *a
: c(a_c)
, rAdapter(new KoResourceServerAdapter<KoColorSet>(KoResourceServerProvider::instance()->paletteServer()))
, itemChooser(new KoResourceItemChooser(rAdapter, a_c))
, model(new Model(rAdapter, a_c))
, delegate(new Delegate(a_c))
{ }
......
......@@ -9,7 +9,6 @@
#include <QAction>
#include "KisPaletteListWidget.h"
#include "KoResourceModel.h"
#include "KoResourceItemView.h"
#include "KoResourceItemChooser.h"
#include "KoResourceServer.h"
......@@ -32,7 +31,6 @@ struct KisPaletteListWidgetPrivate
QSharedPointer<KoResourceServerAdapter<KoColorSet> > rAdapter;
QSharedPointer<KoResourceItemChooser> itemChooser;
QScopedPointer<Model> model;
QScopedPointer<Delegate> delegate;
QScopedPointer<QAction> actAdd;
......@@ -52,16 +50,4 @@ public:
const QModelIndex & index) const override;
QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex &) const override;
};
class KisPaletteListWidgetPrivate::Model : public KoResourceModel
{
public:
Model(const QSharedPointer<KoResourceServerAdapter<KoColorSet> > &rAdapter, QObject *parent = Q_NULLPTR)
: KoResourceModel(rAdapter, parent)
{ }
~Model() override { }
Qt::ItemFlags flags(const QModelIndex &index) const override
{ return KoResourceModel::flags(index) | Qt::ItemIsUserCheckable; }
};
#endif // KISPALETTELISTWIDGET_P_H
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