~kubuntu-dev/user-manager/master

« back to all changes in this revision

Viewing changes to src/usermanager.cpp

  • Committer: Laurent Montel
  • Date: 2019-01-08 06:06:54 UTC
  • Revision ID: git-v1:07cb3111146191192acc822a81873391a2a95e82
Fix some clazy warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    layout->addWidget(m_widget);
52
52
 
53
53
    m_selectionModel = new QItemSelectionModel(m_model);
54
 
    connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)), SLOT(currentChanged(QModelIndex,QModelIndex)));
 
54
    connect(m_selectionModel, &QItemSelectionModel::currentChanged, this, &UserManager::currentChanged);
55
55
    m_selectionModel->setCurrentIndex(m_model->index(0), QItemSelectionModel::SelectCurrent);
56
56
 
57
57
    m_ui->userList->setModel(m_model);
61
61
    ModelTest* test = new ModelTest(m_model, nullptr);
62
62
    Q_UNUSED(test)
63
63
 
64
 
    connect(m_ui->addBtn, SIGNAL(clicked(bool)), SLOT(addNewUser()));
65
 
    connect(m_ui->removeBtn, SIGNAL(clicked(bool)), SLOT(removeUser()));
 
64
    connect(m_ui->addBtn, &QAbstractButton::clicked, this, &UserManager::addNewUser);
 
65
    connect(m_ui->removeBtn, &QAbstractButton::clicked, this, &UserManager::removeUser);
66
66
    connect(m_widget, SIGNAL(changed(bool)), SIGNAL(changed(bool)));
67
 
    connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(dataChanged(QModelIndex,QModelIndex)));
 
67
    connect(m_model, &QAbstractItemModel::dataChanged, this, &UserManager::dataChanged);
68
68
}
69
69
 
70
70
UserManager::~UserManager()