# HG changeset patch # User Raimund Renkert # Date 1397138219 -7200 # Node ID 666abcfab2298a0528826edab96dd608a04476d0 # Parent b0a274f4f9e23d5cae44b92c3ec48af4bef44bc5 Implemented setData in certificate table model. diff -r b0a274f4f9e2 -r 666abcfab229 ui/certificatetablemodel.cpp --- a/ui/certificatetablemodel.cpp Thu Apr 10 15:55:47 2014 +0200 +++ b/ui/certificatetablemodel.cpp Thu Apr 10 15:56:59 2014 +0200 @@ -45,7 +45,16 @@ bool CertificateTabelModel::setData(const QModelIndex &index, const QVariant &value, int role) { - //TODO + if (index.row() > certificates.size() || index.row() < 0) { + return false; + } + + bool newValue = value.toBool(); + Certificate &cert = certificates[index.row()]; + cert.setInstallCert(newValue); + + emit dataChanged(index, index); + return true; }