calendar: move m_roles to initializer list

wilder-5.26
Fushan Wen 4 years ago
parent 6c754e7ab0
commit 25e87fe46b
No known key found for this signature in database
GPG Key ID: 2E48D1487C91DCAA
  1. 2
      components/calendar/eventpluginsmanager.cpp

@ -43,8 +43,8 @@ class EventPluginsModel : public QAbstractListModel
public: public:
EventPluginsModel(EventPluginsManagerPrivate *d) EventPluginsModel(EventPluginsManagerPrivate *d)
: d(d) : d(d)
, m_roles(QAbstractListModel::roleNames())
{ {
m_roles = QAbstractListModel::roleNames();
m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked")); m_roles.insert(Qt::EditRole, QByteArrayLiteral("checked"));
m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi")); m_roles.insert(Qt::UserRole, QByteArrayLiteral("configUi"));
m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath")); m_roles.insert(Qt::UserRole + 1, QByteArrayLiteral("pluginPath"));

Loading…
Cancel
Save